Bug 1024109

Summary: [CCC] (6.3) NPE in DelegatingServerInventory
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brian Stansberry <brian.stansberry>
Component: Domain ManagementAssignee: Brian Stansberry <brian.stansberry>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: high Docs Contact: Lucas Costi <lcosti>
Priority: unspecified    
Version: 6.2.0CC: emuckenh, jcacek, kkhan, lcosti, lthon, myarboro
Target Milestone: DR0   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Management requests sent to a Host Controller immediately after the Host Controller had launched may have failed with an exception of type `NullPointerException`. This was because there was a period of time between when the Host Controller was able to receive requests and when the server management system had fully started. This period of time was usually less than one second, but any requests received in that time would fail. This issue has been fixed in this release by making sure that a Host Controller will only receive requests once the server management system has fully started. As a result, there is no longer period of time where received requests will trigger a `NullPointerException` because the the server management system has not fully started.
Story Points: ---
Clone Of:
: 1041330 (view as bug list) Environment:
Last Closed: 2014-06-28 15:25:26 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: 1041330    

Description Brian Stansberry 2013-10-28 20:55:43 UTC
There's a gap in the HostController boot sequence between when the external management interface services allow connections and when the ServerInventory service used internally by the HC for managing servers is available. If certain management requests that need to find info about servers come in during this window, an NPE occurs:

[Host Controller] 03:26:38,028 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014612: Operation ("read-attribute") failed - address: ([
[Host Controller] ("host" => "failover-h1"),
[Host Controller] ("server-config" => "failover-one")
[Host Controller] ]): java.lang.NullPointerException
[Host Controller] at org.jboss.as.host.controller.DomainModelControllerService$DelegatingServerInventory.determineServerStatus(DomainModelControllerService.java:788)
[Host Controller] at org.jboss.as.host.controller.operations.ServerStatusHandler.execute(ServerStatusHandler.java:66)
[Host Controller] at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecuteInternal(ReadAttributeHandler.java:177) [wildfly-controller-8.0.0.Beta2-SNAPSHOT.jar:8.0.0.Beta2-SNAPSHOT]
[Host Controller] at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecute(ReadAttributeHandler.java:97) [wildfly-controller-8.0.0.Beta2-SNAPSHOT.jar:8.0.0.Beta2-SNAPSHOT]
[Host Controller] at org.jboss.as.controller.operations.global.GlobalOperationHandlers$AbstractMultiTargetHandler.execute(GlobalOperationHandlers.java:151) [wildfly-controller-8.0.0.Beta2-SNAPSHOT.jar:8.0.0.Beta2-SNAPSHOT]

This shows up as fairly frequent failures in org.jboss.as.test.integration.domain.DomainControllerMigrationTestCase.testDCFailover. Any kind of automated tooling that started/reloaded/restarted an HC and then started polling for completion of server launch could hit the same issue.

Comment 8 Petr Kremensky 2014-03-04 12:00:06 UTC
Verified on EAP 6.3.0.DR1