CLOUDSTACK-2682: Sleep 1 second before switch to BACKUP

To prevent backup.sh preempt master.sh when keepalived switch to MASTER then
back to BACKUP immediately.

Since it would take at least 3 seconds for BACKUP to switch to MASTER(vrrp
timeout), the fix won't cause chaos when keepalive try to switch to MASTER.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a21a4e5a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a21a4e5a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a21a4e5a

Branch: refs/heads/master
Commit: a21a4e5ac43af0f225b6e56e3e73ea7e570510d9
Parents: e3a3286
Author: Sheng Yang <[email protected]>
Authored: Fri May 24 17:10:55 2013 -0700
Committer: Sheng Yang <[email protected]>
Committed: Fri May 24 17:10:55 2013 -0700

----------------------------------------------------------------------
 .../config/root/redundant_router/backup.sh.templ   |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a21a4e5a/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ
----------------------------------------------------------------------
diff --git 
a/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ 
b/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ
index 7a1bd44..32c811b 100644
--- a/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ
+++ b/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ
@@ -16,6 +16,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+sleep 1
+
 source /root/func.sh
 
 lock="biglock"


Reply via email to