summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfs.spec.in7
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c5
2 files changed, 8 insertions, 4 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 8d0174840..e607c811e 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -325,11 +325,10 @@ if [ $? -eq 0 ]; then
killall glusterd &> /dev/null
#add marker translator
- glusterd --xlator-option *.upgrade=on
+ glusterd --xlator-option *.upgrade=on -N
+ glusterd
else
- glusterd --xlator-option *.upgrade=on
- sleep 10
- killall glusterd &> /dev/null
+ glusterd --xlator-option *.upgrade=on -N
fi
%preun server
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index b3b39a1f5..da778f1e2 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;
}