[integration tests] Instance OS-EXT-SRV-ATTR:host is None some test cases

Bug #1584034 reported by Georgy Dyuldin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Georgy Dyuldin

Bug Description

Test result:

https://mirantis.testrail.com/index.php?/tests/view/6100461

Trace:

instances = [<Server: server00>, <Server: server01>]
os_conn = <mos_tests.environment.os_actions.OpenStackActions object at 0x7f87d929d890>
env = <mos_tests.environment.fuel_client.Environment object at 0x7f87d92278d0>
keypair = <Keypair: instancekey>
nova_client = <mos_tests.functions.os_cli.Nova object at 0x7f87d9220a10>

    @pytest.mark.check_env_('has_2_or_more_computes')
    @pytest.mark.testrail_id('842499')
    def test_live_evacuate_instances(instances, os_conn, env, keypair,
                                     nova_client):
        """Live evacuate all instances of the specified host to other available
        hosts without shared storage

        Scenario:
            1. Create net01, net01__subnet
            2. Boot instances vm1 and vm2 in net01 on compute node1
            3. Run the 'nova host-evacuate-live' command to live-migrate
                vm1 and vm2 instances from compute node1 to compute node2:
                nova host-evacuate-live --target-host node-2.domain.tld \
                --block-migrate node-1.domain.tld
            4. Check that all live-migrated instances are hosted on target host
                and are in ACTIVE status
            5. Check pings between vm1 and vm2
        """
        old_host = getattr(instances[0], 'OS-EXT-SRV-ATTR:host')
        new_host = [x.hypervisor_hostname
                    for x in os_conn.nova.hypervisors.list()
                    if x.hypervisor_hostname != old_host][0]

        nova_client(
            'host-evacuate-live',
            params='--target-host {new_host} --block-migrate {old_host}'.format(
                old_host=old_host,
> new_host=new_host))

mos_tests/nova/host_actions_test.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mos_tests/functions/os_cli.py:64: in __call__
    merge_stderr=merge_stderr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

remote = <mos_tests.environment.ssh.SSHClient object at 0x7f87d9246cd0> [10.109.2.3:22]
command = '. openrc && nova host-evacuate-live --target-host node-2.test.domain.local --block-migrate None'
fail_ok = False, merge_stderr = False

    def os_execute(remote, command, fail_ok=False, merge_stderr=False):
        command = '. openrc && {}'.format(command.encode('utf-8'))
        result = remote.execute(command)
        if not fail_ok and not result.is_ok:
            raise exceptions.CommandFailed(result['exit_code'],
                                           command.decode('utf-8'),
                                           result.stdout_string,
> result.stderr_string)
E CommandFailed: Command '. openrc && nova host-evacuate-live --target-host node-2.test.domain.local --block-migrate None' returned non-zero exit status 1.
E stdout:
E
E stderr:
E ERROR (NotFound): No hypervisor matching 'None' could be found. (HTTP 404) (Request-ID: req-4362c552-496d-43d2-9281-5b315093813c)

mos_tests/functions/os_cli.py:42: CommandFailed

Tags: area-qa
Revision history for this message
Georgy Dyuldin (g-dyuldin) wrote :
Changed in mos:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.