saltstack / saltstack/salt

"Forced unmount because devices don't match" every run for curlftpfs

Open
#53,561 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Confirmed Linux severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

mount.mounted state always force remount for curlftpfs mount with Forced unmount because devices don't match.
I believe this https://github.com/saltstack/salt/blob/8973ed2fd755d6579db6eee04a163c7db5735f36/salt/states/mount.py#L309 assumptions is false and mount.active actually returns string with curlftpfs#

Workaround device_name_regex: ftp://xxx:xxx@example.com/ helps

[INFO    ] {u'mount': True, u'umount': u"Forced unmount because devices don't match. Wanted: curlftpfs#ftp://xxx:xxx@example.com/ (ftp://xxx:xxx@example.com/), current: curlftpfs#ftp://xxx:xxx@example.com/, /root/curlftpfs#ftp:/xxx:xxx@example.com"}
Setup
# cat test.sls
curlftpfs:
  pkg:
    - installed

curlftpfs mount xxx:
  mount.mounted:
    - name: /opt/xxx
    - device: curlftpfs#ftp://xxx:xxx@example.com/
    - fstype: fuse
    - mount: True
    - mkmnt: True
    - persist: False
    - require:
      - pkg: curlftpfs
Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

# salt-call --versions-report
Salt Version:
           Salt: 2018.3.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.4.2
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.12 (default, Dec  4 2017, 14:50:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.3
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: UTF-8
        machine: x86_64
        release: 4.4.88-42
         system: Linux
        version: Ubuntu 16.04 xenial

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided test.sls and curlftpfs setup, then inspect salt/states/mount.py around the referenced line and the mount.active result. Compare the wanted and current device strings shown in the log; done means repeated state runs no longer force an unnecessary remount when the mount is already active.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.