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

static_compiler: symlinks in recursed directories don't work

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 3.8.7, PUP 4.5.2
    • PUP 4.6.0
    • Types and Providers
    • None
    • Ruby 2.1, Linux

    • 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.
    • 0
    • Client 2016-06-29, Client 2016-07-13 (HA, 1.5.3)
    • Bug Fix
    • 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

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support