diff options
| author | jiffin tony thottan <jthottan@redhat.com> | 2015-12-07 14:38:54 +0530 | 
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2016-08-10 21:07:00 -0700 | 
| commit | 89ae9c91c39e64d26099f6f9c1ff2e0e880d4b6e (patch) | |
| tree | 15c65700504c53d90b4e6919f67b87ea5601fb9d /cli | |
| parent | 9fec821d74204fc202a09da6044745b8ca584696 (diff) | |
cli : provide prompt for the nfs-ganesha disable cli
Presently, when we are executing the command "gluster nfs-ganesha disable",
the disable of nfs-ganesha cluster starts working whereas, in some cases
the user may not want to disable the cluster. So we shall let him know by
giving a prompt to let him say "yes or no" for going ahead with the disable
procedures.
	Backport of http://review.gluster.org/13450
> Change-Id: I860dad1479f7ca16bc2736b8056b609473bef65f
> BUG: 1289031
> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
> Reviewed-on: http://review.gluster.org/13450
> Smoke: Gluster Build System <jenkins@build.gluster.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Signed-off-by: Muthu-vigneshwaran <mvignesh@redhat.com>
Change-Id: I9b80ce1316cbba641b55cefe7870f4a67d59eb90
BUG: 1364382
Signed-off-by: Muthu-vigneshwaran <mvignesh@redhat.com>
Reviewed-on: http://review.gluster.org/15096
Tested-by: Muthu Vigneshwaran
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Tested-by: jiffin tony Thottan <jthottan@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 27 | 
1 files changed, 16 insertions, 11 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 64f526a7aae..692bd26e969 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -881,18 +881,23 @@ cli_cmd_ganesha_parse (struct cli_state *state,                  goto out;          } -        question = "Enabling NFS-Ganesha requires Gluster-NFS to be" -                   " disabled across the trusted pool. Do you " -                   "still want to continue?\n"; -          if (strcmp (value, "enable") == 0) { -                answer = cli_cmd_get_confirmation (state, question); -                if (GF_ANSWER_NO == answer) { -                        gf_log ("cli", GF_LOG_ERROR, "Global operation " -                                "cancelled, exiting"); -                        ret = -1; -                        goto out; -                } +                question = "Enabling NFS-Ganesha requires Gluster-NFS to be" +                           " disabled across the trusted pool. Do you " +                           "still want to continue?\n"; + +        } else if (strcmp (value, "disable") == 0) { +                question = "Disabling NFS-Ganesha will tear down entire " +                           "ganesha cluster across the trusted pool. Do you " +                           "still want to continue?\n"; +        } + +        answer = cli_cmd_get_confirmation (state, question); +        if (GF_ANSWER_NO == answer) { +                gf_log ("cli", GF_LOG_ERROR, "Global operation " +                        "cancelled, exiting"); +                ret = -1; +                goto out;          }          cli_out ("This will take a few minutes to complete. Please wait ..");  | 
