[BUG] `mount.fstab_present` not idempotent in test mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Salt's mount.fstab_present implementation and its existing tests, then reproduce the reported behavior with a matching /etc/fstab entry and test mode enabled. Done means an already-matching entry reports green with no pending changes, while changes still appear when needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100