Bug 831632 - [RFE] Better kill patch for JON agent re-start scripts
[RFE] Better kill patch for JON agent re-start scripts
Status: CLOSED WONTFIX
Product: JBoss Operations Network
Classification: JBoss
Component: Agent (Show other bugs)
JON 3.0.0
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 09:30 EDT by Shaun Appleton
Modified: 2014-01-03 13:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-11 16:52:33 EDT
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
better kill patch from case 00610945 (3.04 KB, patch)
2012-06-13 09:30 EDT, Shaun Appleton
no flags Details | Diff

  None (edit)
Description Shaun Appleton 2012-06-13 09:30:28 EDT
Created attachment 591502 [details]
better kill patch from case 00610945

Description of problem:
In case 00610945 the JON agent re-start scripts failed when using cron.daily.
The result was that the script were re-written.

Attached is the resulting patch.

(Patch was written by Romain Pelisse whilst on site)
Comment 2 Heiko W. Rupp 2012-06-15 08:39:19 EDT
Another note: pgrep is not available on all systems (e.g not on OS/X and probably also not on Solaris).
Comment 3 Tom Fonteyne 2012-06-15 08:54:24 EDT
double checked, Solaris 10 (and 11) have pgrep, here is it with all options:

/usr/bin/pgrep

Usage: pgrep [-flnovx] [-d delim] [-P ppidlist] [-g pgrplist] [-s sidlist]
        [-u euidlist] [-U uidlist] [-G gidlist] [-J projidlist]
        [-T taskidlist] [-t termlist] [-z zonelist] [-c ctidlist] [pattern]
Comment 4 Mike Foley 2012-06-18 11:47:26 EDT
please test this and provide details on why the agent cannot be restarted from cron.daily ... before making changes to these scripts.
Comment 8 Romain PELISSE 2012-06-29 05:49:37 EDT
From my point o view, changing the script is NOT to fix the crontab issue - the root cause of this issue has never been really identified. The point of those changes is to make the "kill/process" of the agent more consistent through the script, and also a bit more "UNIX friendly".
 
I know that most shell script for JBoss product are "ugly" mostly to ensure backward compatibility with all the Unixes (Solaris being one), but there is no supported Unix that doesn't support pgrep, I think it is a good move to move forward with those changes. (IMHO)
Comment 10 Larry O'Leary 2013-10-11 16:52:33 EDT
There have been some changes to the agent process life-cycle. I am not certain why the script changes suggested here were needed in the first place but the latest scripts (expected for 3.2) are working in the same manner as the POSIX recommendations for process termination state. 

As the solution provided in the recommended patch is platform specific it seems to introduce too much risk in cross-platform compatibility.

If the original issue is re-experienced, I suggest that Red Hat Global Support Services re-investigate in the context of the latest versions of the scripts. If a change is needed as an enhancement or feature request, we should use the JBoss ON RFE process.

Note You need to log in before you can comment on or make changes to this bug.