Bug 1148642
| Summary: | JBoss CLI run-batch command cannot process files with comments or blank lines | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Bryan Parry <bparry> |
| Component: | CLI | Assignee: | Alexey Loubyansky <olubyans> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3.1 | CC: | brian.stansberry, kkhan |
| Target Milestone: | DR11 | ||
| Target Release: | EAP 6.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | |||
Verified on EAP 6.4.0.DR11 |
Description of problem: In the JBoss CLI tool, the "run-batch --file=script.cli" command cannot successfully process lines that start with "#" or blank lines. Comments and blank lines help readability when creating cli batch scripts. However, running the batch file containing comments/blank lines as a parameter to jboss-cli.sh works just fine (./jboss-cli.sh -c --file=script.cli). This difference in accepted syntax creates some confusion for users who are new to the CLI tool. Version-Release number of selected component (if applicable): 6.3.1 How reproducible: Always Steps to Reproduce: 1. Change directory to EAP_HOME/bin 2. Create a file named script.cli with the following contents: # this is a comment /system-property=test:add(value="with comment") 3. ./jboss-cli.sh -c 4. run-batch --file=script.cli Actual results: Failed to create batch from /opt/jboss/jboss-eap-6.3/bin/script.cli: '#' is not a valid operation name. Expected results: {"outcome" => "success"} Additional info: If there is no comment in the file, and a blank line instead, the error is: Failed to create batch from /opt/jboss/jboss-eap-6.3/bin/script.cli: The line is null or empty. My use case is that I want to connect with CLI in one window, edit my script.cli in another, and test my cli script as I edit. It is helpful to be connected using the CLI, so that I can verify resource attributes as I build out my script and still get the benefit of tab completion.