diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-05-28 15:31:36 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-06-01 15:37:32 -0700 |
commit | 1904ef07f6b0f71e4b01a505c95606a7e364596e (patch) | |
tree | 786c452905685773386492940d234e2064580332 /xlators | |
parent | 1d799568db8e5dc068795c53b864aa355040be15 (diff) |
glusterd: regenerate brick vol-files on upgrade
If upgrade/downgrade option is set in glusterd it terminates
after the volfiles are regenerated. No need for 'sleep 10'
hack anymore.
BUG: 825872
Change-Id: I12e666eb871aad7e7efa954b9307993952745d92
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3482
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index b3b39a1f59b..da778f1e230 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4984,6 +4984,7 @@ glusterd_handle_upgrade_downgrade (dict_t *options, glusterd_conf_t *conf) gf_boolean_t upgrade = _gf_false; gf_boolean_t downgrade = _gf_false; gf_boolean_t regenerate_brick_volfiles = _gf_false; + gf_boolean_t terminate = _gf_false; ret = dict_get_str (options, "upgrade", &type); if (!ret) { @@ -5018,10 +5019,14 @@ glusterd_handle_upgrade_downgrade (dict_t *options, glusterd_conf_t *conf) if (!upgrade && !downgrade) ret = 0; + else + terminate = _gf_true; if (regenerate_brick_volfiles) { ret = glusterd_recreate_bricks (conf); } out: + if (terminate && (ret == 0)) + kill (getpid(), SIGTERM); return ret; } |