From 1279dd9a6eba538d8823c6be30b863c7f85baeb3 Mon Sep 17 00:00:00 2001 From: Ben Swartzlander Date: Wed, 10 Feb 2016 13:45:53 -0500 Subject: [PATCH] Allow devstack plugin to work without Cinder The current devstack plugin has a hidden dependency on Cinder, even for drivers that don't require Cinder (such as LVM). This patch tries to eliminate that dependency. Also avoid editing cinder.conf when Cinder isn't present. Closes-Bug: 1553351 Change-Id: Iea2a83fc54412c18401e589ea0706ae95214ab9d --- devstack/files/debs/manila | 1 + devstack/files/rpms-suse/manila | 1 + devstack/files/rpms/manila | 1 + devstack/plugin.sh | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 devstack/files/debs/manila create mode 100644 devstack/files/rpms-suse/manila create mode 100644 devstack/files/rpms/manila diff --git a/devstack/files/debs/manila b/devstack/files/debs/manila new file mode 100644 index 0000000000..6f88eb9198 --- /dev/null +++ b/devstack/files/debs/manila @@ -0,0 +1 @@ +lvm2 diff --git a/devstack/files/rpms-suse/manila b/devstack/files/rpms-suse/manila new file mode 100644 index 0000000000..6f88eb9198 --- /dev/null +++ b/devstack/files/rpms-suse/manila @@ -0,0 +1 @@ +lvm2 diff --git a/devstack/files/rpms/manila b/devstack/files/rpms/manila new file mode 100644 index 0000000000..6f88eb9198 --- /dev/null +++ b/devstack/files/rpms/manila @@ -0,0 +1 @@ +lvm2 diff --git a/devstack/plugin.sh b/devstack/plugin.sh index aec050b17a..30c142c5ee 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -757,7 +757,7 @@ elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then fi # Cinder config update - if [[ -n "$CINDER_OVERSUBSCRIPTION_RATIO" ]]; then + if is_service_enabled cinder && [[ -n "$CINDER_OVERSUBSCRIPTION_RATIO" ]]; then CINDER_CONF=${CINDER_CONF:-/etc/cinder/cinder.conf} CINDER_ENABLED_BACKENDS=$(iniget $CINDER_CONF DEFAULT enabled_backends) for BN in ${CINDER_ENABLED_BACKENDS//,/ }; do