The "Shut down a standalone server gracefully" bullet specifies:
:shutdown(timeout=60)
That should be
shutdown --timeout=60
Invoking the low-level :shutdown op against the process you are connected to has the same issues as invoking the low-level :reload op. The process as part of executing the operation will close the connection to the CLI and that can cause problems. The high level 'shutdown' and 'reload' commands trigger logic in the CLI client that deals with this.
There are two cases where the CLI may be shutting down the process it is connected to and we should avoid documenting the low level operation:
1) The standalone server case, as above. Another op format that's equivalent is to start with a leading '/':
/:shutdown(timeout=60)
(Note the presence of 'timeout' param is irrelevant to what I'm talking about in this JIRA.)
2) Shutting down the host controller you are connected to:
/host=foo:shutdown
Instead use
shutdown --host=foo
(It's possible 'foo' is not the host your are connected to, i.e. you are connected to the master HC and 'foo' is a slave. In that case there would be no connection problem, but the high level command works regardless, so always preferring that in docs is better.)
Note that these or other similar ops that affect domain mode servers are not problematic:
/host=master/server-config=server-one:stop
/server-group=main-server-group:stop-servers(timeout=60)
A CLI is never connected to a domain-mode server. It's always connected to an HC. If the CLI tells the HC to stop or reload servers, the HC deals with any connection issues between itself and the server, and the CLI client is not impacted.
- is related to
-
JBEAP-15511 [DOC] Promote high level "reload" operation over the low level ":reload" one
- Closed