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

[3006.x] Docker systemd container identified as physical #67905

Open
1 of 9 tasks
furlongm opened this issue Mar 21, 2025 · 0 comments · May be fixed by #67906
Open
1 of 9 tasks

[3006.x] Docker systemd container identified as physical #67905

furlongm opened this issue Mar 21, 2025 · 0 comments · May be fixed by #67906
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@furlongm
Copy link

furlongm commented Mar 21, 2025

Description

The virtual and virtual_subtype grains in a systemd based Docker container shows as "physical" instead of "container". This seems to be because /proc/1/cgroup no longer contains the docker strings, which is what we test for:

# cat /proc/1/cgroup
0::/

Similar issue to #67733

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior

# salt-call --local grains.get virtual
local:
    physical
# salt-call --local grains.get virtual_subtype
local:

Expected behavior

# salt-call --local grains.get virtual
local:
    container
# salt-call --local grains.get virtual_subtype
local:
    Docker

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# salt-call --versions-report
Salt Version:
          Salt: 3006.10

Python Version:
        Python: 3.10.16 (main, Mar  6 2025, 02:23:15) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
  cryptography: 42.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.18.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: ubuntu 22.04.5 jammy
        locale: utf-8
       machine: x86_64
       release: 6.4.0-150600.23.33-default
        system: Linux
       version: Ubuntu 22.04.5 jammy

Additional context
PR for this issue is #67906

@furlongm furlongm added Bug broken, incorrect, or confusing behavior needs-triage labels Mar 21, 2025
@furlongm furlongm linked a pull request Mar 21, 2025 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant