diff options
author | Amar Tumballi <amar@gluster.com> | 2010-09-09 05:06:55 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-09 05:23:31 -0700 |
commit | 80439c92add5aa54ee628697d4b27c9b56692fd0 (patch) | |
tree | 5c8d48eb03a172133c9709f7adc3df13d1e0028a /xlators/mgmt/glusterd/src/glusterd.c | |
parent | d65c85001a6d57f6b147d565d45a704c890cfe08 (diff) |
glusterd: fix init time warnings
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1584 (starting glusterd for the first time gives warning logs)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1584
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 69ea9ed2c74..46efb874332 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -70,24 +70,25 @@ glusterd_opinfo_init () } static int -glusterd_uuid_init () +glusterd_uuid_init (int flag) { int ret = -1; char str[50] = {0,}; glusterd_conf_t *priv = NULL; priv = THIS->private; - ret = glusterd_retrieve_uuid (); - if (!ret) { - uuid_unparse (priv->uuid, str); - uuid_copy (glusterd_uuid, priv->uuid); - gf_log ("glusterd", GF_LOG_NORMAL, + if (!flag) { + ret = glusterd_retrieve_uuid (); + if (!ret) { + uuid_unparse (priv->uuid, str); + uuid_copy (glusterd_uuid, priv->uuid); + gf_log ("glusterd", GF_LOG_NORMAL, "retrieved UUID: %s", str); - return 0; + return 0; + } } - uuid_generate (glusterd_uuid); uuid_unparse (glusterd_uuid, str); @@ -233,6 +234,7 @@ init (xlator_t *this) char voldir [PATH_MAX] = {0,}; char dirname [PATH_MAX]; char cmd_log_filename [PATH_MAX] = {0,}; + int first_time = 0; dir_data = dict_get (this->options, "working-directory"); @@ -268,6 +270,7 @@ init (xlator_t *this) " ,errno = %d", dirname, errno); exit (1); } + first_time = 1; } gf_log (this->name, GF_LOG_NORMAL, "Using %s as working directory", @@ -390,7 +393,7 @@ init (xlator_t *this) this->private = conf; //this->ctx->top = this; - ret = glusterd_uuid_init (); + ret = glusterd_uuid_init (first_time); if (ret < 0) goto out; @@ -481,9 +484,18 @@ struct xlator_dumpops dumpops = { struct volume_options options[] = { - { .key = {"working-dir"}, + { .key = {"working-directory"}, .type = GF_OPTION_TYPE_PATH, }, + { .key = {"transport-type"}, + .type = GF_OPTION_TYPE_ANY, + }, + { .key = {"transport.*"}, + .type = GF_OPTION_TYPE_ANY, + }, + { .key = {"rpc-auth.*"}, + .type = GF_OPTION_TYPE_ANY, + }, { .key = {NULL} }, }; |