summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-04-17 23:05:54 +0530
committerJeff Darcy <jeff@pl.atyp.us>2018-05-08 21:16:24 +0000
commit52d9b8bcd5b0aee750a22d53b46c804d608d8bba (patch)
treef21e11003d8d83fb6dd8bd19fea387152a08c3b6 /xlators/protocol/server
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 <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r--xlators/protocol/server/src/server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 254a5ca6c62..eef956cc21a 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1210,7 +1210,15 @@ server_init (xlator_t *this)
}
}
#endif
-
+ 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,
+ PS_MSG_VOL_FILE_OPEN_FAILED,
+ "volfile-id argument not given. "
+ "This is mandatory argument, defaulting to 'gluster'");
+ this->ctx->cmd_args.volfile_id = gf_strdup ("gluster");
+ }
FIRST_CHILD(this)->volfile_id
= gf_strdup (this->ctx->cmd_args.volfile_id);