Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] Fix clenaups of VMs. #10263

Merged
merged 1 commit into from
Jul 22, 2020
Merged

[1LP][RFR] Fix clenaups of VMs. #10263

merged 1 commit into from
Jul 22, 2020

Conversation

jarovo
Copy link
Contributor

@jarovo jarovo commented Jul 22, 2020

Purpose or Intent

Fixing VM cleanups. lambda was used with attribute access where a call was intended. Fixed by just sending the method (attribute) to the wait_for instead of making the lambda.

{{py.test: -sv cfme/tests/cloud_infra_common/test_provisioning.py::test_provision_with_additional_volume --long-running --use-provider complete }}

Without this:

cfme/tests/cloud_infra_common/test_provisioning.py::test_provision_with_additional_volume[openstack-13] PASSED                                                                         [100%]
cfme/tests/cloud_infra_common/test_provisioning.py::test_provision_with_additional_volume[openstack-13] ERROR                                                                          [100%]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> captured stdout >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Trying to set up provider env-rhos13

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    def cleanup_and_wait_for_instance_gone():
        instance.mgmt.refresh()
        prov_instance_raw = instance.mgmt.raw
        instance_volumes = getattr(prov_instance_raw, 'os-extended-volumes:volumes_attached')
    
        instance.cleanup_on_provider()
>       wait_for(lambda: not instance.exists_on_provider, num_sec=180, delay=5)
E       wait_for.TimedOutError: Could not do 'lambda defined as `wait_for(lambda: not instance.exists_on_provider, num_sec=180, delay=5)`' at /home/jhenner/work/miq/origin_master/cfme/tests/cloud_infra_common/test_provisioning.py:725 in time

cfme/tests/cloud_infra_common/test_provisioning.py:725: TimedOutError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[13] > /home/jhenner/work/miq/origin_master/cfme/tests/cloud_infra_common/test_provisioning.py(725)cleanup_and_wait_for_instance_gone()
-> wait_for(lambda: not instance.exists_on_provider, num_sec=180, delay=5)
   4 frames hidden (try 'help hidden_frames')
(Pdb++) q

@jarovo jarovo changed the title Fix clenaups of VMs. [WIPTEST] Fix clenaups of VMs. Jul 22, 2020
@jarovo jarovo requested a review from prichard77 July 22, 2020 16:18
@jarovo jarovo changed the title [WIPTEST] Fix clenaups of VMs. [RFR] Fix clenaups of VMs. Jul 22, 2020
@mshriver mshriver changed the title [RFR] Fix clenaups of VMs. [1LP][RFR] Fix clenaups of VMs. Jul 22, 2020
@mshriver mshriver merged commit 20a271f into ManageIQ:master Jul 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants