Monit repeatedly detects filesystem flags changing on CentOS 7 when they're not
Issue #602
resolved
Since updating to Monit 5.22.0 (downloaded from the mmonit/monit page) on CentOS Linux release 7.3.1611 (Core) monit starts detecting the file system flags as changing even though they aren't, examples logs:
monit: 'rootfs' filesystem flags changed to rw,seclabel,relatime,attr2,inode64,noquota
monit: 'rootfs' filesystem flags has not changed [current flags rw,seclabel,relatime,attr2,inode64,noquota]
monit: 'rootfs' filesystem flags changed to rw,seclabel,relatime,attr2,inode64,noquota
monit: 'rootfs' filesystem flags has not changed [current flags rw,seclabel,relatime,attr2,inode64,noquota]
monit: 'rootfs' filesystem flags changed to rw,seclabel,relatime,attr2,inode64,noquota
monit: 'rootfs' filesystem flags has not changed [current flags rw,seclabel,relatime,attr2,inode64,noquota]
monit: 'rootfs' filesystem flags changed to rw,seclabel,relatime,attr2,inode64,noquota
monit: 'rootfs' filesystem flags has not changed [current flags rw,seclabel,relatime,attr2,inode64,noquota]
Reverting to monit 5.21.0 has stopped the notifications.
Comments (5)
-
repo owner -
repo owner - changed status to resolved
-
reporter I tried the master version and it works perfectly thanks :)
-
repo owner Issue
#612was marked as a duplicate of this issue. -
Hey there. Do you have an estimated time for a next release? This bug is rather annoying as it keeps spamming our admin mailbox. So we're really looking forward to the next monit release :)
- Log in to comment
The problem may occur, if you monitor the root filesystem using the mountpoint ("/") and the system has an rootfs overlay like this:
When monit scans the table, it finds the first rootfs mount with "rw" flags and then the second entry for /dev/sda1 with "rw,data=ordered" flags. This triggers the filesystem change event. The virtual rootfs filesystem is present on some platforms only (for example Ubuntu doesn't show it).
Workaround: use device instead of mountpoint for root filesystem monitoring (the device is more specific and doesn't match the whole overlay mount tree).
We have fixed the problem in the development version (https://bitbucket.org/tildeslash/monit/commits/2b314d33f0c09f8fccaf80cc42acbee6025406fe), if you want to test, you can compile it this way: