Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16788

[GSS](7.2.z) WFCORE-4460 - jboss-cli.sh doesn't return json when the output command is 'failed'

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.2.0.GA
    • Fix Version/s: 7.2.4.CR1, 7.2.4.GA
    • Component/s: CLI
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide

      Step 1. Restart a JBoss server or host;

      Step 2. During the upstart of the server/host, run the command:

      /opt/jboss/jboss7_2/jboss-eap-7.2/bin/jboss-cli.sh --connect --controller=localhost:9990 --command="/host=/server=/deployment=*/:read-resource(recursive=false,include-runtime=true)" --output-json

      or equivalent for your environment. Notice that the response will NOT be in JSON-format, it will be in the DMR format.

      The following output was generated following the above steps:

      [tosorio@localhost bin]$ ./jboss-cli.sh --connect --controller=localhost:9990 --command="/host=/server=''/deployment=*/:read-resource(recursive=false,include-runtime=true)" --output-json
      {
      "outcome" => "failed",
      "result" => [{
      "address" => [
      ("host" => "master"),
      ("server" => "server-two"),
      ("deployment" => "fabrica.war")
      ],
      "outcome" => "failed",
      "result" => {
      "content" => [{
      "hash" => bytes

      { 0x73, 0xa2, 0x23, 0xaf, 0x5b, 0xb3, 0x3f, 0xc0, 0xaf, 0x84, 0x56, 0x33, 0x99, 0xfb, 0x6c, 0xa6, 0xd1, 0xf1, 0x58, 0x40 }

      ,
      "archive" => undefined
      (...)
      "rolled-back" => true

      However, when the server is completely restarted, the json ouput works properly:

      Show
      Step 1. Restart a JBoss server or host; Step 2. During the upstart of the server/host, run the command: /opt/jboss/jboss7_2/jboss-eap-7.2/bin/jboss-cli.sh --connect --controller=localhost:9990 --command="/host= /server= /deployment=*/:read-resource(recursive=false,include-runtime=true)" --output-json or equivalent for your environment. Notice that the response will NOT be in JSON-format, it will be in the DMR format. The following output was generated following the above steps: [tosorio@localhost bin] $ ./jboss-cli.sh --connect --controller=localhost:9990 --command="/host= /server=' '/deployment=*/:read-resource(recursive=false,include-runtime=true)" --output-json { "outcome" => "failed", "result" => [{ "address" => [ ("host" => "master"), ("server" => "server-two"), ("deployment" => "fabrica.war") ], "outcome" => "failed", "result" => { "content" => [{ "hash" => bytes { 0x73, 0xa2, 0x23, 0xaf, 0x5b, 0xb3, 0x3f, 0xc0, 0xaf, 0x84, 0x56, 0x33, 0x99, 0xfb, 0x6c, 0xa6, 0xd1, 0xf1, 0x58, 0x40 } , "archive" => undefined (...) "rolled-back" => true — However, when the server is completely restarted, the json ouput works properly:
    • QE Test Coverage:
      +

      Description

      The CLI returns a JSON output just when the CLI command got 'success'. In case of the output 'failed' the output is only DMR syntax.

      The following command was used in the tests:

      JBOSS_HOME/bin/boss-cli.sh --connect --controller=localhost:9990 --command="/host=/server=/deployment=*/:read-resource(recursive=false,include-runtime=true)" --output-json

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iweiss Ingo Weiss
                  Reporter:
                  th.osorio Thiago Osorio
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: