get_qemu_img_version raise No such file or directory

Bug #1826317 reported by yenai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
yenai

Bug Description

get_qemu_img_version raise "OSError: [Errno 2] No such file or directory" when qemu-img is not installed insteadof a WARNING log "qemu-img is not installed.".

Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server [None req-3a9b4069-bb33-4559-af68-e5ca48109bf3 None None] Exception during message handling: OSError: [Errno 2] No such file or directory
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 166, in _process_incoming
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 265, in dispatch
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _do_dispatch
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "<decorator-gen-673>", line 2, in create_volume
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/objects/cleanable.py", line 208, in wrapper
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server result = f(*args, **kwargs)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 749, in create_volume
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server _run_flow()
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/manager.py", line 741, in _run_flow
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server flow_engine.run()
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 247, in run
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server for _state in self.run_iter(timeout=timeout):
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 340, in run_iter
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server failure.Failure.reraise_if_any(er_failures)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/taskflow/types/failure.py", line 339, in reraise_if_any
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server failures[0].reraise()
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/taskflow/types/failure.py", line 346, in reraise
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server six.reraise(*self._exc_info)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server result = task.execute(**arguments)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 971, in execute
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server **volume_spec)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 861, in _create_from_image
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server image_service)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "<decorator-gen-672>", line 2, in _prepare_image_cache_entry
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/coordination.py", line 151, in _synchronized
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server return f(*a, **k)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 660, in _prepare_image_cache_entry
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server update_cache=True)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 749, in _create_from_image_cache_or_download
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server tmp_image, image_meta)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/image/image_utils.py", line 691, in get_image_virtual_size
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server qemu_version = get_qemu_img_version()
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/image/image_utils.py", line 128, in get_qemu_img_version
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server info = utils.execute('qemu-img', '--version', check_exit_code=False)[0]
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/utils.py", line 128, in execute
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server return processutils.execute(*cmd, **kwargs)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 391, in execute
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server env=env_variables)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/eventlet/green/subprocess.py", line 58, in __init__
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server errread, errwrite)
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server raise child_exception
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server OSError: [Errno 2] No such file or directory
Jan 13 22:34:04 localhost.localdomain cinder-volume[98778]: ERROR oslo_messaging.rpc.server

yenai (yenai2008)
Changed in cinder:
assignee: nobody → yenai (yenai2008)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/655617

Changed in cinder:
status: New → In Progress
Revision history for this message
yenai (yenai2008) wrote :
Download full text (10.1 KiB)

[root@localhost ~]# rpm -qa | grep qemu-img
qemu-img-ev-2.12.0-18.el7_6.3.1.x86_64
[root@localhost ~]# rpm -e --nodeps qemu-img-ev-2.12.0-18.el7_6.3.1.x86_64
[root@localhost ~]# rpm -qa | grep qemu-img
[root@localhost ~]# qemu-img
-bash: qemu-img: command not found
[root@localhost ~]#

Jan 13 22:21:23 localhost.localdomain cinder-volume[96783]: DEBUG cinder.image.image_utils [None req-ee517898-79ca-494b-9a24-dc29e2149d58 None None] Temporary image 11ddf734-8844-47ab-aacf-b062fb77f04a is fetched for user edffe81b43534dfea48effced3ac8e53. {{(pid=96890) fetch /opt/stack/cinder/cinder/image/image_utils.py:868}}
Jan 13 22:21:23 localhost.localdomain cinder-volume[96783]: DEBUG cinder.image.image_utils [None req-ee517898-79ca-494b-9a24-dc29e2149d58 None None] #### qemu_version [2, 12, 0] {{(pid=96890) get_image_virtual_size /opt/stack/cinder/cinder/image/image_utils.py:692}}

Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: DEBUG cinder.volume.flows.manager.create_volume [None req-ee517898-79ca-494b-9a24-dc29e2149d58 None None] Volume 68d8ee21-8f59-4650-988f-e3786d6aaba6: re-scheduling SchedulerAPI.create_volume attempt 1 due to Unexpected error while running command.
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Command: /usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=8 -- sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C qemu-img info /opt/stack/data/cinder/conversion/tmpa8OHx4localhost.localdomain@lvmdriver-1
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Exit code: 96
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Stdout: u''
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Stderr: u'/usr/bin/cinder-rootwrap: Executable not found: qemu-img (filter match = qemu-img)\n' {{(pid=96890) _reschedule /opt/stack/cinder/cinder/volume/flows/manager/create_volume.py:152}}

Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: ERROR oslo_messaging.rpc.server [None req-ee517898-79ca-494b-9a24-dc29e2149d58 None None] Exception during message handling: ProcessExecutionError: Unexpected error while running command.
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Command: /usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=8 -- sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C qemu-img info /opt/stack/data/cinder/conversion/tmpa8OHx4localhost.localdomain@lvmdriver-1
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Exit code: 96
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Stdout: u''
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: Stderr: u'/usr/bin/cinder-rootwrap: Executable not found: qemu-img (filter match = qemu-img)\n'
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 166, in _process_incoming
Jan 13 22:21:24 localhost.localdomain cinder-volume[96783]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Jan 13 22:21:24 loc...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/715147

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.