Red Hat Bugzilla – Bug 843419
[Agent RPM] PID for both EC2 and non-EC2 agents are being created and both agents can be started together.
Last modified: 2015-09-02 20:01:16 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):
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
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.
it is not possible to start both services together
attached screenshot of pid files in directory
Created attachment 600468 [details]
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.
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.