Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1415

Mount resource error silently skipped at times when running as daemon



    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 2.7.23
    • Fix Version/s: PUP 3.5.1
    • Component/s: Types and Providers
    • Labels:
    • Environment:

      CentOS 6.4 x64

    • Template:


      I have a host where puppet is running as daemon, refreshing every 30 minutes as per default, and a custom class is applied.

      The class contains:

      1. A "file" resource to ensure a directory is created.
      2. A "package" resource to ensure the nfs-utils RPM is installed.
      3. A "mount" resource to mount a NFS share into the directory created in 1 and add the related line to /etc/fstab. This resource requires resources 1 and 2.
      4. A "yumrepo" resource which creates and enables a local yum repository whose files are located in the mounted share. This requires resource 3.

      The host has a preexisting problem in its fstab file: there is one custom line which starts with leading spaces, which appears to be a somewhat invalid syntax (cannot find official docs about this, though).

      Due to this problem in fstab, any manual puppet run e.g. "puppet agent --test" fails when applying the mount resource and flushing the fstab file, which is ok ("Could not evaluate: Field 'device' is required").

      The real problem happens with periodic automated runs: a first run correctly stops at the mount resource, but the second run terminates with no errors even though it cannot successfully mount the share, and what's worse, it even applies the yumrepo resource, thus ignoring the "require" parameter.

      A third run stops again on mount, while a fourth behaves like the second one, and so on. Puppet alternates endlessly between the two behaviours.

      This is of course very confusing, and also leaves the machine in a broken state, with a configured repository which actually doesn't work.

      I attach the log obtained with "--debug --verbose --logdest /var/log/puppet/debug.log". It contains output from two subsequent runs: the first stops at the mount error, while the second one skips it and applies the yumrepo.




            ffrank Felix Frank
            starless Marco De Vitis
            1 Vote for this issue
            3 Start watching this issue



                Zendesk Support