diff options
author | Rahul C S <rahulcs@redhat.com> | 2012-03-05 13:31:02 +0530 |
---|---|---|
committer | Rahul C S <rahulcs@redhat.com> | 2012-03-05 13:34:16 +0530 |
commit | b97a5bfcdf40bbf79173578172405235649c8829 (patch) | |
tree | 30f3376aa511f4b986eed674809e6e61d46ada05 | |
parent | a53faa6b9d92be769fad0d47cd7e6b7bc023fc3f (diff) |
Minor enhancements in how create_gluster_vol works
*Changes to exit program if peer probe is not successful.
*Flush firewall rules before doing peer probe.
*White-space cleanup in create_gluster_vol script.
Change-Id: Ia44fd76fa1e72160daa80ef7206cffc2bd267887
Signed-off-by: Rahul C S <rahulcs@redhat.com>
-rwxr-xr-x | perf-framework/create_gluster_vol | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/perf-framework/create_gluster_vol b/perf-framework/create_gluster_vol index fcb91ce..ce4a29e 100755 --- a/perf-framework/create_gluster_vol +++ b/perf-framework/create_gluster_vol @@ -15,6 +15,10 @@ function mgmt_vol_create() for brick in $BRICK_IP_ADDRS do ssh -l root $MGMT_NODE "$GF_BIN/gluster peer probe $brick" + if [ $? -ne 0 ]; then + echo "cluster not set up properly. Please check & restart." + exit 255; + fi done ssh -l root $MGMT_NODE "$@" ssh -l root $MGMT_NODE "$GF_BIN/gluster volume start $VOLNAME" @@ -45,22 +49,23 @@ function cleanup_brick() echo "Cleaning bricks..." for brick in $BRICK_IP_ADDRS -do +do cleanup_brick $brick & done wait -echo "Creating export directory..." +echo "Creating export directory & flushing firewall rules." for brick in $BRICK_IP_ADDRS -do +do ssh -l root $brick "mkdir -p $SERVER_EXPORT_DIR" + ssh -l root $brick "iptables -F" done # Start glusterd on all the bricks echo "Starting glusterd..." for brick in $BRICK_IP_ADDRS -do +do if [ $ENABLE_MEM_ACCT == "yes" ] then ssh -l root $brick "GLUSTERFS_DISABLE_MEM_ACCT=0 $GF_BIN/glusterd" @@ -74,7 +79,7 @@ done bricklist="" count=0 for brick in $BRICK_IP_ADDRS -do +do bricklist+="$brick:$SERVER_EXPORT_DIR " count=$((count+1)) done @@ -109,7 +114,7 @@ sleep 5 if [ $ENABLE_MEM_ACCT == "yes" ] then for brick in $BRICK_IP_ADDRS - do + do echo "Memory accounting status on : $brick -" ssh -l root $brick "\ echo \"x/x &gf_mem_acct_enable\" > gf_gdb_commands;\ |