Revision 680d49a2

View differences:

install.sh
270 270
          $VAR_LOCATION/remotes/tm/iscsi_libvirt \
271 271
          $VAR_LOCATION/remotes/hooks \
272 272
          $VAR_LOCATION/remotes/hooks/ft \
273
          $VAR_LOCATION/remotes/hooks/raft \
273 274
          $VAR_LOCATION/remotes/datastore \
274 275
          $VAR_LOCATION/remotes/datastore/dummy \
275 276
          $VAR_LOCATION/remotes/datastore/fs \
......
418 419
    INSTALL_GEMS_SHARE_FILES:$SHARE_LOCATION
419 420
    ONETOKEN_SHARE_FILE:$SHARE_LOCATION
420 421
    HOOK_FT_FILES:$VAR_LOCATION/remotes/hooks/ft
422
    HOOK_RAFT_FILES:$VAR_LOCATION/remotes/hooks/raft
421 423
    COMMON_CLOUD_LIB_FILES:$LIB_LOCATION/ruby/cloud
422 424
    CLOUD_AUTH_LIB_FILES:$LIB_LOCATION/ruby/cloud/CloudAuth
423 425
    ECO_LIB_FILES:$LIB_LOCATION/ruby/cloud/econe
......
1244 1246
HOOK_FT_FILES="share/hooks/ft/host_error.rb \
1245 1247
               share/hooks/ft/fence_host.sh \
1246 1248
               share/hooks/ft/delete_poweroff_vms.rb"
1249
#-------------------------------------------------------------------------------
1250
# HOOK RAFT scripts, to be installed under $VAR_LOCATION/remotes/hooks/raft
1251
#-------------------------------------------------------------------------------
1252

  
1253
HOOK_RAFT_FILES="share/hooks/raft/leader.sh \
1254
                 share/hooks/raft/follower.sh"
1247 1255

  
1248 1256
#-------------------------------------------------------------------------------
1249 1257
# Installation scripts, to be installed under $SHARE_LOCATION
share/hooks/raft/follower.sh
1
#!/bin/bash -e
2

  
3
DIR=`dirname $0`
4
cd $DIR
5
cd ../../../../
6

  
7
SERVER=$(basename `pwd`)
8

  
9
echo "`date +'%F %H:%M:%S'` [$SERVER] FOLLOWER HOOK" >> /tmp/raft_hooks.log
10

  
11
exit 0
share/hooks/raft/leader.sh
1
#!/bin/bash -e
2

  
3
DIR=`dirname $0`
4
cd $DIR
5
cd ../../../../
6

  
7
SERVER=$(basename `pwd`)
8

  
9
echo "`date +'%F %H:%M:%S'` [$SERVER] LEADER HOOK" >> /tmp/raft_hooks.log
10

  
11
exit 0

Also available in: Unified diff