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

Puppet apply recursive copy of directory fails in file resource

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Agent OS:
      CentOS 7
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fixes a regression in puppet 6.14.0 that prevented the "puppet apply" application from recursively copying a directory from a module using a "puppet://" URL.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.14.0
      Puppet Server Version: NA
      OS Name/Version: Centos 7

      In Puppet 6.14 copying a puppet served directory fails. Here is an example

       file { '/a':
        ensure  => 'directory',
        source  => "puppet:///modules/test",
        recurse => true,
        purge   => true,
      }

      Now fails with this error

      [root@rcudb vagrant]# puppet apply test_case.pp
      Notice: Compiled catalog for rcudb.example.com in environment production in 0.05 seconds
      Notice: /Stage[main]/Main/File[/a]/ensure: created
      Error: Could not set 'file' on ensure: Is a directory @ io_fread - /etc/puppetlabs/code/environments/production/modules/test/files
      Error: Could not set 'file' on ensure: Is a directory @ io_fread - /etc/puppetlabs/code/environments/production/modules/test/files
      Wrapped exception:
      Is a directory @ io_fread - /etc/puppetlabs/code/environments/production/modules/test/files
      Error: /Stage[main]/Main/File[/a/a.a]/ensure: change from 'absent' to 'file' failed: Could not set 'file' on ensure: Is a directory @ io_fread - /etc/puppetlabs/code/environments/production/modules/test/files
      Notice: Applied catalog in 0.42 seconds

       

      Desired Behavior:

      With puppet version puppet-agent.x86_64 0:6.13.0-1.el7 This works as expected:

      root@rcudb vagrant]# puppet apply test_case.pp
      Notice: Compiled catalog for rcudb.example.com in environment production in 0.06 seconds
      Notice: /Stage[main]/Main/File[/a]/seltype: seltype changed 'etc_runtime_t' to 'default_t'
      Notice: /Stage[main]/Main/File[/a/a.a]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
      Notice: Applied catalog in 0.47 seconds

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              josh Josh Cooper
              Reporter:
              hajee Bert Hajee
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support