Skip to main content
Tungsten Clustering

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.

  1. First, place the cluster into MAINTENANCE mode.

    shell> cctrl
    cctrl> set policy maintenance
  2. Stop the software on the existing cluster node

    shell> stopall
  3. Stop MySQL on the existing cluster node (Syntax is an example and may differ in your environment)

    shell> systemctl stop mysqld
  4. Update 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=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
    rest-api-admin-user=apiuser
    rest-api-admin-password=secret
    mysql-allow-intensive-checks=true

    [nyc]
    topology=clustered
    master=db1
    members=db1,db2,db3
    connectors=db1,db2,db3
    Show argument definitions
    user=tungstenOS System User, for example tungsten. DO NOT use root.
    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.
    rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0
    rest-api-admin-password=secretSpecify the initial Admin User Password for API access. rest-api-admin-password alias only available from version 7.1.2 onwards.Available from v7.0.0
    Example tungsten.ini AFTER change
    [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
    rest-api-admin-user=apiuser
    rest-api-admin-password=secret
    mysql-allow-intensive-checks=true

    [nyc]
    enable-active-witnesses=true
    topology=clustered
    master=db1
    members=db1,db2,db3
    witnesses=db3
    connectors=db1,db2,db3
    Show argument definitions
    user=tungstenOS System User, for example tungsten. DO NOT use root.
    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.
    rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0
    rest-api-admin-password=secretSpecify the initial Admin User Password for API access. rest-api-admin-password alias only available from version 7.1.2 onwards.Available from v7.0.0
  5. Update the software on the existing cluster nodes and connector nodes (If separate). Include --no-connectors if you want to manually restart them when convenient.

    shell> cd /opt/continuent/software/tungsten-clustering-8.0.4-132
    shell> tools/tpm update --replace-release
  6. Update on the host you are converting:

    shell> cd /opt/continuent/software/tungsten-clustering-8.0.4-132
    shell> tools/tpm update --replace-release -f
  7. 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 cluster node. On each node, simply execute the command and follow the on screen prompts:

    shell> tungsten_reset_manager
  8. Restart the managers on the nodes you have not converted:

    shell> manager start
  9. If you had previously executed deployall or had the install=true option 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 remove
  10. Start the software on the node that you converted:

    shell> startall
  11. If you issued --no-connectors during the update, restart the connectors when convenient

    shell> connector restart
  12. Check within cctrl from 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.