Bug 831632 - [RFE] Better kill patch for JON agent re-start scripts
Summary: [RFE] Better kill patch for JON agent re-start scripts
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent
Version: JON 3.0.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-13 13:30 UTC by Shaun Appleton
Modified: 2018-11-28 21:03 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-10-11 20:52:33 UTC
Type: Feature Request
Embargoed:


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

Description Shaun Appleton 2012-06-13 13:30:28 UTC
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 12:39:19 UTC
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 12:54:24 UTC
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 15:47:26 UTC
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 09:49:37 UTC
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 20:52:33 UTC
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.