Description of problem: The restart operation for the AS5 plug-in does not fail when a failure occurs for the shutdown or start portion of the command. Version-Release number of selected component (if applicable): 4.4.0.JON312GA How reproducible: Always Steps to Reproduce: 1. Install, configure, and start JBoss EAP 5.2 default server. 2. Install, configure, and start JBoss ON system. 3. Create custom shutdown script for JBoss EAP server which sleeps for a bit and then does nothing: cat >"${JBOSS_HOME}"'/bin/custom-shutdown' <<EOF #!/bin/sh # This script will simply block for 5 seconds and then exits. JBOSS_HOME="${JBOSS_HOME}" /bin/sleep 5s exit 1 EOF chmod +x "${JBOSS_HOME}"'/bin/custom-shutdown' 4. Import JBoss EAP default server into inventory. 5. Configure EAP resource connection settings to use custom-shutdown script for shutdown command. 6. Invoke the restart operation for the JBoss EAP resource. Actual results: Restart operation reports success yet the existing process is still running and was not restarted (shutdown failed and start failed). Expected results: Restart operations reports failure due to the shutdown operation failing (i.e. JBoss EAP resource still AVAIL) Additional info: This appears to be a result of a change that may have been introduced since the EAP 4 plug-in or in how exception handling was being used. Specifically, the restart operation is expecting the underlying shutdown and start operations to throw an exception if there is a failure. However, those methods no longer do that. Instead, they set the errorMessage of the operation response to indicate that a failure occurred and what the failure was. This means that instead of expecting an exception to be thrown, the restart operation should also expect that a failure message could be set and treat the message appropriately.
Reproduced on a master build. Fixed in master branch: commit 145463496ed1b6dcc7d09193965a77c737bc29b4 Author: Thomas Segismont <tsegismo> Date: Tue Mar 18 22:30:03 2014 +0100 Waiting for nightly builds before cherry-picking over release branches.
Cherry-picked over to release/jon3.2.x branch commit 82bffc4070b6cd879c19d7f9cfd053adf0bfb6ee Author: Thomas Segismont <tsegismo> Date: Mon Apr 28 17:29:37 2014 +0200
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
Verified Version : 3.3.0.DR01 Build Number : 6468454:dda0a47