Browse code

Merge "Make unstack.sh more independently deterministic"

Jenkins authored on 2016/11/03 02:08:58
Showing 1 changed files
... ...
@@ -189,11 +189,13 @@ if [[ -n "$SCREEN" ]]; then
189 189
     fi
190 190
 fi
191 191
 
192
-# BUG: maybe it doesn't exist? We should isolate this further down.
193 192
 # NOTE: Cinder automatically installs the lvm2 package, independently of the
194
-# enabled backends. So if Cinder is enabled, we are sure lvm (lvremove,
195
-# /etc/lvm/lvm.conf, etc.) is here.
196
-if is_service_enabled cinder; then
193
+# enabled backends. So if Cinder is enabled, and installed successfully we are
194
+# sure lvm2 (lvremove, /etc/lvm/lvm.conf, etc.) is here.
195
+if is_service_enabled cinder && is_package_installed lvm2; then
196
+    # Using /bin/true here indicates a BUG - maybe the
197
+    # DEFAULT_VOLUME_GROUP_NAME doesn't exist?  We should
198
+    # isolate this further down in lib/cinder cleanup.
197 199
     clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
198 200
     clean_lvm_filter
199 201
 fi