Skip to content

[BUG] mount.fstab_present not idempotent in test mode #67065

@tacerus

Description

@tacerus

Description

kvm_mount:
  mount.fstab_present:
    - name: 'example.com:/kvm'
    - fs_file: /kvm
    - fs_vfstype: nfs4
    - not_change: true
    - fs_mntops: defaults,sec=sys

If the entry in /etc/fstab already matches, Salt will always report the following in test mode in yellow:

          ID: kvm_mount
    Function: mount.fstab_present
        Name: example.com:/kvm
      Result: None
     Comment: /kvm entry is already in /etc/fstab.
     Started: 12:32:35.298712
    Duration: 2.222 ms
     Changes:

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
(Include debug logs if possible and relevant)

Expected behavior

It should report in green with no pending changes.

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.)
PASTE HERE

Additional context

I will submit a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions