-
Notifications
You must be signed in to change notification settings - Fork 86
Description
I am using Docker version 28.0.1. After initializing a Docker Swarm cluster, I executed the following command to limit the task history:
docker swarm update --task-history-limit 1
However, after deploying and repeatedly updating services, I noticed that each task still retains more than one historical record, which seems to indicate that the --task-history-limit option is not working as expected.
Is this a known issue, or am I missing something? Any guidance would be appreciated.
Steps to Reproduce:
Initialize a Docker Swarm cluster.
Run docker swarm update --task-history-limit 1.
Deploy a service and update it multiple times.
Check the task history using docker service ps <service_name>.
Expected Behavior:
Only one historical task record should be kept per service.
Actual Behavior:
More than one historical task record is retained.
root@docker-swarm-manager:~# docker info | grep "Task History"
Task History Retention Limit: 1
Client: Docker Engine - Community
Version: 28.0.1
API version: 1.48
Go version: go1.23.6
Git commit: 068a01e
Built: Wed Feb 26 10:41:08 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 28.0.1
API version: 1.48 (minimum version 1.24)
Go version: go1.23.6
Git commit: bbd0a17
Built: Wed Feb 26 10:41:08 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.25
GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc:
Version: 1.2.4
GitCommit: v1.2.4-0-g6c52b3f
docker-init:
Version: 0.19.0
GitCommit: de40ad0