Bug 965315

Summary: jboss-ec2-eap timeout of user script does not work properly
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aleksandar Kostadinov <akostadi>
Component: distributionAssignee: Farah Juma <fjuma>
Status: CLOSED ERRATA QA Contact: Aleksandar Kostadinov <akostadi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: myarboro, ppenicka, rdickens, yyang
Target Milestone: ER7   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The timeout feature implemented in the jboss_user-data.sh script on JBoss Enterprise Application Platform's Amazon Machine Images (AMIs) was not functional because non-interactive Bash shells do not support job control by default. Consequently, the virtual machines did not boot successfully if a command in the script became unresponsive. This issue has been fixed by explicitly enabling job control in the jboss_user-data.sh script, and AMI images now boot successfully even when a command in the script becomes unresponsive.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 15:00:43 UTC 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:

Description Aleksandar Kostadinov 2013-05-20 22:01:29 UTC
By default bash does not support job control in non-interactive shells. Implementation of user script timeout currently does not work because script can't be executed in background.

Either `set -m` needs to be inserted just before running the script in the background or some other mechanism for running in the background needs to be used.

This bug is not critical because user script still works, just the benefit of timing out a stale script is missing.

Comment 1 Russell Dickenson 2013-05-22 07:24:25 UTC
Attention: Farah & Aleksandar

I have taken the description of this bug and drafted text for its Release Note. In it I said that no workaround is available but in the description you say that other options may be possible. I can't understand the comment about "set -m" because I have tried to find information on that option and can't find any. Is this a feature of the Bash shell?

Comment 2 Aleksandar Kostadinov 2013-05-22 13:02:54 UTC
Russel, users can implement timeout functionality in their own scripts but it doesn't really make sense because they would already try to write their scripts in a way the do not hang. The implementation we had wanted to achieve the ability for users to still login to the machine and debug their script execution if it happens to hang.

End effect is that it is hard to debug user script hangs.

Comment 3 Aleksandar Kostadinov 2013-05-22 13:03:31 UTC
I wanted to say, I think release notes are fine except I'm not sure what we really can say about workaround.

Comment 5 Farah Juma 2013-07-12 18:04:49 UTC
Aleksandar, I've updated jboss_user-data.sh so that `set -m` is called in order to enable job control before running the script in the background:

http://git.app.eng.bos.redhat.com/?p=mw-cloud.git;a=commit;h=005434d4007f5fcc3ecc971e7b22503dd50434d2

This fix will be included in the EAP 6.1.1 ER3 EC2 RPM (which should be ready around July 23).

Comment 6 Yong Yang 2013-08-28 08:08:24 UTC
Update status to MODIFIED, so that I can be added to errata https://errata.devel.redhat.com/advisory/14959

Comment 8 Aleksandar Kostadinov 2013-08-29 12:08:25 UTC
I thought this is closed long ago. Anyways trying it now with 6.1.1 it works very well. Thank you.

Comment 9 Petr Penicka 2013-09-10 12:44:50 UTC
Modified Doc Text from a known issue description to a fixed issue description.

Comment 11 errata-xmlrpc 2013-09-10 15:00:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1248.html