Bug 1724065
| Summary: | Fail to create raw format volume for rbd pool | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Han Han <hhan> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | gaojianan <jgao> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.1 | CC: | chhu, dyuan, jdenemar, jtomko, lcheng, lmen, meili, xuzhang, yalzhang |
| Target Milestone: | rc | Keywords: | Automation, Regression, TestBlocker |
| Target Release: | 8.0 | Flags: | knoel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.6.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-11-06 07:17:15 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: | |||
It seems we don't even parse the format type since:
commit 035db37394ad11a39d47f8bd2b6a8a2734283cbf
Author: John Ferlan <jferlan>
CommitDate: 2019-03-06 11:12:48 -0500
conf: Remove volOptions for VIR_STORAGE_POOL_RBD
The rbd pool is documented as not using the volume type,
so let's just remove it.
Signed-off-by: John Ferlan <jferlan>
ACKed-by: Michal Privoznik <mprivozn>
git describe: v5.1.0-108-g035db37394 contains: v5.2.0-rc1~313
I believe this patch should fix it, but I have not tested it: https://www.redhat.com/archives/libvir-list/2019-July/msg00811.html commit 5d74619329a2063efc8028536b3f8acc8e949f88
Author: Ján Tomko <jtomko>
CommitDate: 2019-07-12 17:09:43 +0200
Revert "conf: Remove volOptions for VIR_STORAGE_POOL_RBD"
This reverts commit 035db37394ad11a39d47f8bd2b6a8a2734283cbf
Even though we only allow using RBD with raw volumes,
removing the options and the default format causes our
parser not to fill out the volume format and the backend code
rejects creating a non-raw volume.
Re-introduce the volume options to fix volume creation while
erroring out on requests to use non-raw formats.
https://bugzilla.redhat.com/show_bug.cgi?id=1724065
Signed-off-by: Ján Tomko <jtomko>
Reviewed-by: Daniel P. Berrangé <berrange>
git describe: v5.5.0-124-g5d74619329
Verified on :
1. Prepare a running rbd pool:
# virsh pool-dumpxml ceph
<pool type='rbd'>
<name>ceph</name>
<uuid>47c1faee-0207-e741-f5ae-d9b019b98fe2</uuid>
<capacity unit='bytes'>203909201920</capacity>
<allocation unit='bytes'>18446744062972134192</allocation>
<available unit='bytes'>212010708992</available>
<source>
<host name='10.73.224.204' port='6789'/>
<name>rbd</name>
<auth type='ceph' username='admin'>
<secret uuid='e0996384-add4-44d3-a776-374fd6ba87e5'/>
</auth>
</source>
</pool>
2. Prepare a vol xml:
# cat /tmp/rbd-vol.xml
<volume >
<name>vol-test1.img</name>
<source> </source>
<capacity unit='bytes'>5368709120</capacity>
<allocation unit='bytes'>5368709120</allocation>
<target>
<format type='raw'/>
</target>
</volume>
3. Create vol for the rbd pool:
# virsh -k0 vol-create ceph rbd.xml
Vol vol-test1.img created from rbd.xml
# virsh vol-info --pool ceph vol-test1.img
Name: vol-test1.img
Type: network
Capacity: 5.00 GiB
Allocation: 5.00 GiB
Work as expected
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/RHBA-2019:3723 |
Description of problem: As above Version-Release number of selected component (if applicable): libvirt-5.4.0-1.module+el8.1.0+3304+7eb41d5f.x86_64 librbd1-12.2.7-9.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a running rbd pool: # virsh pool-dumpxml ceph <pool type='rbd'> <name>ceph</name> <uuid>47c1faee-0207-e741-f5ae-d9b019b98fe2</uuid> <capacity unit='bytes'>203909201920</capacity> <allocation unit='bytes'>18446744062972134192</allocation> <available unit='bytes'>212010708992</available> <source> <host name='10.73.224.204' port='6789'/> <name>rbd</name> <auth type='ceph' username='admin'> <secret uuid='5720c01b-9bee-4620-8048-e00854e4eccf'/> </auth> </source> </pool> 2. Prepare a vol xml: # cat /tmp/rbd-vol.xml <volume > <name>vol-test.img</name> <source> </source> <capacity unit='bytes'>5368709120</capacity> <allocation unit='bytes'>5368709120</allocation> <target> <format type='raw'/> </target> </volume> 3. Create vol for the rbd pool: # virsh -k0 vol-create ceph /tmp/rbd-vol.xml error: Failed to create vol from /tmp/rbd-vol.xml error: unsupported configuration: only RAW volumes are supported by this storage pool Actual results: As above Expected results: Vol created without error Additional info: The libvirt storage log: ➜ ~ tail -f /var/log/libvirt/libvirtd.log 2019-06-26 07:56:54.097+0000: 26646: debug : virStoragePoolLookupByName:363 : conn=0x7f2f540055b0, name=ceph 2019-06-26 07:56:54.097+0000: 26642: debug : virStoragePoolGetXMLDesc:1062 : pool=0x7f2f680070e0, flags=0x0 2019-06-26 07:56:54.097+0000: 26643: debug : virConnectUnregisterCloseCallback:1410 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:56:54.098+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f540055b0 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpen:1106 : name= 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:882 : Trying to probe for default URI 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:889 : QEMU driver URI probe returned 'qemu:///system' 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:927 : Split "qemu:///system" to URI components: scheme qemu server <null> user <null> port 0 path /system 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 0 (Test) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 1 (ESX) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 2 (remote) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1012 : Matching any URI scheme for 'qemu' 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1035 : driver 2 remote returned DECLINED 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 3 (network) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 4 (interface) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 5 (secret) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 6 (storage) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 7 (nodedev) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 8 (nwfilter) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1008 : No matching URI scheme 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:984 : trying driver 9 (QEMU) ... 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:999 : Checking for supported URI schemes 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1002 : Matched URI scheme 'qemu' 2019-06-26 07:58:15.365+0000: 26645: debug : virConnectOpenInternal:1035 : driver 9 QEMU returned SUCCESS 2019-06-26 07:58:15.365+0000: 26643: debug : virConnectGetURI:255 : conn=0x7f2f58002d10 2019-06-26 07:58:15.366+0000: 26644: debug : virConnectRegisterCloseCallback:1375 : conn=0x7f2f58002d10 2019-06-26 07:58:15.366+0000: 26645: debug : virStoragePoolLookupByName:363 : conn=0x7f2f58002d10, name=ceph 2019-06-26 07:58:15.366+0000: 26643: debug : virStorageVolCreateXML:1499 : pool=0x7f2f60007eb0, xmlDesc=<volume > <name>vol-test.img</name> <source> </source> <capacity unit='bytes'>5368709120</capacity> <allocation unit='bytes'>5368709120</allocation> <target> <format type='raw'/> </target> </volume> , flags=0x0 2019-06-26 07:58:15.366+0000: 26643: error : virStorageBackendRBDCreateVol:905 : unsupported configuration: only RAW volumes are supported by this storage pool 2019-06-26 07:58:15.367+0000: 26642: debug : virConnectUnregisterCloseCallback:1410 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 2019-06-26 07:58:15.368+0000: 26641: debug : virConnectClose:1227 : conn=0x7f2f58002d10 Thanks lcheng for discovering this bug via libvirt-python test api Not reproduce on rhel-7.7(libvirt-4.5.0-23.virtcov.el7.x86_64)