diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2013-07-24 13:16:08 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-09-06 15:56:34 -0700 |
commit | b610f1be7cd71b8f3e51c224c8b6fe0e7366c8cf (patch) | |
tree | 131c4eed6ab553961340013335bc17b634597031 /libglusterfs | |
parent | 94fdc3dd79fa052ba3eb8951fe5c4ddf9dd1c6e8 (diff) |
glusterfsd: Round robin DNS should not be relied upon with
config service availability for clients.
Backupvolfile server as it stands is slow and prone to errors
with mount script and its combination with RRDNS. Instead in
theory it should use all the available nodes in 'trusted pool'
by default (Right now we don't have a mechanism in place for
this)
Nevertheless this patch provides a scenario where a list of
volfile-server can be provided on command as shown below
-----------------------------------------------------------------
$ glusterfs -s server1 .. -s serverN --volfile-id=<volname> \
<mount_point>
-----------------------------------------------------------------
OR
-----------------------------------------------------------------
$ mount -t glusterfs -obackup-volfile-servers=<server2>: \
<server3>:...:<serverN> <server1>:/<volname> <mount_point>
-----------------------------------------------------------------
Here ':' is used as a separator for mount script parsing
Now these will be remembered and recursively attempted for
fetching vol-file until exhausted. This would ensure that the
clients get 'volume' configs in a consistent manner avoiding the
need to poll through RRDNS.
Change-Id: If808bb8a52e6034c61574cdae3ac4e7e83513a40
BUG: 986429
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5400
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index ede208b3825..068b307e1c7 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -294,6 +294,11 @@ struct _xlator_cmdline_option { }; typedef struct _xlator_cmdline_option xlator_cmdline_option_t; +struct _server_cmdline { + struct list_head list; + char *volfile_server; +}; +typedef struct _server_cmdline server_cmdline_t; #define GF_OPTION_ENABLE _gf_true #define GF_OPTION_DISABLE _gf_false @@ -301,9 +306,12 @@ typedef struct _xlator_cmdline_option xlator_cmdline_option_t; struct _cmd_args { /* basic options */ - char *volfile_server; - char *volfile; - char *log_server; + char *volfile_server; + server_cmdline_t *curr_server; + /* List of backup volfile servers, including original */ + struct list_head volfile_servers; + char *volfile; + char *log_server; gf_loglevel_t log_level; char *log_file; int32_t max_connect_attempts; @@ -322,14 +330,14 @@ struct _cmd_args { int enable_ino32; int worm; int mac_compat; - int fopen_keep_cache; - int gid_timeout; + int fopen_keep_cache; + int gid_timeout; int aux_gfid_mount; - struct list_head xlator_options; /* list of xlator_option_t */ + struct list_head xlator_options; /* list of xlator_option_t */ - /* fuse options */ - int fuse_direct_io_mode; - char *use_readdirp; + /* fuse options */ + int fuse_direct_io_mode; + char *use_readdirp; int volfile_check; double fuse_entry_timeout; double fuse_negative_timeout; @@ -343,7 +351,7 @@ struct _cmd_args { unsigned uid_map_root; int background_qlen; int congestion_threshold; - char *fuse_mountopts; + char *fuse_mountopts; /* key args */ char *mount_point; @@ -353,7 +361,6 @@ struct _cmd_args { int brick_port; char *brick_name; int brick_port2; - }; typedef struct _cmd_args cmd_args_t; |