Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4413

Addressing the shutdown command to an unknown host results in shutdown of the Domain Controller

XMLWordPrintable

    • Hide
      • Start Domain Controller
      • Start Slave host with --backup option
      • Execute this on slave host (replace parameters)

      jboss-cli.sh -c command=/host=$SLAVE_HOSTNAME:shutdown --controller=$DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT --user=$HOSTNAME --password=$PASSWORD

      • Slave host has been stopped
      • Start slave host without --backup and with --cached-dc options
      • Execute the same in slave host:

      jboss-cli.sh -c command=/host=$SLAVE_HOSTNAME:shutdown --controller=$DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT --user=$HOSTNAME --password=$PASSWORD

      • Domain Controller has been stopped and slave host has not.
      Show
      Start Domain Controller Start Slave host with --backup option Execute this on slave host (replace parameters) jboss-cli.sh -c command=/host=$SLAVE_HOSTNAME:shutdown --controller=$DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT --user=$HOSTNAME --password=$PASSWORD Slave host has been stopped Start slave host without --backup and with --cached-dc options Execute the same in slave host: jboss-cli.sh -c command=/host=$SLAVE_HOSTNAME:shutdown --controller=$DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT --user=$HOSTNAME --password=$PASSWORD Domain Controller has been stopped and slave host has not.

      This command from the CLI results in shutdown of the DC (note there is no registered host named "bogus"):

      $ ./jboss-cli.sh -c
      [domain@localhost:9999 /] /host=bogus:shutdown

      {"outcome" => "success"}

      To maintain history, following is the original JIRA description, but the --cached-dc stuff below is not really relevant. Starting the slave with --cached-dc just meant it didn't register with the DC the CLI is connecting to at $DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT, so the effect is the same as my host=bogus example above.

      NOTE: this is related to AS7-4281 (see https://issues.jboss.org/browse/AS7-4281?focusedCommentId=12682058&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12682058 )

      when a slave host is started with -cached-dc option, executing "jboss-cli.sh -c command=/host=$SLAVE_HOSTNAME:shutdown --controller=$DOMAIN_CONTROLLER_HOST:$DOMAIN_CONTROLLER_PORT --user=$HOSTNAME --password=$PASSWORD" will stop the Domain Controller instead stopping slave host. If I execute the same command without using --cached-dc option when starting slave host, it will shutdown the slave host as I expected. I am not really sure about what should do this command (stopping DC or slave -I think it should stop slave host) but it's kind of weird the behaviour depending on the --cached-dc option.

              bstansbe@redhat.com Brian Stansberry
              mmartinez-gonzalez Manel Martinez Gonzalez (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: