nfs options missing from active mounts on freebsd
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
# salt-ssh some-freebsd-server mount.active extended=True
...
/mnt/backups:
----------
device:
192.168.1.20:/srv/backups
fstype:
nfs
opts:
- rw
# mount -p
192.168.1.20:/srv/backups /mnt/backups nfs rw 0 0
# nfsstat -m
192.168.1.20:/srv/backups on /mnt/backups
nfsv3,tcp,resvport,hard,cto,lockd,sec=sys,acdirmin=3,acdirmax=60,acregmin=5,acregmax=60,nametimeo=60,negnametimeo=60,rsize=65536,wsize=65536,readdirsize=65536,readahead=1,wcommitsize=8388608,timeout=120,retrans=2
On FreeBSD Salt is using mount -p under the hood which is not sufficient for NFS mounts. We'd need an additional nfsstat -m AFAIK.
This leads to incorrectly applied mount.mounted when already mounted with correct options on FreeBSD: Forced unmount and mount because options (wsize=65536) changed
/mnt/backups:
mount.mounted:
- device: 192.168.1.20:/srv/backups
- fstype: nfs
- opts: rw,rsize=65536,wsize=65536
- persist: True
- mkmnt: True
Somewhat related to #18630. For now I'm just avoiding to mount when already mounted:
/mnt/backups:
mount.mounted:
...
- unless: ['df | grep -q /mnt/backups']
Setup
salt-ssh from my arch linux to freebsd-12 server.
Steps to Reproduce Issue
Versions Report
# freebsd-version
12.0-RELEASE-p8
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.12.3
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.34.0
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 3.8.2
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.16 (default, Mar 11 2019, 18:59:25)
python-gnupg: Not Installed
PyYAML: 5.1.1
PyZMQ: 18.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 5.1.1
ZMQ: 4.3.1
System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 5.2.3-1-ck-broadwell
system: Linux
version: Not Installed
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 with the mount.active behavior described for FreeBSD and compare the reported output from mount -p with nfsstat -m. Trace how those options feed into mount.mounted, then verify that an already-mounted NFS filesystem with matching options is not unnecessarily unmounted and remounted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100