You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/01/16 08:08:50 UTC

[cloudstack] 02/02: restart logic is not necessary, the agent will attempt reconnect when old ks/certs are invalid

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch agent-reconnect-fix
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 919bb3959b045e158d629015b76101785357fb49
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Wed Jan 16 13:38:19 2019 +0530

    restart logic is not necessary, the agent will attempt reconnect when old ks/certs are invalid
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 scripts/util/keystore-cert-import | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/scripts/util/keystore-cert-import b/scripts/util/keystore-cert-import
index 6a2f1ac..424ab4a 100755
--- a/scripts/util/keystore-cert-import
+++ b/scripts/util/keystore-cert-import
@@ -41,12 +41,6 @@ fi
 # Use a new keystore file
 NEW_KS_FILE="$KS_FILE.new"
 
-# Check/store old KS state
-OLD_KS_FILE_EXISTS=false
-if [ -f $KS_FILE ]; then
-    OLD_KS_FILE_EXISTS=true
-fi
-
 # Import certificate
 if [ ! -z "${CERT// }" ]; then
     echo "$CERT" > "$CERT_FILE"
@@ -104,10 +98,6 @@ if [ -f "$SYSTEM_FILE" ]; then
     chmod 755 /usr/local/share/ca-certificates/cloudstack
     chmod 644 /usr/local/share/ca-certificates/cloudstack/ca.crt
     update-ca-certificates > /dev/null 2>&1 || true
-    # Restart cloud service if keystore was changed
-    if [ "$MODE" == "ssh" ] && $OLD_KS_FILE_EXISTS; then
-        systemctl restart cloud > /dev/null 2>&1
-    fi
 fi
 
 # Fix file permission