Skip to content

Keep the running node when Docker refuses its replacement (port CashPilot #675) #284

Open

Description

@GeiserX

A redeploy removes the running container before it creates the replacement. If Docker then refuses the replacement, the service is left with no container at all. For Mysterium this got more likely once it moved onto the fenced bridge: it now publishes its whole UDP range (30 ports by default) 1:1, and Docker fails the start if any host process holds one of those ports. No pre-check can catch this, because the running node itself holds the range until it is removed.

The web worker already handles it (GeiserX/CashPilot#675, "keep the running node when Docker refuses its replacement"). Port that behaviour to DockerProvider.Deploy in internal/runtime/runtime.go: stop the old container, create the replacement, and bring the old one back if the create or start fails, with a test where the fake daemon refuses the replacement. GeiserX/CashPilot#679 covers the related case of a box keeping its reserved UDP range through a refused deploy.

Raised in review: #283 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions