yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73626
[Bug 1779711] [NEW] test_pre_live_migration_volume_backed* intermittently fails serialized json compare
Public bug reported:
Introduced in these new tests:
https://review.openstack.org/#/c/540679/
They are doing a primitive dict compare with nested dicts and the keys
can be in random orders. We need to use something like
self.assertJsonEqual.
Seen here:
http://logs.openstack.org/04/523604/21/check/openstack-tox-lower-
constraints/8a273cd/testr_results.html.gz
ft1.600: nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_pre_live_migration_volume_backed_StringException: pythonlogging:'': {{{2018-06-29 18:43:57,584 WARNING [os_brick.initiator.connectors.remotefs] Connection details not present. RemoteFsClient may not initialize properly.}}}
stderr: {{{
/home/zuul/src/git.openstack.org/openstack/nova/nova/test.py:323: DeprecationWarning: Using class 'MoxStubout' (either directly or via inheritance) is deprecated in version '3.5.0'
mox_fixture = self.useFixture(moxstubout.MoxStubout())
}}}
Traceback (most recent call last):
File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/unit/virt/libvirt/test_driver.py", line 11972, in test_pre_live_migration_volume_backed
self._test_pre_live_migration_volume_backed()
File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/unit/virt/libvirt/test_driver.py", line 11969, in _test_pre_live_migration_volume_backed
returned_migrate_data.obj_to_primitive())
File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/lower-constraints/lib/python3.5/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/lower-constraints/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'nova_object.data': {'bdms': [{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"data": '
'{"device_path": '
'"/dev/disk/path/lun-X"}, '
'"serial": '
'"53641be9-7553-4b55-b2fd-cb3cf6373505"}',
'dev': 'sda',
'format': None,
'serial': '53641be9-7553-4b55-b2fd-cb3cf6373505',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'},
{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"data": '
'{"device_path": '
'"/dev/disk/path/lun-Z"}, '
'"serial": '
'"1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8"}',
'dev': 'sdb',
'format': None,
'serial': '1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'}],
'block_migration': False,
'disk_available_mb': 123,
'disk_over_commit': False,
'filename': 'foo',
'image_type': 'qcow2',
'instance_relative_path': 'instance-00000001',
'is_shared_block_storage': False,
'is_shared_instance_path': True,
'is_volume_backed': True,
'serial_listen_ports': [],
'src_supports_native_luks': True,
'supported_perf_events': [],
'target_connect_addr': None},
'nova_object.name': 'LibvirtLiveMigrateData',
'nova_object.namespace': 'nova',
'nova_object.version': '1.8'}
actual = {'nova_object.data': {'bdms': [{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"serial": '
'"53641be9-7553-4b55-b2fd-cb3cf6373505", '
'"data": '
'{"device_path": '
'"/dev/disk/path/lun-X"}}',
'dev': 'sda',
'format': None,
'serial': '53641be9-7553-4b55-b2fd-cb3cf6373505',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'},
{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"serial": '
'"1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8", '
'"data": '
'{"device_path": '
'"/dev/disk/path/lun-Z"}}',
'dev': 'sdb',
'format': None,
'serial': '1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'}],
'block_migration': False,
'disk_available_mb': 123,
'disk_over_commit': False,
'filename': 'foo',
'image_type': 'qcow2',
'instance_relative_path': 'instance-00000001',
'is_shared_block_storage': False,
'is_shared_instance_path': True,
'is_volume_backed': True,
'serial_listen_ports': [],
'src_supports_native_luks': True,
'supported_perf_events': [],
'target_connect_addr': None},
'nova_object.name': 'LibvirtLiveMigrateData',
'nova_object.namespace': 'nova',
'nova_object.version': '1.8'}
** Affects: nova
Importance: Critical
Assignee: Matt Riedemann (mriedem)
Status: In Progress
** Tags: testing
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1779711
Title:
test_pre_live_migration_volume_backed* intermittently fails serialized
json compare
Status in OpenStack Compute (nova):
In Progress
Bug description:
Introduced in these new tests:
https://review.openstack.org/#/c/540679/
They are doing a primitive dict compare with nested dicts and the keys
can be in random orders. We need to use something like
self.assertJsonEqual.
Seen here:
http://logs.openstack.org/04/523604/21/check/openstack-tox-lower-
constraints/8a273cd/testr_results.html.gz
ft1.600: nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_pre_live_migration_volume_backed_StringException: pythonlogging:'': {{{2018-06-29 18:43:57,584 WARNING [os_brick.initiator.connectors.remotefs] Connection details not present. RemoteFsClient may not initialize properly.}}}
stderr: {{{
/home/zuul/src/git.openstack.org/openstack/nova/nova/test.py:323: DeprecationWarning: Using class 'MoxStubout' (either directly or via inheritance) is deprecated in version '3.5.0'
mox_fixture = self.useFixture(moxstubout.MoxStubout())
}}}
Traceback (most recent call last):
File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/unit/virt/libvirt/test_driver.py", line 11972, in test_pre_live_migration_volume_backed
self._test_pre_live_migration_volume_backed()
File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/unit/virt/libvirt/test_driver.py", line 11969, in _test_pre_live_migration_volume_backed
returned_migrate_data.obj_to_primitive())
File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/lower-constraints/lib/python3.5/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/lower-constraints/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'nova_object.data': {'bdms': [{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"data": '
'{"device_path": '
'"/dev/disk/path/lun-X"}, '
'"serial": '
'"53641be9-7553-4b55-b2fd-cb3cf6373505"}',
'dev': 'sda',
'format': None,
'serial': '53641be9-7553-4b55-b2fd-cb3cf6373505',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'},
{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"data": '
'{"device_path": '
'"/dev/disk/path/lun-Z"}, '
'"serial": '
'"1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8"}',
'dev': 'sdb',
'format': None,
'serial': '1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'}],
'block_migration': False,
'disk_available_mb': 123,
'disk_over_commit': False,
'filename': 'foo',
'image_type': 'qcow2',
'instance_relative_path': 'instance-00000001',
'is_shared_block_storage': False,
'is_shared_instance_path': True,
'is_volume_backed': True,
'serial_listen_ports': [],
'src_supports_native_luks': True,
'supported_perf_events': [],
'target_connect_addr': None},
'nova_object.name': 'LibvirtLiveMigrateData',
'nova_object.namespace': 'nova',
'nova_object.version': '1.8'}
actual = {'nova_object.data': {'bdms': [{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"serial": '
'"53641be9-7553-4b55-b2fd-cb3cf6373505", '
'"data": '
'{"device_path": '
'"/dev/disk/path/lun-X"}}',
'dev': 'sda',
'format': None,
'serial': '53641be9-7553-4b55-b2fd-cb3cf6373505',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'},
{'nova_object.data': {'boot_index': None,
'bus': 'scsi',
'connection_info_json': '{"serial": '
'"1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8", '
'"data": '
'{"device_path": '
'"/dev/disk/path/lun-Z"}}',
'dev': 'sdb',
'format': None,
'serial': '1f5cf6f3-6afb-45d2-a4a9-7a206f3a3cf8',
'type': 'disk'},
'nova_object.name': 'LibvirtLiveMigrateBDMInfo',
'nova_object.namespace': 'nova',
'nova_object.version': '1.1'}],
'block_migration': False,
'disk_available_mb': 123,
'disk_over_commit': False,
'filename': 'foo',
'image_type': 'qcow2',
'instance_relative_path': 'instance-00000001',
'is_shared_block_storage': False,
'is_shared_instance_path': True,
'is_volume_backed': True,
'serial_listen_ports': [],
'src_supports_native_luks': True,
'supported_perf_events': [],
'target_connect_addr': None},
'nova_object.name': 'LibvirtLiveMigrateData',
'nova_object.namespace': 'nova',
'nova_object.version': '1.8'}
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1779711/+subscriptions
Follow ups