This section explains the simple process for converting a full cluster node into an Active Witness.
First, place the cluster into MAINTENANCE
mode.
shell>cctrl
cctrl>set policy maintenance
Stop the software on the existing cluster node
shell> stopall
Stop MySQL on the existing cluster node (Syntax is an example and may differ in your environment)
shell> systemctl stop mysqld
INI Install
If you are using an ini file for configuration, update the ini on all nodes (including connectors) changind the reference to the node to be a witness node, example below. Skip to Staging Install further down for Staging steps.
Before:
[defaults] user=tungsten home-directory=/opt/continuent application-user=app_user application-password=secret application-port=3306 profile-script=~/.bash_profile replication-user=tungsten replication-password=secret replication-port=13306 mysql-allow-intensive-checks=true [nyc] topology=clustered master=db1 members=db1,db2,db3 connectors=db1,db2,db3
After:
[defaults] user=tungsten home-directory=/opt/continuent application-user=app_user application-password=secret application-port=3306 profile-script=~/.bash_profile replication-user=tungsten replication-password=secret replication-port=13306 mysql-allow-intensive-checks=true [nyc] enable-active-witnesses=true topology=clustered master=db1 members=db1,db2,db3 witnesses=db3 connectors=db1,db2,db3
Update the software on the existing cluster nodes and connector nodes (If separate). Include --no-connectors
if connectors you want to manually restart them when convenient.
shell>cd /opt/continuent/software/
shell>tungsten-clustering-7.1.4-10
tools/tpm update --replace-release
Update on the host you are converting:
shell>cd /opt/continuent/software/
shell>tungsten-clustering-7.1.4-10
tools/tpm update --replace-release -f
Staging Install
If you are using a staging configuration, update the configuration from the staging host, example below:
shell> cd {STAGING_DIRECTORY}
./tools/tpm configure defaults \
--reset \
--user=tungsten \
--home-directory=/opt/continuent \
--application-user=app_user \
--application-password=secret \
--application-port=3306 \
--profile-script=~/.bash_profile \
--replication-user=tungsten \
--replication-password=secret \
--replication-port=13306 \
--mysql-allow-intensive-checks=true
./tools/tpm configure nyc \
--enable-active-witnesses=true \
--topology=clustered \
--master=db1 \
--members=db1,db2,db3 \
--witnesses=db3 \
--connectors=db1,db2,db3
Update the software on the existing cluster nodes. Include --no-connectors
if connectors
co-exist on database nodes and you want to manually restart them when convenient.
shell>cd {STAGING_DIRECTORY}
shell>tools/tpm update --replace-release --hosts=db1,db2
Update on the host you are converting:
shell>cd /opt/continuent/software/
shell>tungsten-clustering-7.1.4-10
tools/tpm update --replace-release -f --hosts=db3
Once the updates have been complete, you should then run the tungsten_reset_manager command on each node in the entire cluster. This will ensure the metadata is clean and reference to the node is reflected to be a witness, rather than a full cluter node. On each node, simply execute the command and follow the on screen prompts:
shell> tungsten_reset_manager
Restart the managers on the nodes you have not converted:
shell> manager start
Start the software on the node that you converted:
shell> startall
If you issued --no-connectors
during the update, restart the connectors when convenient
shell> connector restart
Check within cctrl from one of the existing database nodes to check that the status returns the exptected
output, and then return the cluster to AUTOMATIC
and the process is complete.