Browse code

Merge "Ceph: undefine secret from nova.conf when deleting secret"

Jenkins authored on 2014/12/04 00:47:40
Showing 1 changed files
... ...
@@ -106,8 +106,13 @@ function cleanup_ceph {
106 106
         sudo rm -f ${CEPH_DISK_IMAGE}
107 107
     fi
108 108
     uninstall_package ceph ceph-common python-ceph libcephfs1 > /dev/null 2>&1
109
-    VIRSH_UUID=$(sudo virsh secret-list | awk '/^ ?[0-9a-z]/ { print $1 }')
110
-    sudo virsh secret-undefine ${VIRSH_UUID} >/dev/null 2>&1
109
+    if is_service_enabled cinder || is_service_enabled nova; then
110
+        local virsh_uuid=$(sudo virsh secret-list | awk '/^ ?[0-9a-z]/ { print $1 }')
111
+        sudo virsh secret-undefine ${virsh_uuid} >/dev/null 2>&1
112
+    fi
113
+    if is_service_enabled nova; then
114
+        iniset $NOVA_CONF libvirt rbd_secret_uuid ""
115
+    fi
111 116
 }
112 117
 
113 118
 # configure_ceph() - Set config files, create data dirs, etc