[
https://issues.jboss.org/browse/WFCORE-1902?page=com.atlassian.jira.plugi...
]
Marek Kopecký commented on WFCORE-1902:
---------------------------------------
I agree with solution introduced in
https://github.com/wildfly/wildfly-core/pull/1948
I did some tests:
{noformat}
:read-attribute(name=nonsence)
----------------------
WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:
Step: step-3
Operation: /:read-attribute(name=nonsence)
Failure: WFLYCTL0201: Unknown attribute 'nonsence'
===================================
subsystem=jmx:read-attribute(name=show-model2)
----------------------
WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:
Step: step-3
Operation: /subsystem=jmx:read-attribute(name=show-model2)
Failure: WFLYCTL0201: Unknown attribute 'show-model2'
===================================
/subsystem=nonsence:read-attribute(name=product-name)
----------------------
Exception for run-batch: org.jboss.as.cli.CommandFormatException: Failed to get the list
of the operation properties: "WFLYCTL0030: No resource definition is registered for
address [("subsystem" => "nonsence")]": Failed to get the list
of the operation properties: "WFLYCTL0030: No resource definition is registered for
address [("subsystem" => "nonsence")]"
{noformat}
In my point of view, this could help users with analysis of wrong CLI script. [~jdenise]:
Thank you :)
Error messages from CLI batch should be more informative
--------------------------------------------------------
Key: WFCORE-1902
URL:
https://issues.jboss.org/browse/WFCORE-1902
Project: WildFly Core
Issue Type: Enhancement
Components: CLI
Affects Versions: 3.0.0.Alpha10
Reporter: Marek Kopecký
Assignee: Jean-Francois Denise
Labels: user_experience
*Description of problem:*
Error messages from CLI batch should be more informative
*Steps to Reproduce:*
{noformat}
cat <<EOF >a
batch
:read-attribute(name=product-version)
:read-attribute(name=product-name)
:read-attribute(name=nonsence)
:read-attribute(name=product-name)
run-batch
EOF
./jboss-cli.sh -c --file=a
{noformat}
*Actual results:*
{noformat}
The batch failed with the following error (you are remaining in the batch editing mode to
have a chance to correct the error): {"WFLYCTL0062: Composite operation failed and
was rolled back. Steps that failed:" => {"Operation step-3" =>
"WFLYCTL0201: Unknown attribute 'nonsence'"}}
{noformat}
*Expected results:*
I can imagine content like following could be helpful for troubleshooting:
{noformat}
{
"WFLYCTL0062: Composite operation failed and was rolled back. Steps that
failed:" => {
"Operation step-3" => {
"operation" => ":read-attribute(name=nonsence)"
"response" => "WFLYCTL0201: Unknown attribute
'nonsence'"
}
}
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)