Docker Swarm API client has the following meta information for a service:
Meta.UpdatedAt
Is this the timestamp of last user-initiated update (e.g. change service configuration) OR is it a timestamp of any change on service, that even Docker Swarm performs?
For example, if my swarm service has 5 tasks spread across cluster, and then Docker for some reason move one task from one node to another node (so the service configuration is NOT changed); would it update this field?
Short answer: No this won't.
If you look at the source code,
meta.UpdatedAtis changed through thetouchMetamethod that is called byupdate. For a service, the method handling this isUpdateService, which is linked to thedocker service updatecli command. So technically,meta.UpdatedAtis updated only when you usedocker service update.You can test this quickly by following this scenario on your local machine or cluster:
The
meta.UpdatedAtfield should be left unchanged.Now call
docker service update redis --replicas 10and you should see the new timestamp.