Bug 956829

Summary: RHQ Controll - stopping and starting the same service in different terminals simultaneously leads to error message
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: InstallerAssignee: Stefan Negrea <snegrea>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: low    
Version: JON 3.2CC: ahovsepy, mfoley, snegrea, spinder
Target Milestone: ER03   
Target Release: JON 3.2.0   
Hardware: i686   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 16:58:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 951619    
Attachments:
Description Flags
stop-start
none
start-stop none

Description Armine Hovsepyan 2013-04-25 17:49:53 UTC
Created attachment 740004 [details]
stop-start

Description of problem:


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


How reproducible:


Steps to Reproduce:
1. rhqctl install --agent
2. rhqctl start --agent in one terminal
3. simultaneously run rhqctl stop --agent
  
Actual results:
12:56:03,225 ERROR [org.rhq.server.control.RHQControl] org.rhq.server.control.RHQControlException: Failed to stop services


Expected results:
no error is shown

Additional info:

attached is the screenshot of commands run 

I've marked bug with low priority since there are no exceptions in logs and nothing is broken with the overlapping stop-start operations.

Comment 1 Armine Hovsepyan 2013-04-25 17:51:16 UTC
Created attachment 740005 [details]
start-stop

please take into account that for both screenshots command on left screen was executed first

Comment 2 Stefan Negrea 2013-08-22 22:34:54 UTC
What is the expected behavior here? 

While issuing simultaneous commands is implicitly supported we cannot guarantee the outcome because it is OS and machine dependent. One command will always win and thus it can create problems for the second command. In your case looks like the actual code for stop ran first, before start could run; so there is nothing to stop. The output that you see looks good. 

Please provide additional clarifications.

Comment 3 Armine Hovsepyan 2013-08-23 12:16:19 UTC
Hi Stefan,

Good question. 
From  test case review meeting - system should be adequate to this scenario and wait for one process to finish before starting processing/execution of the second one.

Comment 6 Simeon Pinder 2013-09-30 13:36:57 UTC
Moving into ER3 as didn't make it into ER2.

Comment 7 Stefan Negrea 2013-09-30 16:58:44 UTC
It is not possible to implement the level of synchronization stated in comment #3 . The commands are issued independently from two separate terminals without knowledge of each other. The commands in the test case completed correctly, the reported error is normal. The order of execution is really system dependent and might not be obvious.