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

[BUG] docker_container.running keeps unsetting MacAddress #65925

Open
dynek opened this issue Jan 24, 2024 · 1 comment
Open

[BUG] docker_container.running keeps unsetting MacAddress #65925

dynek opened this issue Jan 24, 2024 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@dynek
Copy link

dynek commented Jan 24, 2024

Description
I recently updated to Docker v25 and started having weird issues. Narrowed it down to MAC address collision and a google search led me to moby/moby#47146
So I unassigned all my containers from their network, reassigned them and everything's now OK from a network perspective.
Now, docker_container.running seems to have issue with this because all Salt managed containersare recreated upon each run. Salt is unsetting the MacAddress.

Setup

act_runner:
  docker_image.present:
    - name: {{ pillar['containers']['actrunner']['image'] }}:{{ pillar['containers']['actrunner']['tag'] }}@{{ pillar['containers']['actrunner']['digest'] }}
    - require:
      - pip: pip-docker
  docker_container.running:
    - image: {{ pillar['containers']['actrunner']['image'] }}:{{ pillar['containers']['actrunner']['tag'] }}@{{ pillar['containers']['actrunner']['digest'] }}
    - log_driver: gelf
    - detach: True
    - restart_policy: unless-stopped
    - network_mode: docker
    - networks:
      - docker:
        - aliases:
          - act_runner
    - binds:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /mnt/containers/act-runner/config.yaml:/config.yaml
      - /mnt/containers/act-runner/data:/data
    - environment:
      - GITEA_INSTANCE_URL: https://xyz.xyz.xyz
      - GITEA_RUNNER_REGISTRATION_TOKEN: XYZXYZXYZXYZXYZYXZYXZYXZ
      - CONFIG_FILE: /config.yaml
    - labels:
        diun.watch_repo: 'true'
        diun.exclude_tags: 'latest|rootless|nightly'
    - require:
      - pip: pip-docker
      - docker_image: act_runner
      - docker_network: docker
      - docker_container: gitea

Steps to Reproduce the behavior
Just declare and run the above.

Expected behavior
Once created, container should only be recreated if SLS or container changes, it should not be recreated upon each salt run.

Screenshots
image

Versions Report

salt --versions-report

Master:

Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: 1.15.1
      cherrypy: unknown
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: 1.5.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.4
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: 3.16.0
  pycryptodome: Not Installed
        pygit2: 1.11.1
        Python: 3.10.9 (main, Dec 12 2022, 17:52:15) [GCC 12.2.1 20220924]
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 24.0.1
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: alpine 3.17.0
        locale: utf-8
       machine: x86_64
       release: 6.5.11-7-pve
        system: Linux
       version: Alpine Linux 3.17.0

Minion:

Salt Version:
          Salt: 3005.4

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.8.2
     docker-py: 5.0.3
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.3
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.11.0
        pygit2: Not Installed
        Python: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 24.0.1
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: debian 12 bookworm
        locale: utf-8
       machine: x86_64
       release: 6.5.11-7-pve
        system: Linux
       version: Debian GNU/Linux 12 bookworm

Additional context
N/A

@dynek dynek added Bug broken, incorrect, or confusing behavior needs-triage labels Jan 24, 2024
@dynek
Copy link
Author

dynek commented Jan 24, 2024

Tried updating the master to 3006.4-r0 but I observe the same behavior on the minion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant