Bug 913236

Summary: Unable to restart server group in domain mode
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Thomas Segismont <tsegismo>
Component: Domain ManagementAssignee: Emanuel Muckenhuber <emuckenh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: brian.stansberry, dandread, pslavice, rhatlapa
Target Milestone: ER4   
Target Release: EAP 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 911327    

Description Thomas Segismont 2013-02-20 17:10:10 UTC
Description of problem:
When you start a stock EAP6.1.DR4 in domain mode, you cannot restart the servers of the main servers group. server-one restarts but server-two does nothing and the http request to the management interface blocks.

Version-Release number of selected component (if applicable):
EAP6.1.DR4

How reproducible:
Always

Steps to Reproduce:
1. Download and extract EAP6.1.DR4
2. Start in domain mode
3. Execute HTTP request with curl
curl -v --data "{\"operation\":\"restart-servers\",\"address\":[{\"server-group\":\"main-server-group\"}]}" -H "Content-Type: application/json" -H "Accept: application/json" --anyauth -u rhq:rhqadmin_1 http://localhost:9990/management
  
Actual results:
server-one restarts, server-two does nothing, curl command blocks

Expected results:
server-one restarts, server-two restarts, curl command ends with operation result success.

Additional info:
If you try to restart the group through the admin console it also fails.

Comment 1 JBoss JIRA Server 2013-03-12 02:37:58 UTC
Brian Stansberry <brian.stansberry> made a comment on jira AS7-6711

It's simpler than the original description. Multiple servers aren't required, nor is restart-servers required. Calling /server-group=x:start-servers when the master HC has just a single server in group "x" will result in the problem.

The problem is that:

1) OperationCoordinatorStepHandler calls context.acquireControllerLock() at line 209. The lock will be held until the server connects.
2) The registering server needs to acquire the lock as part of registration, ServerToHostProtocolHandler line 254. Until it gets the lock, it cannot connect.

This deadlocks.

A likely workaround is to not run servers on the master HostController. The lock acquired in 1) is done on the master.

Comment 2 JBoss JIRA Server 2013-03-22 12:06:52 UTC
Emanuel Muckenhuber <emuckenh> updated the status of jira AS7-6711 to Resolved

Comment 4 Radim Hatlapatka 2013-04-04 12:15:57 UTC
Verified in EAP 6.1.0 ER4