diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-05-28 15:31:36 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-05-28 22:52:54 -0700 |
commit | c7ed7013e9cc22b1e01d49580d138955034395a3 (patch) | |
tree | 9a8303bcb14b65ecf346b925933ada181e0b0f32 /xlators | |
parent | 98c39b1a7b65184db95ae690648765dd64fae8ee (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.
Change-Id: I83b1cd83b1cc56c6d221e6f2bbbf58af62cb56b9
BUG: 825872
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3472
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.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 e5cfdda30..c0597772b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -5007,6 +5007,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) { @@ -5041,10 +5042,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; } |