Prepares a replica set's master process to be taken out of service without losing read availability. First, it is ensured that at least one replica exists: if no running replica is found in the set, a new one is started. Then all replicas stop replicating the current master, and the master is de-registered from both target groups so that it no longer receives traffic. The master process itself is left running; this service does not terminate it or its host. It is typically used as a preparatory step before other maintenance on the master. Because it de-registers the master that may be serving a race being tracked live, see the force parameter below.
| Webservice Type: | POST |
| Output format: | json |
| Mandatory query parameters: |
regionId, region where the replica set is located, e.g., eu-west-1
replicaSetName, name of the replica set; used as the hostname to which the domain name is appended, as well as
for the database and RabbitMQ exchange name
|
| Optional form parameters: |
keyName, the name of the SSH key to use; must identify an existing SSH key by that name in the region specified
and will be used to log on to existing and new instances using a root ssh connection. If not specified, the
key used to launch an instance will be used for trying to connect to it, and a private key with matching name
for the respective region will be looked up.
privateKeyEncryptionPassphrase, the pass phrase to decrypt the private key for the key specified by the keyName parameter
replicaReplicationBearerToken, the bearer token a newly started replica will use to replicate its master server; defaults to the
bearer token of the user authenticated for this request. Note that this requires the
server processing this request to share the security information from security-service.sapsailing.com, too.
timeoutInMilliseconds, timeout in milliseconds to wait for responses from nodes when analyzing the replica sets
existing in the region; if not specified, waiting will not time out.
force, boolean value defaulting to false. Before de-registering the master, the replica set is
checked for live content, that is, races that are currently being tracked live. Taking the master
out of the target groups while a race is tracked live on it would interrupt that live tracking. If live
content is detected and force is false (the default), the operation is aborted and the
service responds with HTTP status 409 Conflict and a JSON body describing the offending replica
set, events and races (the body has the same structure as the response of the
live-content service). Set
force to true to bypass this safety check and proceed regardless of any live content,
knowingly accepting the disruption of any live tracking.
|
| Request method: | POST |
| Example: | curl -X POST -d 'regionId=eu-west-2' -d 'replicaSetName=mynewevent' -d 'keyName=Horst' --data-urlencode 'privateKeyEncryptionPassphrase=HorstsSuperSecretPassword' -H 'Authorization: Bearer RwGK+DV38LKjeuDu+Bx87/3blLJHD7Ff+NCLeud9nRQ=' "https://sapsailing.com/sailinglandscape/api/landscape/stopreplicatingandremovemasterfromtargetgroups" produces output (additionalReplicaStarted is true if a new replica had to be started because none was running):
{
"additionalReplicaStarted": false
}
|