AS is killed if the agent is killed (provided it was started/restarted by the agent)

Thomas Segismont tsegismo at redhat.com
Tue Feb 12 16:33:02 UTC 2013


Le 12/02/2013 15:43, John Mazzitelli a écrit :
>> Jiri, what if we trap the SIGINT signal in rhq-agent.sh, tell the
>> user
>> Ctrl-C is disabled and ask him to use the shutdown command?
>
> IMO, I would not recommend this. First, we use Control-C all the time and I'm sure others do, too. Second, again, to support auto-upgrade of agents, the documentation tells people specifically not to touch their rhq-agent.sh because those changes won't be copied over when they auto-upgrade the agent in the future (see the section "Do Not Alter The Launcher Scripts" here https://docs.jboss.org/author/display/RHQ/RHQ+Agent+Installation#RHQAgentInstallation-DoNotAlterTheLauncherScripts )
>
> Here's the simple solution - if people complain that their AS7 dies when they kill the agent, tell them "don't run the agent using rhq-agent.sh" Add an FAQ on our FAQ page on this.
>
> Otherwise, tell them to run the agent like "nohup rhq-agent.sh --daemon &"
>
> As a last-ditch solution, then OK you can tell the user to do what you suggested above ("trap SIGINT in rhq-agent.sh") but when you tell them this, explain the caveats if they do this (point them to that wiki link I mention above that talks about how auto-upgrade of agent won't track those changes).
>
> No matter what we tell the user they can do, do not add this to our own rhq-agent.sh that we ship with.
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>

Mazz,

My idea was not to tell users to touch their rhq-agent.sh script but 
rather to change it in our repo. But it might be a bad idea... :)

BTW, the reason for Ctrl-C killing all processes is that the signal is 
sent to all processes in the same group.

Thomas


More information about the rhq-devel mailing list