To update the IP addresses of the VMware Cloud Director cells in a database high availability cluster, you can use the cell management tool.
Prerequisites
To update the IP addresses of the cells in a database high availability cluster, you must provide the IP address of the current primary. To find the IP address, you must use the VMware Cloud Director appliance API to make a note of the node IDs of the standby nodes in the cluster. See the VMware Cloud Director Appliance API Schema Reference on http://code.vmware.com.
Procedure
- Log in directly or by using an SSH client to the OS of any of the cells in the cluster as root.
- Check if the cell is running on that node.
service vmware-vcd pid cell
If the cell process ID is not NULL, the
VMware Cloud Director cell is running and you can change the IP address of the database without restarting the
VMware Cloud Director cell.
- To update the IP addresses on all the cells in the server group, run the following command:
/opt/vmware/vcloud-director/bin/cell-management-tool reconfigure-database --database-host primary node IP address --pid cell process ID --remote-sudo-user postgres --private-key-path /opt/vmware/vcloud-director/id_rsa
The system output indicates the successful reconfiguration.
- (Optional) Verify that each VMware Cloud Director cell is pointing to the correct database IP address.
grep "database.jdbcUrl" /opt/vmware/vcloud-director/etc/global.properties
The system output indicates that the cell is updated.
- If any of the cells is not updated, run the command to reconfigure it.
- If the cell is not running, run the following command:
/opt/vmware/vcloud-director/bin/cell-management-tool reconfigure-database --database-host primary node IP address
- If the cell is running, run the following command:
/opt/vmware/vcloud-director/bin/cell-management-tool reconfigure-database --database-host primary node IP address -i cell process ID
- If you reconfigured a cell that is not running, run the command to restart the
vmware-vcd
service.
- Run the command to stop the service.
/opt/vmware/vcloud-director/bin/cell-management-tool cell -i $(service vmware-vcd pid cell) -s
- Run the command to start the service.
systemctl start vmware-vcd