Is there any option in config of OpsCenter to automatically start repair service?

121 Views Asked by At

I made an OpsCenter and attach the cluster to it. I don't want to "click" manually to start repair service, instead, I want repair service to start by default (config?) Any help?

1

There are 1 best solutions below

1
Alex Ott On

You can use OpsCenter's REST API to trigger repair service, particularly, you need this repair service API, that is just posting the time to completion to the /{cluster_id}/services/repair endpoint. For example, if your time to complete is 9 days, the command could be:

curl -X POST -d '{"time_to_completion": 777600}' \
  http://<OpsC_hostname>:8888/<cluster_name>/services/repair

Please note, that if repair service is already enabled, you need to disable it with:

curl -X DELETE http://<OpsC_hostname>:8888/<cluster_name>/services/repair

and then enable with POST again.