9.45. The tungsten_reset_manager Command

Version Support: 5.3.7

The tungsten_reset_manager command was added in versions 5.3.7 and 6.0.5

The tungsten_reset_manager assists with the graceful reset of the manager's dynamic state files on disk.

  • The tungsten_reset_manager command stops the manager and then deletes the manager's dynamic state files.

  • For a proper service-wide reset to work, this command needs to be run on every node within the local cluster to ensure all managers have been stopped at the same time. This prevents any manager from storing an old state in memory.

  • The dynamic state files are automatically rebuilt when the manager is started.

  • The {TUNGSTEN_HOME}/tungsten/cluster-home/conf/cluster/{SERVICE_NAME}/datasource/ directory needs to be emptied, for example, given a service name of alpha and a TUNGSTEN_HOME of /opt/continuent, the full path would be /opt/continuent/tungsten/cluster-home/conf/cluster/alpha/datasource/.

  • The tungsten_reset_manager command requires the cluster to be in MAINTENANCE mode first.

    shell> tungsten_reset_manager
    Policy is not MAINTENANCE.
    
    Please select one node only and execute `echo "set policy maintenance" | cctrl`
    
    If you are sure the policy is maintenance you may proceed by using -f or --force
  • By default, the command expects the manager to be running so the policy may be checked. If you are sure the policy is maintenance you may proceed by using ether the -f or --force flags.

Table 9.77. tungsten_reset_manager Options

OptionDescription
--debug, -dEnable additional debug output.
--force, -fBypass manager and policy checks
--help, -hShow help text
--list, -lPrints out path(s) to be cleared. One per line.
--start, -sRestarts the Manager process.
--verbose, -vShow verbose output
--yes, -yBypass interactive confirmation prompt

Below is a sample session.

First, set policy to maintenance on a single node only:

shell> echo "set policy maintenance" | cctrl
Tungsten Clustering 6.0.4 build 27
north: session established, encryption=false, authentication=false
[LOGICAL] /alpha > set policy maintenance
policy mode is now MAINTENANCE
[LOGICAL] /alpha > 
Exiting...

Warning

Enable maintenance mode on a single host only.

On all nodes in the local cluster, execute the tungsten_reset_manager command:

shell> tungsten_reset_manager
About to stop the manager and empty directory:
   /opt/continuent/tungsten/cluster-home/conf/cluster/north/datasource

Do you wish to continue? [y/N] y
Stopping Tungsten Manager Service...
Stopped Tungsten Manager Service.
Manager directory /opt/continuent/tungsten/cluster-home/conf/cluster/north/datasource cleared.
	
Done!

Make sure all nodes have been cleared first, then execute `manager start` on each node one-by-one, starting with the Primary.

When all managers are running, pick one node and execute `echo "set policy automatic" | cctrl`

Once the tungsten_reset_manager command has completed successfully on all nodes in the local cluster, execute the manager start command on all nodes:

shell> manager start
Starting Tungsten Manager Service...
Waiting for Tungsten Manager Service..........
running: PID:3562

Once the manager has started successfully on all nodes in the local cluster, set policy to automatic on a single node only:

shell> echo "set policy automatic" | cctrl
Tungsten Clustering 6.0.4 build 27
north: session established, encryption=false, authentication=false
[LOGICAL] /alpha > set policy automatic
policy mode is now AUTOMATIC
[LOGICAL] /alpha > 
Exiting...

Warning

Enable automatic mode on a single host only.

At this point, the manager state should be completely back to normal. Check it using the cctrl> ls command.