Installing CP4 on a EAP 6.4 which had some files modified: Login in the CLI and apply the patch: [standalone@localhost:9999 /] patch apply jboss-eap-6.4.4-patch.zip Conflicts detected: bin/init.d/jboss-as-domain.sh, bin/init.d/jboss-as-standalone.sh Use the --override-all, --override=[] or --preserve=[] arguments in order to resolve the conflict. Login in the CLI and apply the patch with the -preserve option: [standalone@localhost:9999 /] patch apply jboss-eap-6.4.4-patch.zip --preserve=bin/init.d/jboss-as-domain.sh,bin/init.d/jboss-as-standalone.sh { "outcome" : "success", "response-headers" : { "operation-requires-restart" : true, "process-state" : "restart-required" } } => all fine. But doing the same directly from bash: # ./jboss-cli.sh --connect --controller=localhost --commands="patch apply jboss-eap-6.4.4-patch.zip --preserve=bin/init.d/jboss-as-domain.sh,bin/init.d/jboss-as-standalone.sh" Username: user Password: Conflicts detected: bin/init.d/jboss-as-standalone.sh Use the --override-all, --override=[] or --preserve=[] arguments in order to resolve the conflict. Playing around with the options (qoutes, escaping) makes no difference. In this particular case the root cause was the init.d directory had been deleted, but this is of course irrelevant as using the command inside the CLI works ok.
The problem arises because commands entered in non-interactive mode are split by the "," character. Therefore, in the case of: "--commands="patch apply jboss-eap-6.4.4-patch.zip --preserve=bin/init.d/jboss-as-domain.sh,bin/init.d/jboss-as-standalone.sh"" the cli is incorrectly splitting the request into two distinct commands: 1. --commands="patch apply jboss-eap-6.4.4-patch.zip --preserve=bin/init.d/jboss-as-domain.sh 2. bin/init.d/jboss-as-standalone.sh The reason this behaviour is not observed in interactive mode is because multiple commands can not be specified. However, in non-interactive mode --commands=ls,pwd is valid and should result in the execution of ls followed by pwd. This problem is not restricted to the patch command, as it affects all commands entered in non-interactive mode that require a comma-separated list as an argument. So far this appears to be PatchHanlder.java and ASModuleHandler.java. Therefore I have renamed this BZ to better reflect the overarching issue. My proposed solution requires that lists containing > 1 value must be contained within [] brackets. This prevents the list from being perceived as multiple commands and allows the list to be passed to the appropriate handler where the [] brackets can be removed and the list processed as expected.
Example input for non-interactive mode with the above solution: ./bin/jboss-cli.sh --connect --controller=localhost --commands= ls,patch apply ~/Downloads/jboss-eap-6.4.4-patch.zip --override=[bin/init.d/jboss-as-domain.sh,bin/init.d/jboss-as-standalone.sh]
EAP 6 PR: https://github.com/jbossas/jboss-eap/pull/2643 EAP 7 PR: https://github.com/jbossas/wildfly-core-eap/pull/67 Community: https://github.com/wildfly/wildfly-core/pull/1297
Ryan Emerson <remerson> updated the status of jira JBEAP-2318 to Resolved
Ryan Emerson <remerson> updated the status of jira WFCORE-1199 to Reopened
Ryan Emerson <remerson> updated the status of jira JBEAP-2318 to Reopened
Brian Stansberry <brian.stansberry> updated the status of jira WFCORE-1199 to Resolved
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Jiri Pallich <jpallich> updated the status of jira JBEAP-2318 to Closed
Verified with EAP 6.4.11.CP.CR1
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.