Bug 843419 - [Agent RPM] PID for both EC2 and non-EC2 agents are being created and both agents can be started together.
Summary: [Agent RPM] PID for both EC2 and non-EC2 agents are being created and both ag...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.5
Hardware: x86_64
OS: Linux
medium
unspecified
Target Milestone: ---
: ---
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 707235
TreeView+ depends on / blocked
 
Reported: 2012-07-26 09:38 UTC by Armine Hovsepyan
Modified: 2015-09-03 00:01 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-07-30 15:22:36 UTC
Embargoed:


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

Description Armine Hovsepyan 2012-07-26 09:38:37 UTC
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):
jboss-on-agent-3.1.0.GA-8.el6_3.noarch.rpm 
jboss-on-agent-init-ec2-3.1.0.GA-8.el6_3.noarch.rpm 
How reproducible:
always

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 09:39:07 UTC
Created attachment 600468 [details]
2_pid

Comment 2 Stefan Negrea 2012-07-30 14:46:05 UTC
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 15:22:36 UTC
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.