Browse code

Merge "Check if cinder is enabled before doing anything lvm2 related"

Jenkins authored on 2015/06/25 19:35:08
Showing 1 changed files
... ...
@@ -187,5 +187,10 @@ if [[ -n "$SCREEN" ]]; then
187 187
 fi
188 188
 
189 189
 # BUG: maybe it doesn't exist? We should isolate this further down.
190
-clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
191
-clean_lvm_filter
190
+# NOTE: Cinder automatically installs the lvm2 package, independently of the
191
+# enabled backends. So if Cinder is enabled, we are sure lvm (lvremove,
192
+# /etc/lvm/lvm.conf, etc.) is here.
193
+if is_service_enabled cinder; then
194
+    clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
195
+    clean_lvm_filter
196
+fi