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
tpm delete-service [args] [service_name] [configuration_service_name]
See the table below for a list of valid arguments:
| Option | Description | Version |
|---|---|---|
--api | Use the v2 API REST interface instead of the command line when possible. | |
--autoAliases: -A | Automatically execute any needed commands that it is possible to handle. | |
--debugAliases: -d | Debug mode. | |
--helpAliases: -h | ||
--i-am-sure | Bypass the 'Are You Sure?' prompt when using --auto | |
--i-have-run-tpm-update | For Staging-method installations, pass this flag to confirm that the tools/tpm update --replace-releasecommand has already been run from the staging directory. | |
--infoAliases: -i | ||
--newiniAliases: -n | Pass the fullpath (and filename) to an INI file to be used at the 'Edit INI' step. | |
--pathAliases: -p | Pass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin | |
--quietAliases: -q | ||
--testAliases: -t | ||
--thl | Path and name of thl executable (Ignores --path if also supplied) | |
--trepctl | Path and name of trepctl executable (Ignores --path if also supplied) | |
-f | Pass the force flag to tpm. | |
-v | Verbose 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-sureto 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
Replicator Workflow
shell> trepctl -all-services offlineshell> rm tungsten-replicator/conf/static-SERVICE.propertiesshell> rm tungsten-replicator/conf/.static-SERVICE.properties.origshell> replicator restartshell> trepctl -all-services onlineRemove 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 onlineManager Service (For Tungsten Clustering Users):
shell> cctrlcctrl> set policy maintenancecctrl> use composite_parentcctrl> drop composite datasource SERVICERemove
[SERVICE]line(s) fromcluster-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 updateorshell> manager restartshell> cctrlcctrl> set policy automatic- CAA & CAP: Remove lines matching
tpm uninstall should also be run as a final optional step if the service being deleted is the only service on any affected hosts.