Replacing a Full Cluster Node as an Active Witness
This section explains the simple process for converting a full cluster node into an Active Witness.
First, place the cluster into MAINTENANCE mode.
shell> cctrlcctrl> set policy maintenanceStop the software on the existing cluster node
shell> stopallStop MySQL on the existing cluster node (Syntax is an example and may differ in your environment)
shell> systemctl stop mysqldUpdate the ini on all nodes (including connectors) changing the reference to the node to be a witness node, example below.
Example tungsten.ini BEFORE change[defaults]user=tungstenhome-directory=/opt/continuentapplication-user=app_userapplication-password=secretapplication-port=3306profile-script=~/.bash_profilereplication-user=tungstenreplication-password=secretreplication-port=13306rest-api-admin-user=apiuserrest-api-admin-password=secretmysql-allow-intensive-checks=true[nyc]topology=clusteredmaster=db1members=db1,db2,db3connectors=db1,db2,db3Show argument definitions
user=tungstenOS System User, for example tungsten. DO NOT use root.home-directory=/opt/continuentInstallation directory.application-user=app_userDatabase username for the connector.application-password=secretDatabase password for the connector.application-port=3306Port for the connector to listen on.profile-script=~/.bash_profileAppend commands to include env.sh in this profile script.replication-user=tungstenUser for database connection.replication-password=secretDatabase password.replication-port=13306Database network port.rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0rest-api-admin-password=secretSpecify the initial Admin User Password for API access.rest-api-admin-passwordalias only available from version 7.1.2 onwards.Available from v7.0.0mysql-allow-intensive-checks=trueFor MySQL installation, enables detailed checks on the supported data types within the MySQL database to confirm compatibility.Example tungsten.ini AFTER change[defaults]user=tungstenhome-directory=/opt/continuentapplication-user=app_userapplication-password=secretapplication-port=3306profile-script=~/.bash_profilereplication-user=tungstenreplication-password=secretreplication-port=13306rest-api-admin-user=apiuserrest-api-admin-password=secretmysql-allow-intensive-checks=true[nyc]enable-active-witnesses=truetopology=clusteredmaster=db1members=db1,db2,db3witnesses=db3connectors=db1,db2,db3Show argument definitions
user=tungstenOS System User, for example tungsten. DO NOT use root.home-directory=/opt/continuentInstallation directory.application-user=app_userDatabase username for the connector.application-password=secretDatabase password for the connector.application-port=3306Port for the connector to listen on.profile-script=~/.bash_profileAppend commands to include env.sh in this profile script.replication-user=tungstenUser for database connection.replication-password=secretDatabase password.replication-port=13306Database network port.rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0rest-api-admin-password=secretSpecify the initial Admin User Password for API access.rest-api-admin-passwordalias only available from version 7.1.2 onwards.Available from v7.0.0mysql-allow-intensive-checks=trueFor MySQL installation, enables detailed checks on the supported data types within the MySQL database to confirm compatibility.Update the software on the existing cluster nodes and connector nodes (If separate). Include
--no-connectorsif you want to manually restart them when convenient.shell> cd /opt/continuent/software/tungsten-clustering-8.0.4-132shell> tools/tpm update --replace-releaseUpdate on the host you are converting:
shell> cd /opt/continuent/software/tungsten-clustering-8.0.4-132shell> tools/tpm update --replace-release -fOnce the updates have been complete, you should then run the
tungsten_reset_managercommand 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 cluster node. On each node, simply execute the command and follow the on screen prompts:shell> tungsten_reset_managerRestart the managers on the nodes you have not converted:
shell> manager startIf you had previously executed
deployallor had theinstall=trueoption in your configuration, then you must also de-register the replicator from the systemctl services so that upon reboot the replicator is not inadvertently started as this may cause issues.To do this, execute the following:
shell> sudo /opt/continuent/tungsten/tungsten-replicator/bin/replicator removeStart the software on the node that you converted:
shell> startallIf you issued
--no-connectorsduring the update, restart the connectors when convenientshell> connector restartCheck within
cctrlfrom one of the existing database nodes to check that the status returns the expected output, and then return the cluster to AUTOMATIC and the process is complete.