Promoting a Registry Slave
3 min read
3 min read
3 min read
3 min read
3 min read
3 min read
3 min read
3 min read
3 min read
In a replicated IceGrid deployment, you promote a slave registry to master when the master becomes unavailable and cannot be restarted soon, for example after a hardware failure. Some features, such as resource allocation and changes to the deployment data, require the master.
Promoting a Slave
To promote a slave registry to master:
- Shut down the slave registry.
- Change its IceGrid.Registry.ReplicaName property to
Master, or remove the property altogether. - Restart the registry.
Reconnecting Registries and Nodes
Slaves and nodes connect to the new master through their default locator, when the endpoints of this locator include those of the new master or of a slave connected to the new master. The new master also asks the slaves recorded in its database to connect when it starts, and asks a node to connect the first time it needs this node.
Recovering the Former Master
To bring the former master back, restart its registry as a slave: set the IceGrid.Registry.ReplicaName property of this registry to a name that no other registry uses, and its Ice.Default.Locator property to a proxy for the new master's locator. Like any other slave, the registry copies the master's database when it connects to the master.
A slave does not copy the master's database when its own database is newer, that is, when it holds updates that the master's database lacks. To resolve this, restart the registry whose database you want to discard with the --initdb-from-replica=<name> option of icegridregistry, which initializes its database from the named registry.