summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-01-22 14:15:05 -0800
committerVijay Bellur <vbellur@redhat.com>2014-02-02 20:27:47 -0800
commit1e35bfa0b4085424a7572f812c3243e233a46fda (patch)
tree895adff7d75c037ce919fa51fe9fba34aeaceb4a
parentab55d60e2615bd47a9b7ad3da4e85ba1be4c3781 (diff)
mount.glusterfS/glusterfsd: Add dummy deprecated *fetch-attempts options
volfile-max-fetch-attempts and fetch-attempts were not deprecated properly at 'b610f1be7cd71b8f3e51c224c8b6fe0e7366c8cf'. Provide a way for backward compatibility for broken third party apps. Change-Id: I520d7bc775d67917cf149d7833a8e46bdf265d9d BUG: 1045309 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--glusterfsd/src/glusterfsd.c17
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in6
2 files changed, 23 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index d3234e8bc..cec56c16e 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -142,6 +142,9 @@ static struct argp_option gf_options[] = {
"Mount the filesystem with POSIX ACL support"},
{"selinux", ARGP_SELINUX_KEY, 0, 0,
"Enable SELinux label (extened attributes) support on inodes"},
+ {"volfile-max-fetch-attempts", ARGP_VOLFILE_MAX_FETCH_ATTEMPTS, "0",
+ OPTION_HIDDEN, "Maximum number of attempts to fetch the volfile"},
+
#ifdef GF_LINUX_HOST_OS
{"aux-gfid-mount", ARGP_AUX_GFID_MOUNT_KEY, 0, 0,
"Enable access to filesystem through gfid directly"},
@@ -879,6 +882,10 @@ parse_opts (int key, char *arg, struct argp_state *state)
cmd_args->debug_mode = ENABLE_DEBUG_MODE;
break;
+ case ARGP_VOLFILE_MAX_FETCH_ATTEMPTS:
+ cmd_args->max_connect_attempts = 1;
+ break;
+
case ARGP_DIRECT_IO_MODE_KEY:
if (!arg)
arg = "on";
@@ -1476,6 +1483,16 @@ parse_cmdline (int argc, char *argv[], glusterfs_ctx_t *ctx)
}
}
+ /*
+ This option was made obsolete but parsing it for backward
+ compatibility with third party applications
+ */
+ if (cmd_args->max_connect_attempts) {
+ gf_log ("glusterfs", GF_LOG_WARNING,
+ "obsolete option '--volfile-max-fetch-attempts"
+ " or fetch-attempts' was provided");
+ }
+
#ifdef GF_DARWIN_HOST_OS
if (cmd_args->mount_point)
cmd_args->mac_compat = GF_OPTION_DEFERRED;
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index bf89e9d52..c5cba10c4 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -234,6 +234,10 @@ start_glusterfs ()
done
fi
+ if [ -n "$volfile_max_fetch_attempts" ]; then
+ cmd_line=$(echo "$cmd_line --volfile-max-fetch-attempts=$volfile_max_fetch_attempts");
+ fi
+
if [ -n "$server_port" ]; then
cmd_line=$(echo "$cmd_line --volfile-server-port=$server_port");
fi
@@ -410,6 +414,8 @@ main ()
"backup-volfile-servers") backup_volfile_servers=$value ;;
## Place-holder backward compatibility
"backupvolfile-server") backupvolfile_server=$value ;;
+ "fetch-attempts") volfile_max_fetch_attempts=$value ;;
+ ## End backward compatibility
"congestion-threshold") cong_threshold=$value ;;
"xlator-option") xlator_option=$xlator_option" "$pair ;;
"fuse-mountopts") fuse_mountopts=$value ;;