Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1746712

Summary: [RHOS15-CEPH] Unable to create encrypted volume from image - cinder not on latest qemu img
Product: Red Hat OpenStack Reporter: bkopilov <bkopilov>
Component: openstack-containersAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Tzach Shefi <tshefi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 15.0 (Stein)CC: abishop, acanan, eharney, gcharot, jvisser, lhh, m.andre, pgrist, tshefi
Target Milestone: gaKeywords: Regression, Triaged
Target Release: 15.0 (Stein)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 16:39:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1727821    
Bug Blocks:    
Attachments:
Description Flags
cinder log none

Description bkopilov 2019-08-29 07:15:10 UTC
Description of problem:
RHOS15 , all in once setup with ceph.

Testcase :
Try to upload image to encrypted volume fails .

Here is the traceback:

2019-08-29 02:22:20.413 36 DEBUG cinder.volume.drivers.rbd [req-236efa2d-8076-4f22-8326-6df4eebc0671 - - 
- - -] connecting to openstack@ceph (conf=/etc/ceph/ceph.conf, timeout=-1). _do_conn /usr/lib/python3.6/s
ite-packages/cinder/volume/drivers/rbd.py:402
2019-08-29 02:22:20.540 36 DEBUG cinder.volume.drivers.rbd [req-236efa2d-8076-4f22-8326-6df4eebc0671 - - 
- - -] connecting to openstack@ceph (conf=/etc/ceph/ceph.conf, timeout=-1). _do_conn /usr/lib/python3.6/s
ite-packages/cinder/volume/drivers/rbd.py:402
2019-08-29 02:22:20.658 36 DEBUG cinder.volume.drivers.rbd [req-236efa2d-8076-4f22-8326-6df4eebc0671 - - 
/Traceback
...skipping
Stdout: ''
Stderr: "qemu-img: Could not open '/var/lib/cinder/conversion/tmps33yfypx.luks': Parameter 'key-secret' i
s required for cipher\n"
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils Traceback (most recent call last):
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/volu
me/utils.py", line 1148, in copy_image_to_volume
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     context, volume, image_service, image_id)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/volu
me/drivers/rbd.py", line 1511, in copy_image_to_encrypted_volume
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     encrypted=True)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/volu
me/drivers/rbd.py", line 1557, in _copy_image_to_volume
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     self._encrypt_image(context, volume, tmp_dir, tm
p.name)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/volu
me/drivers/rbd.py", line 1540, in _encrypt_image
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     passphrase_file=pass_file.name)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/imag
e/image_utils.py", line 300, in convert_image
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     passphrase_file=passphrase_file)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/imag
e/image_utils.py", line 244, in _convert_image
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     utils.execute(*cmd, run_as_root=run_as_root)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/cinder/util
s.py", line 128, in execute
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     return processutils.execute(*cmd, **kwargs)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils   File "/usr/lib/python3.6/site-packages/oslo_concur
rency/processutils.py", line 424, in execute
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils     cmd=sanitized_cmd)
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils oslo_concurrency.processutils.ProcessExecutionError:
 Unexpected error while running command.
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils Command: qemu-img convert -O luks -f raw -o cipher-a
lg=aes-256,cipher-mode=xts,ivgen-alg=plain64 --object secret,id=luks_sec,format=raw,file=/var/lib/cinder/
conversion/luks_tvrmcome -o key-secret=*** /var/lib/cinder/conversion/tmps33yfypx /var/lib/cinder/convers
ion/tmps33yfypx.luks
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils Exit code: 1
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils Stdout: ''
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils Stderr: "qemu-img: Could not open '/var/lib/cinder/c
onversion/tmps33yfypx.luks': Parameter 'key-secret' is required for cipher\n"
2019-08-29 05:45:46.248 36 ERROR cinder.volume.utils 


Attaching log files 

Benny

Comment 1 bkopilov 2019-08-29 07:16:34 UTC
Created attachment 1609281 [details]
cinder log

Comment 16 Tzach Shefi 2019-09-11 08:29:00 UTC
Overcloud failed to deploy, however suspect it wouldn't have include the fix anyway
as "latest" flag resulted in UC using a 6 days old build:
15  -p RHOS_TRUNK-15.0-RHEL-8-20190905.n.0

A build which predates ON_QA state of this bz,
Waiting for a newer build to retest.

Comment 18 Tzach Shefi 2019-09-15 17:44:38 UTC
Verified ON:
15-trunk  -p RHOS_TRUNK-15.0-RHEL-8-20190913.n.3 
--> qemu-img-3.1.0-30.module+el8.0.1+3755+6782b0ed.x86_64 

Passed automation test which failed before the fix.

Comment 22 errata-xmlrpc 2019-09-21 16:39:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:2853