Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-509

Storage promise detects local filesystems as nfs filesystem



    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.x
    • Component/s: Promise type: storage
    • Labels:


      In the storage promise local filesystems are detected as nfs filesystems in some situations.
      The same local filesystem that exists on all our systems is sometimes detected as a local filesystem and sometimes as a nfs filesystem.
      Looking at the source of the nfs.c where the local mounts are detected this happens to all filesystems that are detected after a nfs filesystem. The nfs = true variable in LoadMountInfo function does not get a reset.

      I've attached a nfs.patch which fixes this issue.

      Running promise to check available space in a file system:
      _[root@lsrv8003 lib]# cf-agent -KIf /home/keeminks/filesystem.cf
      -> Filesystem /var/itlm's content seems to be sensible as promised
      Filesystem /var/itlm is mounted from a foreign system, so skipping it_

      The filesystem is local filesystem:
      _[root@lsrv8003 lib]# df -Ph /var/itlm
      Filesystem Size Used Avail Use% Mounted on
      /dev/mapper/vg.appl-lv.itlm 124M 22M 97M 19% /var/itlm_

      Running the promise with the patch:
      _[root@lsrv8003 lib]# cf-agent -KIf /home/keeminks/filesystem.cf
      -> Filesystem /var/itlm's content seems to be sensible as promised
      !! Disk space under 102400 kB for volume containing /var/itlm (98381 kB free)
      I: Report relates to a promise with handle ""
      I: Made in version 'not specified' of '/home/keeminks/filesystem.cf' near line 20
      R: Report: /var/itlm not enough space
      !! Method failed in some repairs or aborted_


        1. filesystem.cf
          0.6 kB
        2. nfs.patch
          0.1 kB



            • Assignee:
              a10039 Hichame Jeffali (Inactive)
              Sander Sander Keemink
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:

                Summary Panel