path: root/xlators/protocol/server/src/server.c
diff options
authorAmar Tumballi <>2018-04-17 23:05:54 +0530
committerJeff Darcy <>2018-05-08 21:16:24 +0000
commit52d9b8bcd5b0aee750a22d53b46c804d608d8bba (patch)
treef21e11003d8d83fb6dd8bd19fea387152a08c3b6 /xlators/protocol/server/src/server.c
parented5a09e4aea7f64f9a43698955e24285a936f0c0 (diff)
protocol/server: don't assume there would be a volfile id
Earlier glusterfs never had an assumption someone would start it with right arguments, and brick processes would be spawned by a management layer. It just assume the role based on the volfile. Other than volfile, no other arguments should be technically mandatory for working of glusterfs. With this patch, that assumption holds true. Updates: github issue # 352 A note on why this particular issue for this basic sanity? As per the design of thin-arbiter/tie-breaker, it can be started independently on any machine, without need of glusterd. So, similar to 'glusterd', we should be able to spawn a process with any translator without options/volume id etc. fixes: bz#1569399 Change-Id: I5c0650fe0bfde35ad94ccba60e63f6cdcd1ae5ff Signed-off-by: Amar Tumballi <>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 254a5ca..eef956c 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1210,7 +1210,15 @@ server_init (xlator_t *this)
+ if (!this->ctx->cmd_args.volfile_id) {
+ /* In some use cases this is a valid case, but
+ document this to be annoying log in that case */
+ gf_msg (this->name, GF_LOG_WARNING, EINVAL,
+ "volfile-id argument not given. "
+ "This is mandatory argument, defaulting to 'gluster'");
+ this->ctx->cmd_args.volfile_id = gf_strdup ("gluster");
+ }
= gf_strdup (this->ctx->cmd_args.volfile_id);