Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alt.states.mount mount.mounted always remounting even if options were not changed #41491

Closed
adiroiban opened this issue May 30, 2017 · 3 comments
Labels
cannot-reproduce cannot be replicated with info/context provided info-needed waiting for more info stale
Milestone

Comments

@adiroiban
Copy link

Description of Issue/Question

The mount.mounted state will always do a remount even if the options are not changed

@lordcirth

Setup

# /dev/md0 - root
root mounting:
  mount.mounted:
    - name: /
    - device: UUID=139351d3-d69b-42b6-a21e-0edbca4b5bf6
    - fstype: ext4
    - opts:
      - rw,relatime,errors=remount-ro
    - dump: 0
    - pass_num: 1
    - persist: True

Steps to Reproduce Issue

I am running the above state on an already mounted partition

$ mount | grep md0
/dev/md0 on / type ext4 (rw,relatime,errors=remount-ro)

Im a running it multiple times, without changing anything, and I always get

          ID: root mounting
    Function: mount.mounted
        Name: /
      Result: True
     Comment: Target was already mounted. Entry already exists in the fstab.
     Started: 09:40:23.054178
    Duration: 555.31 ms
     Changes:   
              ----------
              umount:
                  Forced remount because options (rw,relatime,errors=remount-ro,remount) changed

I tried with both

    - opts:
      - rw,relatime,errors=remount-ro

and

    - opts:
      - rw,relatime,errors=remount-ro,remount

I got the same error for all the mount points.

The minion log is

2017-05-30 09:28:10,405 [salt.utils.lazy  ][DEBUG   ][60028] LazyLoaded mount.mounted
2017-05-30 09:28:10,405 [salt.state       ][INFO    ][60028] Running state [/] at time 09:28:10.405668
2017-05-30 09:28:10,406 [salt.state       ][INFO    ][60028] Executing state mount.mounted for /
2017-05-30 09:28:10,406 [salt.loaded.int.module.cmdmod][INFO    ][60028] Executing command 'mount -l' in directory '/root'
2017-05-30 09:28:10,415 [salt.loaded.int.module.cmdmod][DEBUG   ][60028] stdout: /dev/md0 on / type ext4 (rw,relatime,errors=remount-ro)

SNIP

2017-05-30 09:28:10,417 [salt.loaded.int.module.cmdmod][INFO    ][60028] Executing command 'blkid' in directory '/root'
2017-05-30 09:28:10,434 [salt.loaded.int.module.cmdmod][DEBUG   ][60028] stdout: /dev/sda1: UUID="3083a168-0863-c592-af67-7f6a109a38cc" U
UID_SUB="420c6632-21e9-7109-0e59-c392ccb97735" LABEL="deag:0" TYPE="linux_raid_member" 
/dev/sda2: UUID="48ff7e89-f4e6-f55f-4ca3-7ed429edc05f" UUID_SUB="70f605b9-aebd-25f9-137e-4cfb05835411" LABEL="deag:1" TYPE="linux_raid_me
mber" 

SNIP

/dev/md0: UUID="139351d3-d69b-42b6-a21e-0edbca4b5bf6" TYPE="ext4" 
/dev/md2: UUID="2d6e035b-087e-48d0-bc0b-e9964fb5c259" TYPE="ext4" 
/dev/md1: UUID="399d7eca-4f8e-4e76-8aad-022f0d4b5e15" TYPE="swap"

2017-05-30 09:28:10,437 [salt.loaded.int.module.cmdmod][INFO    ][60028] Executing command 'mount -l' in directory '/root'
2017-05-30 09:28:10,447 [salt.loaded.int.module.cmdmod][DEBUG   ][60028] stdout: /dev/md0 on / type ext4 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

SNIP

2017-05-30 09:28:10,448 [salt.loaded.int.module.cmdmod][INFO    ][60028] Executing command 'mount -o rw,relatime,errors=remount-ro,remount -t ext4 UUID=139351d3-d69b-42b6-a21e-0edbca4b5bf6 / ' in directory '/root'
2017-05-30 09:28:10,860 [salt.state       ][INFO    ][60028] {'umount': 'Forced remount because options (rw,relatime,errors=remount-ro) c
hanged'}
2017-05-30 09:28:10,861 [salt.state       ][INFO    ][60028] Completed state [/] at time 09:28:10.861309 duration_in_ms=455.641

Versions Report

chevah@deag:~$ salt --versions-report
Salt Version:
           Salt: 2016.11.5
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
      docker-py: Not Installed
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: 1.2.3
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
 
System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 3.13.0-119-generic
         system: Linux
        version: Ubuntu 14.04 trusty
@gtmanfred
Copy link
Contributor

What data is in /proc/self/mounts?

Also, if you could provide the output of the mount.active module?

Thanks,
Daniel

@gtmanfred gtmanfred added the info-needed waiting for more info label May 30, 2017
@gtmanfred gtmanfred added this to the Blocked milestone May 30, 2017
@lordcirth
Copy link
Contributor

This error does not occur for me in my salt-dev VM, 16.04 using / ext4 on sda1. I added 2 disks and made a raid1 ext4, the error does not occur there either. Cannot reproduce.

@gtmanfred gtmanfred added the cannot-reproduce cannot be replicated with info/context provided label May 30, 2017
@stale
Copy link

stale bot commented Oct 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Oct 28, 2018
@stale stale bot closed this as completed Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot-reproduce cannot be replicated with info/context provided info-needed waiting for more info stale
Projects
None yet
Development

No branches or pull requests

3 participants