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] mount.fstab_present (etc.) should treat overlay as a special filesystem too #66912

Open
scy opened this issue Sep 21, 2024 · 0 comments
Open
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@scy
Copy link

scy commented Sep 21, 2024

Description
There is special logic in Salt to intelligently match a requested state to existing /etc/fstab entries (the auto value of match_on). It has an internal list of file systems where matching should be done on the target directory (aka fs_file) instead of the source device (aka name).

However, overlay (Linux's OverlayFS) is not on that list, resulting in fstab entries being overwritten if you don't manually change the matching by specifying match_on: name. (Please don't get confused, here name actually means target, even though in the YAML name is the source.)

Setup

  • on-prem machine
  • onedir packaging
  • masterless
  • Linux
  mount.fstab_present:
    - name: overlay
    - fs_file: /tmp/merged
    - fs_vfstype: overlay
    - fs_mntops: lowerdir=/tmp/ro,upperdir=/tmp/rw,workdir=/tmp/work
#   - match_on: name

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3007.1
 
Python Version:
        Python: 3.10.14 (main, Apr  3 2024, 21:30:09) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.16.0
      cherrypy: 18.8.0
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.4
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.7
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.5.2
        PyYAML: 6.0.1
         PyZMQ: 25.1.2
        relenv: 0.16.0
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 6.3.3
           ZMQ: 4.3.4
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: debian 12.7 bookworm
        locale: utf-8
       machine: x86_64
       release: 6.1.0-25-amd64
        system: Linux
       version: Debian GNU/Linux 12.7 bookworm
@scy scy added Bug broken, incorrect, or confusing behavior needs-triage labels Sep 21, 2024
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