[ 
https://issues.apache.org/jira/browse/GEODE-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219291#comment-16219291
 ] 

ASF GitHub Bot commented on GEODE-3843:
---------------------------------------

srikanthmanvi closed pull request #959: GEODE-3843: Fix gfsh shutdown error 
message
URL: https://github.com/apache/geode/pull/959
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
index c89331a4c1..3ed8b406ad 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
@@ -60,6 +60,7 @@ public Result shutdown(
       @CliOption(key = CliStrings.SHUTDOWN__TIMEOUT, unspecifiedDefaultValue = 
DEFAULT_TIME_OUT,
           help = CliStrings.SHUTDOWN__TIMEOUT__HELP) int userSpecifiedTimeout,
       @CliOption(key = CliStrings.INCLUDE_LOCATORS, unspecifiedDefaultValue = 
"false",
+          specifiedDefaultValue = "true",
           help = CliStrings.INCLUDE_LOCATORS_HELP) boolean shutdownLocators) {
     try {
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
index 72ef5fa0d1..cc336a3107 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/i18n/CliStrings.java
@@ -2057,7 +2057,7 @@
   public static final String SHUTDOWN__MSG__CAN_NOT_SHUTDOWN_WITHIN_TIMEOUT =
       "Could not shutdown within timeout. Shutdown will continue in 
background";
   public static final String SHUTDOWN__MSG__NO_DATA_NODE_FOUND =
-      "No data node found for stopping. Please specify --include-locators 
option if you want locators to be stopped";
+      "No data node found for stopping. Please specify the --include-locators 
option if you want locators to be stopped";
 
   public static final String SHUTDOWN_TIMEDOUT =
       "Shutdown command timedout. Please manually check node status";
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
index 38e41180ad..50b7317b00 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/GfshParserParsingTest.java
@@ -362,4 +362,11 @@ public void testMultiLineCommand() throws Exception {
     assertThat(result.getParamValue("name")).isEqualTo("test");
     assertThat(result.getCommandName()).isEqualTo("start server");
   }
+
+  @Test
+  public void testShutdownWithOption() throws Exception {
+    String command = "shutdown --include-locators";
+    GfshParseResult result = parser.parse(command);
+    assertThat(result.getParamValue("include-locators")).isEqualTo("true");
+  }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> gfsh shutdown error message suggests non-existent option
> --------------------------------------------------------
>
>                 Key: GEODE-3843
>                 URL: https://issues.apache.org/jira/browse/GEODE-3843
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Dave Barnes
>            Assignee: Srikanth Manvi
>            Priority: Minor
>
> 1. Start gfsh.
> 2. Start a locator.
> 3. Issue the 'shutdown' command.
> gfsh prompts for 'do you really want to...', then issues an error message 
> alerting you to the lack of data nodes. OK so far.
> This is followed by a line recommending that you use '--shutdown-locators' to 
> stop your locator.
> Should be '--include-locators=true'.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to