[PATCH 3/4] Revert "conf: Remove volOptions for VIR_STORAGE_POOL_RBD"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/storage_conf.c                           | 5 +++++
 tests/storagepoolcapsschemadata/poolcaps-fs.xml   | 5 +++++
 tests/storagepoolcapsschemadata/poolcaps-full.xml | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 397bd66870..05055cdc29 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -241,6 +241,11 @@ static virStoragePoolTypeInfo poolTypeInfo[] = {
                    VIR_STORAGE_POOL_SOURCE_NETWORK |
                    VIR_STORAGE_POOL_SOURCE_NAME),
       },
+      .volOptions = {
+          .defaultFormat = VIR_STORAGE_FILE_RAW,
+          .formatFromString = virStorageVolumeFormatFromString,
+          .formatToString = virStorageFileFormatTypeToString,
+      }
     },
     {.poolType = VIR_STORAGE_POOL_SHEEPDOG,
      .poolOptions = {
diff --git a/tests/storagepoolcapsschemadata/poolcaps-fs.xml b/tests/storagepoolcapsschemadata/poolcaps-fs.xml
index 6513ea621a..182fa398f5 100644
--- a/tests/storagepoolcapsschemadata/poolcaps-fs.xml
+++ b/tests/storagepoolcapsschemadata/poolcaps-fs.xml
@@ -145,6 +145,11 @@
   <pool type='mpath' supported='no'>
   </pool>
   <pool type='rbd' supported='no'>
+    <volOptions>
+      <defaultFormat type='raw'/>
+      <enum name='targetFormatType'>
+      </enum>
+    </volOptions>
   </pool>
   <pool type='sheepdog' supported='no'>
   </pool>
diff --git a/tests/storagepoolcapsschemadata/poolcaps-full.xml b/tests/storagepoolcapsschemadata/poolcaps-full.xml
index 32003dd608..980c6d210e 100644
--- a/tests/storagepoolcapsschemadata/poolcaps-full.xml
+++ b/tests/storagepoolcapsschemadata/poolcaps-full.xml
@@ -145,6 +145,11 @@
   <pool type='mpath' supported='yes'>
   </pool>
   <pool type='rbd' supported='yes'>
+    <volOptions>
+      <defaultFormat type='raw'/>
+      <enum name='targetFormatType'>
+      </enum>
+    </volOptions>
   </pool>
   <pool type='sheepdog' supported='yes'>
   </pool>
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux