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