Monit repeatedly detects filesystem flags changing on CentOS 7 when they're not

Issue #602 resolved
rwky
created an issue

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)

  1. Tildeslash repo owner

    The problem may occur, if you monitor the root filesystem using the mountpoint ("/") and the system has an rootfs overlay like this:

    $ cat /proc/mounts 
    rootfs / rootfs rw 0 0
    /dev/sda1 / ext3 rw,data=ordered 0 0
    

    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:

    wget https://bitbucket.org/tildeslash/monit/get/master.tar.gz
    tar -xzf master.tar.gz
    cd tildeslash*
    ./bootstrap
    ./configure
    make
    
  2. Jonas Meurer

    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 :)

  3. Log in to comment