Hunt Xu has uploaded a new change for review.

Change subject: vdsmd.init: remove legacy judgment code
......................................................................

vdsmd.init: remove legacy judgment code

Judging whether vdsm is registered by checking whether the certificates
exist is legacy. With commit b94937438 there would always be
certificates for vdsm(first in the rpm, generated during startup with
commit 31f4565bd). This patch also merges two if isOvirt judgment
together to tidy the code and the certificates validation would be
performed only when they exist in case configure_libvirt is called
individually(not as a part in vdsm startup).

Change-Id: If51f73576975b13bcdaa110f679c3d5596ae5210
Signed-off-by: huntxu <[email protected]>
---
M vdsm/vdsmd.init.in
1 file changed, 5 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/12875/1

diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index 1f845c6..36b2f35 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -230,13 +230,6 @@
           echo "$key=$val" >> "$cfile"
     }
 
-    if isOvirt
-    then
-        . /usr/libexec/ovirt-functions
-    else
-        ovirt_store_config() { :; }
-    fi
-
     local lconf qconf ldconf
     local ssl=`$GETCONFITEM $CONF_FILE vars ssl true | tr A-Z a-z`
 
@@ -245,15 +238,14 @@
     ldconf="$4"
     qlconf="$5"
 
-    # do not configure ovirt nodes before registration
     if isOvirt
     then
-        if [ ! -f /etc/pki/vdsm/certs/vdsmcert.pem ]
-        then
-            log_failure_msg "$prog: Missing certificates, $prog not registered"
-            return 6
+        if [ -f /etc/pki/vdsm/certs/vdsmcert.pem ]
+            /usr/bin/vdsm-tool validate-ovirt-certs
         fi
-        /usr/bin/vdsm-tool validate-ovirt-certs
+        . /usr/libexec/ovirt-functions
+    else
+        ovirt_store_config() { :; }
     fi
 
     #


--
To view, visit http://gerrit.ovirt.org/12875
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If51f73576975b13bcdaa110f679c3d5596ae5210
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to