yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94354
[Bug 2075178] [NEW] test_snapshot_running test fails if qemu-img binary is missing
Public bug reported:
When qemu-img binary is not present on the system, this test fails like
we can see on that log:
======================================================================
ERROR: nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase.test_snapshot_running
----------------------------------------------------------------------
pythonlogging:'': {{{
2024-07-30 15:47:15,058 INFO [nova.db.migration] Applying migration(s)
2024-07-30 15:47:15,170 INFO [nova.db.migration] Migration(s) applied
2024-07-30 15:47:15,245 INFO [nova.db.migration] Applying migration(s)
2024-07-30 15:47:15,901 INFO [nova.db.migration] Migration(s) applied
2024-07-30 15:47:15,997 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
2024-07-30 15:47:15,998 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
2024-07-30 15:47:16,000 WARNING [oslo_policy.policy] Policy Rules ['os_compute_api:extensions', 'os_compute_api:os-floating-ip-pools', 'os_compute_api:os-quota-sets:defaults', 'os_compute_api:os-availability-zone:list', 'os_compute_api:limits', 'project_member_api', 'project_reader_api', 'project_member_or_admin', 'project_reader_or_admin', 'os_compute_api:limits:other_project', 'os_compute_api:os-lock-server:unlock:unlock_override', 'os_compute_api:servers:create:zero_disk_flavor', 'compute:servers:resize:cross_cell', 'os_compute_api:os-shelve:unshelve_to_host'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
2024-07-30 15:47:17,245 INFO [os_vif] Loaded VIF plugins: linux_bridge, noop, ovs
2024-07-30 15:47:17,426 INFO [nova.virt.libvirt.driver] Creating image(s)
2024-07-30 15:47:17,560 INFO [nova.virt.libvirt.host] kernel doesn't support AMD SEV
2024-07-30 15:47:17,642 INFO [nova.virt.libvirt.driver] Instance spawned successfully.
2024-07-30 15:47:17,711 INFO [nova.virt.libvirt.driver] Beginning live snapshot process
}}}
Traceback (most recent call last):
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3110, in snapshot
metadata['location'] = root_disk.direct_snapshot(
File "/usr/lib/python3.10/unittest/mock.py", line 1114, in __call__
return self._mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1118, in _mock_call
return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1173, in _execute_mock_call
raise effect
NotImplementedError: direct_snapshot() is not implemented
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/virt/test_virt_drivers.py", line 60, in wrapped_func
return f(self, *args, **kwargs)
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/virt/test_virt_drivers.py", line 242, in test_snapshot_running
self.connection.snapshot(self.ctxt, instance_ref, img_ref['id'],
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3149, in snapshot
self._live_snapshot(context, instance, guest,
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3402, in _live_snapshot
libvirt_utils.create_image(
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/utils.py", line 249, in create_image
processutils.execute(*cmd)
File "/home/jlejeune/dev/pci_repos/stash/nova/.tox/py310/lib/python3.10/site-packages/oslo_concurrency/processutils.py", line 438, in execute
raise ProcessExecutionError(exit_code=_returncode,
oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: env LC_ALL=C LANG=C qemu-img create -f qcow2 ./tmp_bnmjhqw/e560a316990743598911504ed0cbbf41.delta 123456
Exit code: 127
Stdout: ''
Stderr: 'env: ‘qemu-img’: No such file or directory\n'
** Affects: nova
Importance: Undecided
Status: In Progress
--
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/2075178
Title:
test_snapshot_running test fails if qemu-img binary is missing
Status in OpenStack Compute (nova):
In Progress
Bug description:
When qemu-img binary is not present on the system, this test fails
like we can see on that log:
======================================================================
ERROR: nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase.test_snapshot_running
----------------------------------------------------------------------
pythonlogging:'': {{{
2024-07-30 15:47:15,058 INFO [nova.db.migration] Applying migration(s)
2024-07-30 15:47:15,170 INFO [nova.db.migration] Migration(s) applied
2024-07-30 15:47:15,245 INFO [nova.db.migration] Applying migration(s)
2024-07-30 15:47:15,901 INFO [nova.db.migration] Migration(s) applied
2024-07-30 15:47:15,997 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
2024-07-30 15:47:15,998 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
2024-07-30 15:47:16,000 WARNING [oslo_policy.policy] Policy Rules ['os_compute_api:extensions', 'os_compute_api:os-floating-ip-pools', 'os_compute_api:os-quota-sets:defaults', 'os_compute_api:os-availability-zone:list', 'os_compute_api:limits', 'project_member_api', 'project_reader_api', 'project_member_or_admin', 'project_reader_or_admin', 'os_compute_api:limits:other_project', 'os_compute_api:os-lock-server:unlock:unlock_override', 'os_compute_api:servers:create:zero_disk_flavor', 'compute:servers:resize:cross_cell', 'os_compute_api:os-shelve:unshelve_to_host'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
2024-07-30 15:47:17,245 INFO [os_vif] Loaded VIF plugins: linux_bridge, noop, ovs
2024-07-30 15:47:17,426 INFO [nova.virt.libvirt.driver] Creating image(s)
2024-07-30 15:47:17,560 INFO [nova.virt.libvirt.host] kernel doesn't support AMD SEV
2024-07-30 15:47:17,642 INFO [nova.virt.libvirt.driver] Instance spawned successfully.
2024-07-30 15:47:17,711 INFO [nova.virt.libvirt.driver] Beginning live snapshot process
}}}
Traceback (most recent call last):
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3110, in snapshot
metadata['location'] = root_disk.direct_snapshot(
File "/usr/lib/python3.10/unittest/mock.py", line 1114, in __call__
return self._mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1118, in _mock_call
return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1173, in _execute_mock_call
raise effect
NotImplementedError: direct_snapshot() is not implemented
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/virt/test_virt_drivers.py", line 60, in wrapped_func
return f(self, *args, **kwargs)
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/virt/test_virt_drivers.py", line 242, in test_snapshot_running
self.connection.snapshot(self.ctxt, instance_ref, img_ref['id'],
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3149, in snapshot
self._live_snapshot(context, instance, guest,
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/driver.py", line 3402, in _live_snapshot
libvirt_utils.create_image(
File "/home/jlejeune/dev/pci_repos/stash/nova/nova/virt/libvirt/utils.py", line 249, in create_image
processutils.execute(*cmd)
File "/home/jlejeune/dev/pci_repos/stash/nova/.tox/py310/lib/python3.10/site-packages/oslo_concurrency/processutils.py", line 438, in execute
raise ProcessExecutionError(exit_code=_returncode,
oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: env LC_ALL=C LANG=C qemu-img create -f qcow2 ./tmp_bnmjhqw/e560a316990743598911504ed0cbbf41.delta 123456
Exit code: 127
Stdout: ''
Stderr: 'env: ‘qemu-img’: No such file or directory\n'
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2075178/+subscriptions
Follow ups