|
|
21ab4e |
From bb2084b4f610f56e6b45699ff34fea57f5dad50c Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
Date: Fri, 15 Sep 2017 19:01:53 +0530
|
|
|
21ab4e |
Subject: [PATCH 618/620] events : Add brick list in EVENT_VOLUME_CREATE
|
|
|
21ab4e |
|
|
|
21ab4e |
>Reviewed-on: https://review.gluster.org/18306
|
|
|
21ab4e |
>Reviewed-by: Prashanth Pai <ppai@redhat.com>
|
|
|
21ab4e |
>Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
>Reviewed-by: Aravinda VK <avishwan@redhat.com>
|
|
|
21ab4e |
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: Ibf87ae5ca57f9d27c036f329a30c8f81b51c52bf
|
|
|
21ab4e |
BUG: 1492077
|
|
|
21ab4e |
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/118559
|
|
|
21ab4e |
---
|
|
|
21ab4e |
cli/src/cli-cmd-parser.c | 4 ++--
|
|
|
21ab4e |
cli/src/cli-cmd-volume.c | 7 +++++--
|
|
|
21ab4e |
cli/src/cli.h | 2 +-
|
|
|
21ab4e |
3 files changed, 8 insertions(+), 5 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
|
|
|
21ab4e |
index 71af744..12717cd 100644
|
|
|
21ab4e |
--- a/cli/src/cli-cmd-parser.c
|
|
|
21ab4e |
+++ b/cli/src/cli-cmd-parser.c
|
|
|
21ab4e |
@@ -431,7 +431,7 @@ out:
|
|
|
21ab4e |
|
|
|
21ab4e |
int32_t
|
|
|
21ab4e |
cli_cmd_volume_create_parse (struct cli_state *state, const char **words,
|
|
|
21ab4e |
- int wordcount, dict_t **options)
|
|
|
21ab4e |
+ int wordcount, dict_t **options, char **brick_list)
|
|
|
21ab4e |
{
|
|
|
21ab4e |
dict_t *dict = NULL;
|
|
|
21ab4e |
char *volname = NULL;
|
|
|
21ab4e |
@@ -736,7 +736,7 @@ cli_cmd_volume_create_parse (struct cli_state *state, const char **words,
|
|
|
21ab4e |
goto out;
|
|
|
21ab4e |
|
|
|
21ab4e |
*options = dict;
|
|
|
21ab4e |
-
|
|
|
21ab4e |
+ *brick_list = bricks;
|
|
|
21ab4e |
out:
|
|
|
21ab4e |
if (ret) {
|
|
|
21ab4e |
gf_log ("cli", GF_LOG_ERROR, "Unable to parse create volume CLI");
|
|
|
21ab4e |
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
|
|
|
21ab4e |
index fac678a..3ec39fd 100644
|
|
|
21ab4e |
--- a/cli/src/cli-cmd-volume.c
|
|
|
21ab4e |
+++ b/cli/src/cli-cmd-volume.c
|
|
|
21ab4e |
@@ -200,6 +200,7 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
|
|
|
21ab4e |
int32_t type = GF_CLUSTER_TYPE_NONE;
|
|
|
21ab4e |
cli_local_t *local = NULL;
|
|
|
21ab4e |
char *trans_type = NULL;
|
|
|
21ab4e |
+ char *bricks = NULL;
|
|
|
21ab4e |
|
|
|
21ab4e |
proc = &cli_rpc_prog->proctable[GLUSTER_CLI_CREATE_VOLUME];
|
|
|
21ab4e |
|
|
|
21ab4e |
@@ -207,7 +208,8 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
|
|
|
21ab4e |
if (!frame)
|
|
|
21ab4e |
goto out;
|
|
|
21ab4e |
|
|
|
21ab4e |
- ret = cli_cmd_volume_create_parse (state, words, wordcount, &options);
|
|
|
21ab4e |
+ ret = cli_cmd_volume_create_parse (state, words, wordcount, &options,
|
|
|
21ab4e |
+ &bricks);
|
|
|
21ab4e |
|
|
|
21ab4e |
if (ret) {
|
|
|
21ab4e |
cli_usage_out (word->pattern);
|
|
|
21ab4e |
@@ -245,7 +247,8 @@ out:
|
|
|
21ab4e |
|
|
|
21ab4e |
CLI_STACK_DESTROY (frame);
|
|
|
21ab4e |
if (ret == 0) {
|
|
|
21ab4e |
- gf_event (EVENT_VOLUME_CREATE, "name=%s", (char *)words[2]);
|
|
|
21ab4e |
+ gf_event (EVENT_VOLUME_CREATE, "name=%s;bricks=%s",
|
|
|
21ab4e |
+ (char *)words[2], bricks);
|
|
|
21ab4e |
}
|
|
|
21ab4e |
return ret;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
diff --git a/cli/src/cli.h b/cli/src/cli.h
|
|
|
21ab4e |
index d271a8d..fa3cf88 100644
|
|
|
21ab4e |
--- a/cli/src/cli.h
|
|
|
21ab4e |
+++ b/cli/src/cli.h
|
|
|
21ab4e |
@@ -237,7 +237,7 @@ cli_submit_request (struct rpc_clnt *rpc, void *req, call_frame_t *frame,
|
|
|
21ab4e |
|
|
|
21ab4e |
int32_t
|
|
|
21ab4e |
cli_cmd_volume_create_parse (struct cli_state *state, const char **words,
|
|
|
21ab4e |
- int wordcount, dict_t **options);
|
|
|
21ab4e |
+ int wordcount, dict_t **options, char **bricks);
|
|
|
21ab4e |
|
|
|
21ab4e |
int32_t
|
|
|
21ab4e |
cli_cmd_volume_reset_parse (const char **words, int wordcount, dict_t **opt);
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|