Remotely update service tags on client node

Hi @xyphanajay,
Thanks for that run down! Definitely very detailed, and helps us debug better!

To update the tags, you will use the catalog endpoint. The reason for using the catalog endpoint is that agent endpoints only query the local agent. They do not query the catalog. When you called agent/register on the server, it’s registering the service locally first, then attempting to push it to the catalog, and likely failing due to the conflicting service ID.

First, add enable_tag_override: true in your service configuration file file.json. This allows tags for that service to be updated directly in the catalog. You can read more about it here

Then, update the service tags from the /catalog/register API endpoint. The payload should contain the full service definition with updated tags, as well as the client node’s information like the datacenter, node name, and address. This maps to step 3 in your previous post.

Last, query the catalog to confirm the tags changed.

Additional Info:
By editing the registration in the catalog directly, the tag update can be done by any agent in the datacenter. To get the latest tags from the catalog you will need to query an endpoint such as /catalog/service or /health/service.
Looking forward to hearing your experiences with updating tags centrally.

A more in depth description of the anti-entropy model can be found here.