Skip to main content
Common Reference

tpm delete-service

The tpm delete-service command allows you to cleanly remove a dataservice from your cluster, or a single replication service from a standalone replicator installation.

The tpm delete-service command will know if it is being run from the Clustering software or the Replicator software, and will act accordingly

Usage
tpm delete-service [args] [service_name] [configuration_service_name]

See the table below for a list of valid arguments:

OptionDescriptionVersion
--apiUse the v2 API REST interface instead of the command line when possible.
--auto
Aliases: -A
Automatically execute any needed commands that it is possible to handle.
--debug
Aliases: -d
Debug mode.
--help
Aliases: -h
--i-am-sureBypass the 'Are You Sure?' prompt when using --auto
--i-have-run-tpm-updateFor Staging-method installations, pass this flag to confirm that the tools/tpm update --replace-releasecommand has already been run from the staging directory.
--info
Aliases: -i
--newini
Aliases: -n
Pass the fullpath (and filename) to an INI file to be used at the 'Edit INI' step.
--path
Aliases: -p
Pass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin
--quiet
Aliases: -q
--test
Aliases: -t
--thlPath and name of thl executable (Ignores --path if also supplied)
--trepctlPath and name of trepctl executable (Ignores --path if also supplied)
-fPass the force flag to tpm.
-vVerbose Output.

[service_name] is the Replicator service name as seen in trepctl services, or for Tungsten Clustering users, the datasource name as seen via cctrl.

[configuration_service_name] is the Replicator service name as seen in tpm reverse, and only needed for standalone Replicator installations where the service name in the configuration is not the same as the actual replication service name, i.e. in cluster-extractor topologies where there is a cluster-alias employed.

The default behavior is to display the needed commands for the admin to execute manually.

To use this tool in a fully automated manner:

  • specify --auto
  • include --i-am-sure to bypass most interactive prompts
  • include --newini [filename] otherwise you will be prompted to edit the INI file in the vi editor before proceeding

Use-cases

  • Tungsten Replicator: i.e. for Standalone, Cluster-Extractor, Fan-In and Multi-Site/Active-Active topologies where there is a discrete Replicator running outside of a Cluster (needs Replicator workflow)
  • Composite Active/Passive Clusters: remove a composite member cluster (needs Manager workflow)
  • Composite Active/Active Clusters: remove a composite member cluster (needs Manager + Replicator workflow)

Workflow

  1. Replicator Workflow

    shell> trepctl -all-services offline
    shell> rm tungsten-replicator/conf/static-SERVICE.properties
    shell> rm tungsten-replicator/conf/.static-SERVICE.properties.orig
    shell> replicator restart
    shell> trepctl -all-services online

    Remove the various directories after the restart so that the replicator no longer has the dirs open :

    shell> rm -rf thl/SERVICE/
    shell> rm -rf relay/SERVICE/
    shell> trepctl -all-services online
  2. Manager Service (For Tungsten Clustering Users):

    shell> cctrl
    cctrl> set policy maintenance
    cctrl> use composite_parent
    cctrl> drop composite datasource SERVICE

    Remove [SERVICE] line(s) from cluster-home/conf/dataservices.properties

    • CAA & CAP: Remove lines matching /^SERVICE=/
    • CAA only: Remove lines matching /^.+?_from_SERVICE=/
    • If CAA, also follow Replicator Service workflow for *_from_SERVICE

    Finish by running an update and returning cluster to AUTOMATIC

    shell> tpm update
    or
    shell> manager restart
    shell> cctrl
    cctrl> set policy automatic
note

tpm uninstall should also be run as a final optional step if the service being deleted is the only service on any affected hosts.