domain.sh script has an option "--cached-dc " , I guess you are looking out for the same.
--cached-dc If this host is not the Domain
Controller and cannot contact the
Domain Controller at boot, boot using a
locally cached copy of the domain
configuration (see --backup)
--backup Keep a copy of the persistent domain
configuration even if this host is not
the Domain Controller
Thanks Jay. It looks great. I'll test it further and give you more feedback later.
Here's my feedback after some tests on WildFly 10 and JBoss EAP 6.4.
Both arguments are exclusive. Use --cached-dc or --backup.
--backup is what I was looking for. As I have a copy of the domain.xml, I can use it in several ways.
--cached-dc is interesting but not exactly the solution. When I can't reach the DC, I can start the HC with this option. But it never tries to access to the DC and when the DC comes back, the HC remains isolated.
Is there a way to reconnect the HC to his main DC without restarting it ?
Are you looking for a DC failover ? If yes then :-
--cached-dcis not meant to be a DC automatic failover.
It is mainly meant to be able to boot HC even when DC is down.
To achieve DC failover configuration, you will need to backup DC's
domain.xmlvia some automated service (e.g.: cron/rsync). When DC is down, bring up a newly installed DC (perhaps on another machine) with those copied
domain.xmlon the same IP or host name as the old one. That way, the slave HC will be reconnected to this newly brought up DC (as long as it's still the same IP/Hostname).
What I'm looking for is half way between startup and failover. I want to be able to start my HC without its main DC, and I want that my HC joins his main DC when it's back, without restarting the servers.
I think that my solution will be based on
--backupargument on HC, and a local, secondary, DC on HC's host. My HC will have 2 DCs : the main one and a local one. The local one will be started only if the main one cannot be reached. It will use a copy of the backup configuration file. In order to switch from one DC to the other, I'll setup my HC with the
We want to do the same thing. Did you make this work? If so, can you please share your solution?