Skip to content

Resetting restart policy state #34007

@sean-fabri

Description

@sean-fabri

I am setting the --restart-max-attempts to 1 on the docker service create command.

Behaviour is:

  • I kill the container, and a new one comes up. This is fine.
  • I kill the new one and the service stays "shutdown". This is also fine.
  • I perform a manual restart docker service update --force
  • If I kill the container now I don't get my restart attempts back and the service stays shutdown. It seems the only way of resetting the attempted restarts is by removing and adding the service.

Should service update reset the attempted restarts? Or should there be a "--restart-reset-window" option? There is a --restart-window option but I understand this to be the time period to enforce the restart policy rather than the time period to reset restart policy state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/swarmkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.status/claimed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions