Bug 843419 - [Agent RPM] PID for both EC2 and non-EC2 agents are being created and both agents can be started together.
[Agent RPM] PID for both EC2 and non-EC2 agents are being created and both ag...
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
x86_64 Linux
medium Severity unspecified (vote)
: ---
: ---
Assigned To: Stefan Negrea
Mike Foley
Depends On:
Blocks: 707235
  Show dependency treegraph
Reported: 2012-07-26 05:38 EDT by Armine Hovsepyan
Modified: 2015-09-02 20:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-30 11:22:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
2_pid (26.99 KB, image/png)
2012-07-26 05:39 EDT, Armine Hovsepyan
no flags Details

  None (edit)
Description Armine Hovsepyan 2012-07-26 05:38:37 EDT
Description of problem:
It is possible to start two Agents - one regular and one ec2 specific and both do create PID files and processes.

Version-Release number of selected component (if applicable):
How reproducible:

Steps to Reproduce:
1. rpm install jboss-on-agent
2. rpm install jboss-on-agent-init-ec2
3. start jon-agent service
4. start jon-agent-ec2 service
Actual results:
both services are being started, 2 pid files are being created: one under /var/run/jboss-on/agent and second under /var/run/jboss-on/agent-ec2.

Expected results:
it is not possible to start both services together

Additional info:
attached screenshot of pid files in directory
Comment 1 Armine Hovsepyan 2012-07-26 05:39:07 EDT
Created attachment 600468 [details]
Comment 2 Stefan Negrea 2012-07-30 10:46:05 EDT
This problem only applies to cases where the user purposely starts both services at the same time. There is currently no mechanism in place to prevent an user to start both agents. This is not a problem for normal system life-cycle (eg. system restart). In that case only one agent starts based on the RPMs installed.

For the initial RPM work, there was only one folder that held PIDs for both regular and EC2 agents. That lead to false positives for reporting whether the agent is started. For example, if the EC2 agent was started the regular agent would report as started too. Bug 817100 and bug 816000 resolved this issue however, the side of that is that the user can now start both agents.
Comment 3 Charles Crouch 2012-07-30 11:22:36 EDT
From Stefan's description this is working as expected, given there are no usecases where someone would want to start both agent types at the same time.

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