|
I've managed to reproduce this, and my research makes me believe two things.
1) You have an invalid option in your mount resources (I suspect acl, as it came up as invalid for XFS on centos 7 in my testing) 2) There is a bug in the OS that is causing mount -o remount /path/to/mountpoint to silently fail when an invalid option is present in /etc/fstab
You should be able to check this yourself by comparing /etc/fstab and /etc/mtab. If I am correct, the mount options for the affected mountpoints will be different. If they are different, you can confirm that there is a bad option by doing a manual umount and then mount of the affected mountpoint. It ought to fail, and then dmesg can give you the invalid option.
So what has actually happened is that Puppet has been silently failing to remount filesystems when a mount resource contains invalid options. The point of
PUP-6457
was to surface error messages about failed remounts after the first failed run. In this case, since mount is exiting zero we have no error message to share. But the change has correctly revealed that the mounted filesystem does not match Puppet's expectations.
Below is my reproduction case. Note that mount -o remount /boot provides no output and returns 0.
[root@fad1og1xao9yeal ~]# cat test.pp
|
mount { '/boot':
|
dump => 1,
|
ensure => 'mounted',
|
device => 'UUID=4a9725cc-739a-45f5-8ea0-a83885eaeea0',
|
fstype => 'xfs',
|
options => 'defaults,foo',
|
pass => '2',
|
}
|
[root@fad1og1xao9yeal ~]# cat /etc/fstab
|
# HEADER: This file was autogenerated at 2016-11-02 14:38:42 -0700
|
# HEADER: by puppet. While it can still be managed manually, it
|
# HEADER: is definitely not recommended.
|
|
#
|
# /etc/fstab
|
# Created by anaconda on Thu Jul 10 12:29:49 2014
|
#
|
# Accessible filesystems, by reference, are maintained under '/dev/disk'
|
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
|
#
|
/dev/mapper/centos-root / xfs defaults 1 1
|
UUID=4a9725cc-739a-45f5-8ea0-a83885eaeea0 /boot xfs defaults 1 2
|
/dev/mapper/centos-swap swap swap defaults 0 0
|
/lib /tmp/lib none bind 0 0
|
[root@fad1og1xao9yeal ~]# /opt/puppetlabs/bin/puppet apply test.pp
|
Notice: Compiled catalog for fad1og1xao9yeal.delivery.puppetlabs.net in environment production in 0.15 seconds
|
Notice: /Stage[main]/Main/Mount[/boot]/options: options changed 'defaults' to 'defaults,foo'
|
Notice: /Stage[main]/Main/Mount[/boot]: Triggered 'refresh' from 1 events
|
Notice: Applied catalog in 0.08 seconds
|
[root@fad1og1xao9yeal ~]# /opt/puppetlabs/bin/puppet apply test.pp
|
Notice: Compiled catalog for fad1og1xao9yeal.delivery.puppetlabs.net in environment production in 0.13 seconds
|
Notice: /Stage[main]/Main/Mount[/boot]/options: options changed 'defaults,foo' to 'defaults,foo'
|
Notice: /Stage[main]/Main/Mount[/boot]: Triggered 'refresh' from 1 events
|
Notice: Applied catalog in 0.07 seconds
|
|
[root@fad1og1xao9yeal ~]# cat /etc/fstab
|
# HEADER: This file was autogenerated at 2016-11-02 14:55:38 -0700
|
# HEADER: by puppet. While it can still be managed manually, it
|
# HEADER: is definitely not recommended.
|
|
#
|
# /etc/fstab
|
# Created by anaconda on Thu Jul 10 12:29:49 2014
|
#
|
# Accessible filesystems, by reference, are maintained under '/dev/disk'
|
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
|
#
|
/dev/mapper/centos-root / xfs defaults 1 1
|
UUID=4a9725cc-739a-45f5-8ea0-a83885eaeea0 /boot xfs defaults,foo 1 2
|
/dev/mapper/centos-swap swap swap defaults 0 0
|
/lib /tmp/lib none bind 0 0
|
[root@fad1og1xao9yeal ~]# mount | grep /boot
|
/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
|
[root@fad1og1xao9yeal ~]# mount -o remount /boot
|
[root@fad1og1xao9yeal ~]# echo $?
|
0
|
[root@fad1og1xao9yeal ~]# umount /boot
|
[root@fad1og1xao9yeal ~]# mount /boot
|
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
|
missing codepage or helper program, or other error
|
|
In some cases useful info is found in syslog - try
|
dmesg | tail or so.
|
If I change the manifest to include an entirely known-good set of options (in this case, a subset of the values provided by defaults), then it behaves as-expected.
[root@fad1og1xao9yeal ~]# cat test.pp
|
mount { '/boot':
|
dump => 1,
|
ensure => 'mounted',
|
device => 'UUID=4a9725cc-739a-45f5-8ea0-a83885eaeea0',
|
fstype => 'xfs',
|
options => 'rw,attr2,inode64,noquota',
|
pass => '2',
|
}
|
[root@fad1og1xao9yeal ~]# puppet apply test.pp
|
Notice: Compiled catalog for fad1og1xao9yeal.delivery.puppetlabs.net in environment production in 0.14 seconds
|
Notice: /Stage[main]/Main/Mount[/boot]/options: options changed 'defaults,foo' to 'rw,attr2,inode64,noquota'
|
Notice: /Stage[main]/Main/Mount[/boot]: Triggered 'refresh' from 1 events
|
Notice: Applied catalog in 0.06 seconds
|
[root@fad1og1xao9yeal ~]# puppet apply test.pp
|
Notice: Compiled catalog for fad1og1xao9yeal.delivery.puppetlabs.net in environment production in 0.13 seconds
|
Notice: Applied catalog in 0.06 seconds
|
|