Bug 1284885
Summary: | [GSS](6.4.z) CLI Lists in non-interactive mode are erroneously split into multiple commands | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Tom Fonteyne <tfonteyn> |
Component: | CLI | Assignee: | Ryan Emerson <remerson> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Peter Mackay <pmackay> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.4.4 | CC: | bbaranow, bmaxwell, brian.stansberry, jboss-set, jtruhlar, msochure, pmackay, remerson |
Target Milestone: | CR1 | ||
Target Release: | EAP 6.4.11 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-17 13:13:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1361648 |
Description
Tom Fonteyne
2015-11-24 11:51:00 UTC
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. |