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.
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.
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
5. reload --host=<slavename>
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.
Wasn't moved to ON_QA, but should be included based on https://github.com/jbossas/jboss-eap/compare/EAP_6.3.0.DR4-dev...EAP_6.3.0.DR5-dev check
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).
Refactored release note text to publishable format.