From 3224a504e4b0331158b1a1538b488412bcaed3d6 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Thu, 22 Jun 2017 17:45:21 -0400 Subject: [PATCH] F #4809: Cleanup VIP if oned dies --- install.sh | 4 ++++ share/pkgs/CentOS7/opennebula.service | 1 + 2 files changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 58c12263e0..62feac215c 100755 --- a/install.sh +++ b/install.sh @@ -424,6 +424,7 @@ INSTALL_FILES=( ESX_FW_VNC_SHARE_FILES:$SHARE_LOCATION/esx-fw-vnc INSTALL_GEMS_SHARE_FILES:$SHARE_LOCATION ONETOKEN_SHARE_FILE:$SHARE_LOCATION + FOLLOWER_CLEANUP_SHARE_FILE:$SHARE_LOCATION HOOK_FT_FILES:$VAR_LOCATION/remotes/hooks/ft HOOK_RAFT_FILES:$VAR_LOCATION/remotes/hooks/raft COMMON_CLOUD_LIB_FILES:$LIB_LOCATION/ruby/cloud @@ -1301,8 +1302,11 @@ HOOK_RAFT_FILES="share/hooks/raft/vip.sh" INSTALL_GEMS_SHARE_FILES="share/install_gems/install_gems \ share/install_gems/Gemfile" + ONETOKEN_SHARE_FILE="share/onetoken/onetoken.sh" +FOLLOWER_CLEANUP_SHARE_FILE="share/hooks/raft/follower_cleanup" + #------------------------------------------------------------------------------- # OCA Files #------------------------------------------------------------------------------- diff --git a/share/pkgs/CentOS7/opennebula.service b/share/pkgs/CentOS7/opennebula.service index 2cc957ec8d..f4a91f84e0 100644 --- a/share/pkgs/CentOS7/opennebula.service +++ b/share/pkgs/CentOS7/opennebula.service @@ -21,6 +21,7 @@ ExecStartPre=/bin/chown oneadmin:oneadmin /var/log/one ExecStartPre=-/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula ExecStop=/bin/kill -TERM $MAINPID ExecStopPost=/bin/rm -f /var/lock/one/one +ExecStopPost=/usr/share/one/follower_cleanup PIDFile=/var/run/one/oned.pid [Install]