[
https://issues.jboss.org/browse/WFCORE-876?page=com.atlassian.jira.plugin...
]
Alexey Loubyansky commented on WFCORE-876:
------------------------------------------
The bodies of if-else and try-catch-finally are batches, i.e. each body will be translated
into a composite operation.
When the CLI is in the batch mode, it doesn't execute entered operation requests but
adds them to the batch until run-batch command is invoked. Commands that don't support
batch mode are executed immediately outside the currently active batch (this is done
support ls, cd and other commands).
reload and shutdown commands do not support batch mode because they need to perform some
logic besides sending an operation request. So, in this case, :shutdown(restart=true)
should have been used instead.
Or the bodies of control flow blocks should not be batches.
Reload or Shutdown inside IF statement is performed before the
if/else block batch is executed
----------------------------------------------------------------------------------------------
Key: WFCORE-876
URL:
https://issues.jboss.org/browse/WFCORE-876
Project: WildFly Core
Issue Type: Bug
Components: CLI
Affects Versions: 2.0.0.Beta1
Reporter: Joe Wertz
Assignee: Alexey Loubyansky
Executing a reload or shutdown inside an if/else block results in the reload or restart
occurring before the other commands in the batch are executed.
{code}
if (outcome == success) of /subsystem=logging/logger=org.jboss.as.cli:read-resource()
/subsystem=logging:write-attribute(name=use-deployment-logging-config
shutdown --restart=true
end-if
{code}
This command will actually leave the server in a reload-required state. The shutdown, or
reload, will occur before the write-attribute is executed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)