Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #1934979 +++
Description of problem:
Convert nbd+tls image to remote nbd+tls failed.
Version-Release number of selected component (if applicable):
qemu-kvm-5.2.0-9.module+el8.4.0+10182+4161bd91.x86_64
kernel-4.18.0-291.el8.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Export nbd image with tls
-Convert source image
# qemu-nbd -t -e 3 --fork -f raw --object tls-creds-x509,id=nbd_system_luks_server,endpoint=server,dir=/etc/pki/qemu-nbd --tls-creds nbd_system_luks_server /home/nbd/nbd_system.luks
-Convert dst image
# qemu-nbd -t -p 10821 -e 3 --fork -f raw --object tls-creds-x509,id=nbd_stg_luks_server,endpoint=server,dir=/etc/pki/qemu-nbd --tls-creds nbd_stg_luks_server /home/nbd/nbd_stg.luks
2. Boot a guest with source image
# -blockdev node-name=nbd_image1,driver=nbd,auto-read-only=on,discard=unmap,server.type=inet,server.host=hp-z238-02.englab.nay.redhat.com,server.port=10809,tls-creds=image1_access,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_image1,driver=luks,read-only=off,key-secret=image1_encrypt0,cache.direct=on,cache.no-flush=off,file=nbd_image1 \
3. Convert image
# qemu-img convert --object secret,id=image1_encrypt0,data=redhat --object secret,id=convert_encrypt0,data=redhat --object tls-creds-x509,id=image1_access,endpoint=client,dir=/etc/pki/qemu-kvm --object tls-creds-x509,id=convert_access,endpoint=client,dir=/etc/pki/qemu-kvm -O luks -o key-secret=convert_encrypt0 'json:{"file": {"driver": "nbd", "server.type": "inet", "server.host": "hp-z238-02.englab.nay.redhat.com", "server.port": "10809", "tls-creds": "image1_access"}, "driver": "luks", "key-secret": "image1_encrypt0"}' nbd://hp-z238-02.englab.nay.redhat.com:10821
Actual results:
qemu-img: nbd://hp-z238-02.englab.nay.redhat.com:10821: error while converting luks: Protocol driver 'nbd' does not support image creation, and opening the image failed: TLS negotiation required before option 7 (go)
Did you forget a valid tls-creds?
server reported: Option 0x7 not permitted before TLS
Expected results:
Convert should be successful.
Additional info:
--- Additional comment from Klaus Heinrich Kiwi on 2021-06-15 13:40:25 UTC ---
Eric, were you able to take a look at this one? It's listed as high in priority.
Zix Chen, do you have results for this test in other releases? I.e., can you help us identify if this is a regression, and if so, when it was introduced?
--- Additional comment from on 2021-06-17 08:17:47 UTC ---
I checked the earliest version version on rhel8.4, the issue can be reproduced, if it is a regression, it could come from the earlier compose. I will keep looking on the earlier compose, maybe rhel 8.3 compose.
Version:
qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64
kernel-4.18.0-259.el8.x86_64
Steps:
1. Export nbd image with tls
qemu-img create -f raw /home/nbd/nbd_stg.raw 21G
/home/nbd/nbd_stg.raw, fmt=raw size=22548578304
54290 ? Ssl 0:00 qemu-nbd -t -p 10819 -e 3 --fork -f raw --object tls-creds-x509,id=nbd_stg_raw_server,endpoint=server,dir=/etc/pki/qemu-nbd --tls-creds nbd_stg_raw_server /home/nbd/nbd_stg.raw
2. Boot a guest with a local image
# qemu-img info /home/kvm_autotest_root/images/image_convert.raw
image: /home/kvm_autotest_root/images/image_convert.raw
file format: raw
virtual size: 20 GiB (21474836480 bytes)
disk size: 5.8 GiB
3. Convert image
# /usr/bin/qemu-img convert --object tls-creds-x509,id=remote_access,endpoint=client,dir=/etc/pki/qemu-kvm -f raw -O raw /home/kvm_autotest_root/images/image_convert.raw nbd://ibm-x3850x6-04.lab.eng.pek2.redhat.com:10819
qemu-img: nbd://ibm-x3850x6-04.lab.eng.pek2.redhat.com:10819: error while converting raw: Protocol driver 'nbd' does not support image creation, and opening the image failed: TLS negotiation required before option 7 (go)
Did you forget a valid tls-creds?
server reported: Option 0x7 not permitted before TLS
As this issue can be reproduced on rhel9, so I will clone this bug to rhel9.
Rhel9 reproduced version:
qemu-kvm-6.0.0-3.el9.x86_64
kernel-5.13.0-0.rc4.33.el9.x86_64
The error message is the same.