Bug 1076066

Summary: [GSS] (6.3.0) Can't promote --backup slave HC to master and reload without moving domain.cached-remote.xml
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: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.2CC: emuckenh, kkhan, myarboro, onagano, rsvoboda, smumford, stuohey, tfonteyn
Target Milestone: DR5   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, a bug prevented a slave Host Controller that has been reconfigured to act as Master from loading the cached domain configuration upon restart. This was because the newly promoted Master loads the configuration from the 'domain/configuration/domain.xml' file instead of the 'domain/configuration/domain.cached-remote.xml' file. In this release of the product, if a slave HostController started with the `--backup` option is reconfigured to act as master and is then reloaded to pick up that change, the 'domain.cached-remote.xml' file it was maintaining when running as a backup will automatically be detected and used.
Story Points: ---
Clone Of:
: 1082478 (view as bug list) Environment:
Last Closed: 2014-06-28 15:43:28 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: 1082478    

Description Brian Stansberry 2014-03-13 13:08:53 UTC
Description of problem:

The prescribed method for promoting a slave HostController to act as the master fails unless a file named domain.xml with the correct content exists in the slave's domain/configuration dir.

How reproducible:

Always, unless extra steps are taken.

Steps to Reproduce:
1. Start the slave with --backup so a local copy of the domain config is maintained (in file domain.cached-remote.xml).
2. Stop the existing master.
3. Use the cli to connect to the slave
4. /host=<slavename>:write-local-domain-controller
5. reload --host=<slavename>

Actual results:

If there is no domain/configuration/domain.xml file on the slave HC system, the following error occurs:

2014-03-13 09:54:04,829 ERROR [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010932: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:514) [wildfly-host-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: java.io.FileNotFoundException: /Users/bstansberry/tmp/WF801/slave/domain/configuration/domain.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:146) [rt.jar:1.7.0_45]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:100) [wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
... 3 more

(The above stack trace is from WildFly, but EAP has the same thing.)

OR:, if a domain.xml file exists but does not reflect the current domain config (e.g. it's the original file we shipped) then the slave HC will end up incorrectly adopting that config. 

Expected results:


Additional info:

Comment 3 Petr Kremensky 2014-03-24 09:50:40 UTC
Verified on EAP 6.3.0.DR5.

Both cases are now working (no domain.xml on slave, domain.xml on slave doesn't reflect current domain configuration).

Comment 7 Scott Mumford 2014-05-14 02:27:32 UTC
Refactored release note text to publishable format.