Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchtower instance closing if one instance with one without scope #1788

Closed
SciLor opened this issue Oct 4, 2023 · 3 comments · Fixed by #1800
Closed

Watchtower instance closing if one instance with one without scope #1788

SciLor opened this issue Oct 4, 2023 · 3 comments · Fixed by #1800

Comments

@SciLor
Copy link

SciLor commented Oct 4, 2023

Describe the bug

I have one watchtower instance that should update all containers once a day. Two specific containers should be updated every minute.
The first watchtower is closing itself, if the second is already running.
If first is started before the second one it works fine..

Steps to reproduce

version: "3"
services:
  watchtower:
    image: containrrr/watchtower:latest
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --include-restarting --schedule "0 0 20 * * *" --stop-timeout 60s
    environment:
      - TZ=Europe/Berlin
      - WATCHTOWER_CLEANUP=true
    restart: unless-stopped
  watchtower-dev:
    depends_on:
      - watchtower
    image: containrrr/watchtower:latest
    container_name: watchtower-dev
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --include-restarting --schedule "* * * * *" --scope dev --stop-timeout 60s
    labels:
      - "com.centurylinklabs.watchtower.scope=dev"
    environment:
      - TZ=Europe/Berlin
      - WATCHTOWER_CLEANUP=true
    restart: unless-stopped

Expected behavior

Both watchtower instances should run in parallel. I cannot set a scope for all other containers.

Screenshots

No response

Environment

Latest docker

Your logs

time="2023-10-04T23:39:45+02:00" level=info msg="Waiting for running update to be finished..."
time="2023-10-04T23:39:47+02:00" level=info msg="Found multiple running watchtower instances. Cleaning up."
time="2023-10-04T23:39:47+02:00" level=info msg="Stopping /watchtower (629cc3cb148c) with SIGTERM"

Additional context

No response

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@piksel
Copy link
Member

piksel commented Oct 4, 2023

Yeah, this is due to the lack of a "default" scope for watchtower. All instances started without a scope should be considered belonging to the same "default" scope, instead of, like it is now, not understanding the scope concept. It seems like an oversight in the original implementation, but no one has made a fix for it as of yet.

@SciLor
Copy link
Author

SciLor commented Oct 4, 2023

Is there any workaround for that?

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

Successfully merging a pull request may close this issue.

2 participants