|
|
e3c68b |
From ec707e099d4e4338d1ea21560d367b02e6339532 Mon Sep 17 00:00:00 2001
|
|
|
e3c68b |
From: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
e3c68b |
Date: Mon, 1 Apr 2019 16:16:47 +0530
|
|
|
e3c68b |
Subject: [PATCH 39/52] cli: fix query to user during brick-mux selection
|
|
|
e3c68b |
|
|
|
e3c68b |
Label: DOWNSTREAM ONLY
|
|
|
e3c68b |
|
|
|
e3c68b |
Change-Id: I59472066b917ea2b23de72bcd91dc3e275d5e055
|
|
|
e3c68b |
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
|
|
|
e3c68b |
---
|
|
|
e3c68b |
cli/src/cli-cmd-parser.c | 33 +++++++++++++++++----------------
|
|
|
e3c68b |
1 file changed, 17 insertions(+), 16 deletions(-)
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
|
|
|
e3c68b |
index 541dc62..d9ccba1 100644
|
|
|
e3c68b |
--- a/cli/src/cli-cmd-parser.c
|
|
|
e3c68b |
+++ b/cli/src/cli-cmd-parser.c
|
|
|
e3c68b |
@@ -1693,23 +1693,24 @@ cli_cmd_volume_set_parse(struct cli_state *state, const char **words,
|
|
|
e3c68b |
goto out;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
}
|
|
|
e3c68b |
- }
|
|
|
e3c68b |
-
|
|
|
e3c68b |
- if ((strcmp (key, "cluster.brick-multiplex") == 0)) {
|
|
|
e3c68b |
- question = "Brick-multiplexing is supported only for "
|
|
|
e3c68b |
- "OCS converged or independent mode. Also it is "
|
|
|
e3c68b |
- "advised to make sure that either all "
|
|
|
e3c68b |
- "volumes are in stopped state or no bricks "
|
|
|
e3c68b |
- "are running before this option is modified."
|
|
|
e3c68b |
- "Do you still want to continue?";
|
|
|
e3c68b |
|
|
|
e3c68b |
- answer = cli_cmd_get_confirmation (state, question);
|
|
|
e3c68b |
- if (GF_ANSWER_NO == answer) {
|
|
|
e3c68b |
- gf_log ("cli", GF_LOG_ERROR, "Operation "
|
|
|
e3c68b |
- "cancelled, exiting");
|
|
|
e3c68b |
- *op_errstr = gf_strdup ("Aborted by user.");
|
|
|
e3c68b |
- ret = -1;
|
|
|
e3c68b |
- goto out;
|
|
|
e3c68b |
+ if ((strcmp (key, "cluster.brick-multiplex") == 0)) {
|
|
|
e3c68b |
+ question =
|
|
|
e3c68b |
+ "Brick-multiplexing is supported only for "
|
|
|
e3c68b |
+ "OCS converged or independent mode. Also it is "
|
|
|
e3c68b |
+ "advised to make sure that either all "
|
|
|
e3c68b |
+ "volumes are in stopped state or no bricks "
|
|
|
e3c68b |
+ "are running before this option is modified."
|
|
|
e3c68b |
+ "Do you still want to continue?";
|
|
|
e3c68b |
+
|
|
|
e3c68b |
+ answer = cli_cmd_get_confirmation (state, question);
|
|
|
e3c68b |
+ if (GF_ANSWER_NO == answer) {
|
|
|
e3c68b |
+ gf_log ("cli", GF_LOG_ERROR, "Operation "
|
|
|
e3c68b |
+ "cancelled, exiting");
|
|
|
e3c68b |
+ *op_errstr = gf_strdup ("Aborted by user.");
|
|
|
e3c68b |
+ ret = -1;
|
|
|
e3c68b |
+ goto out;
|
|
|
e3c68b |
+ }
|
|
|
e3c68b |
}
|
|
|
e3c68b |
}
|
|
|
e3c68b |
|
|
|
e3c68b |
--
|
|
|
e3c68b |
1.8.3.1
|
|
|
e3c68b |
|