summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-07-12 00:39:31 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-07-15 09:47:44 -0700
commitddcfe83b06b6498710c2d9d36027a8ad305b686e (patch)
tree1fb9352c77767f0739ab6de24dfd1e153f39afc8 /xlators/mgmt/glusterd/src/glusterd-utils.c
parentd407c1e6be61211799e3b0bc849134226dc35be7 (diff)
glusterd: Fix gsyncd upgrade issue
Backport of http://review.gluster.org/14898/ Problem: gluster upgrade is not generating new volfiles Cause: During upgrade, "glusterd --xlator-option *.upgrade=on -N" is run to generate new volfiles. It is run post 'glusterfs' rpm installation. The above command fails during upgrade if geo-replication is installed. This is because on glusterd start 'gsyncd' binary is called to configure geo-replication related stuff. Since 'glusterfs' rpm is installed prior to 'geo-rep' rpm, the 'gsyncd' binary used to glusterd upgrade command is of old version and hence it fails before generating new volfiles. Solution: Don't call geo-replication configure during upgrade/downgrade. Geo-replication configuration happens during start of glusterd after upgrade. Change-Id: Id58ea44ead9f69982f86fb68dc5b9ee3f6cd11a1 BUG: 1356439 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14898 (cherry picked from commit 1b998788ece8c8b52657e8b9aae65d3279690c5b) Reviewed-on: http://review.gluster.org/14916 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 02f6185d482..80477d49c26 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -6717,40 +6717,16 @@ glusterd_recreate_volfiles (glusterd_conf_t *conf)
}
int32_t
-glusterd_handle_upgrade_downgrade (dict_t *options, glusterd_conf_t *conf)
+glusterd_handle_upgrade_downgrade (dict_t *options, glusterd_conf_t *conf,
+ gf_boolean_t upgrade, gf_boolean_t downgrade)
{
int ret = 0;
char *type = NULL;
- gf_boolean_t upgrade = _gf_false;
- gf_boolean_t downgrade = _gf_false;
gf_boolean_t regenerate_volfiles = _gf_false;
gf_boolean_t terminate = _gf_false;
- ret = dict_get_str (options, "upgrade", &type);
- if (!ret) {
- ret = gf_string2boolean (type, &upgrade);
- if (ret) {
- gf_msg ("glusterd", GF_LOG_ERROR, 0,
- GD_MSG_STR_TO_BOOL_FAIL, "upgrade option "
- "%s is not a valid boolean type", type);
- ret = -1;
- goto out;
- }
- if (_gf_true == upgrade)
- regenerate_volfiles = _gf_true;
- }
-
- ret = dict_get_str (options, "downgrade", &type);
- if (!ret) {
- ret = gf_string2boolean (type, &downgrade);
- if (ret) {
- gf_msg ("glusterd", GF_LOG_ERROR, 0,
- GD_MSG_STR_TO_BOOL_FAIL, "downgrade option "
- "%s is not a valid boolean type", type);
- ret = -1;
- goto out;
- }
- }
+ if (_gf_true == upgrade)
+ regenerate_volfiles = _gf_true;
if (upgrade && downgrade) {
gf_msg ("glusterd", GF_LOG_ERROR, 0,