]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Revert "conf: Remove volOptions for VIR_STORAGE_POOL_RBD"
authorJán Tomko <jtomko@redhat.com>
Fri, 12 Jul 2019 14:13:17 +0000 (16:13 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 12 Jul 2019 15:09:43 +0000 (17:09 +0200)
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/storage_conf.c
tests/storagepoolcapsschemadata/poolcaps-fs.xml
tests/storagepoolcapsschemadata/poolcaps-full.xml

index 397bd66870df25b862aac3bf4660bc474d9f295d..05055cdc2984379f751be048135fc7b5fa6d33e5 100644 (file)
@@ -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 = {
index 6513ea621aa7b71e5508c49405d1c982691f03ee..182fa398f53c82ac36133dd0acbff105f788d735 100644 (file)
   <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>
index 32003dd608438e058e32c56fe2d80434536dff45..980c6d210e5093ee51b00a7f6a1eaf1397f17ef5 100644 (file)
   <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>