From 5d74619329a2063efc8028536b3f8acc8e949f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 12 Jul 2019 16:13:17 +0200 Subject: [PATCH] Revert "conf: Remove volOptions for VIR_STORAGE_POOL_RBD" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel P. Berrangé --- 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 @@ + + + + + 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 @@ + + + + + -- GitLab