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

Puppetmaster removes /etc/puppet/environments/production if it's a link rather than a directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.7.0
    • Fix Version/s: PUP 3.7.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Platform 2014-09-17

      Description

      We use puppet environments, and symlink the puppet folder of one of our git repos to /etc/puppet/environment.

      This is how it looks like:
      #:/etc/puppet/environments$ ls -l
      total 4
      lrwxrwxrwx 1 root root 47 Jul 4 10:05 user1 -> /var/lib/ops-automation.user1/puppet
      lrwxrwxrwx 1 root root 49 Jul 4 10:05 user2 -> /var/lib/ops-automation.user2/puppet
      lrwxrwxrwx 1 root root 49 Jul 4 10:05 production -> /var/lib/ops-automation.production/puppet

      After we upgraded to puppet 3.7.0 this morning, Puppet would remove the symlink /etc/puppet/environment/production and replace it with an empty folder. Reverting to 3.6.2 fixed the issue for us.

      I suspect it might be linked to this patch:
      https://github.com/puppetlabs/puppet/pull/2646/files#diff-13

      It seems to ensure the environment folder is a directory and manage it if this, among other things, is true:
      Puppet::FileSystem.exist?(envdir)

      Though in our case, the file exists but isn't a directory. If I'm right with this assumption, testing if the filepath is a directory rather than checking if the filepath exists could fix it...

      Thanks!

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              yannh Yann HAMON
              QA Contact:
              Eric Thompson
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support