Trying to understand why mount.mounted created a duplicate fstab entry if the existing entry doesn't have the dump pass_num fields listed (
0 0)
BEFORE
#grep test /etc/fstab
someshare:/test /mnt1 nfs bg,hard,vers=3,intr,timeo=600,tcp 0 0
someshare:/test /mnt2 nfs soft 0 0
someshare:/test /mnt3 nfs bg,hard,vers=3,intr,timeo=600,tcp
run Salt NFS state. state basically does some checks to make sure certain options are enabled and also retains any existing options outside of those set by state if they don't conflict
{{mount_point}}:
mount.mounted:
- device: {{mount_source}}
- fstype: nfs
- opts: {{std_opt}}{% print ','.join(tar_opt) %}
- mount: False
- dump: 0
- mkmnt: True
- pass_num: 0
- persist: True
AFTER
mnt1 - no change
mnt2 - additional options put in place
mnt3 - dupicate entry. original entry still exists and now there is a new entry with the dump passnum (0 0) values. I would expect Salt to update the existing line and not recreate leaving the old line in place.
#grep test /etc/fstab
someshare:/test /mnt1 nfs bg,hard,vers=3,intr,timeo=600,tcp 0 0
someshare:/test /mnt2 nfs soft,hard,vers=3,intr,timeo=600,tcp 0 0
someshare:/test /mnt3 nfs bg,hard,vers=3,intr,timeo=600,tcp
someshare:/test /mnt3 nfs bg,hard,vers=3,intr,timeo=600,tcp 0 0