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

static_compiler: symlinks in recursed directories don't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.7, PUP 4.5.2
    • Fix Version/s: PUP 4.6.0
    • Component/s: Types and Providers
    • Labels:
      None
    • Environment:

      Ruby 2.1, Linux

    • Template:
    • Acceptance Criteria:
      Hide

      The generated File resource should contain a target property so that the symlink can be created.

      Show
      The generated File resource should contain a target property so that the symlink can be created.
    • Story Points:
      0
    • Sprint:
      Client 2016-06-29, Client 2016-07-13 (HA, 1.5.3)
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      This change fixes an issue in the (now deprecated) static compiler where symlinks in recursed directories did not end up with {{target}} attributes, causing Puppet to fail to manage them.

      Note that this only affects the static compiler, and *not* the newer static catalog functionality which was added as part of the direct puppet workflow.
      Show
      This change fixes an issue in the (now deprecated) static compiler where symlinks in recursed directories did not end up with {{target}} attributes, causing Puppet to fail to manage them. Note that this only affects the static compiler, and *not* the newer static catalog functionality which was added as part of the direct puppet workflow.

      Description

      When using the static_compiler terminus with a resource definition like the following:

          file { '/tmp/somedir':
              ensure  => directory,
              owner   => 'root',
              group   => 'root',
              links   => 'manage',
              mode    => '0644',
              recurse => true,
              source  => 'puppet:///modules/mymodule/somedir/',
          }
      

      When the source directory contains a symlink, catalog application aborts because the symlink has no target:

      Error: /Stage[main]/Mymodule::Myclass/File[/tmp/somedir/foo]/ensure: change from absent to link failed: Cannot create a symlink without a target
      

      I have a patch for this bug that I will send in via GitHub shortly. Unfortunately, writing an rspec test to check for this condition is beyond my grasp of Ruby.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  bootc Chris Boot
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: