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

file type can't implicitly manage /

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
      None
    • Environment:

      Tested on:
      CentOS 6.2
      Debian 7.6 (Stable)

    • Template:
    • UX Priority:
      Trivial

      Description

      The file type doesn't appear to understand that '/' (the root of the filesystem) is a manageable directory target, unlike the behaviour with every single other unix path I've tried this on.

      If I use this, it fails:

      file

      { '/': }

      But this works:

      file

      { '/': path => '/', }

      On Debian:

      root@cwl:~# cat /tmp/x.pp
      file

      { '/': # path => '/', }

      root@cwl:~# puppet apply --debug /tmp/x.pp
      Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
      (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1095:in `block in issue_deprecations')
      Debug: Failed to load library 'selinux' for feature 'selinux'
      Notice: Compiled catalog for cwl in environment production in 0.08 seconds
      Error: Parameter path failed on File[/]: File paths must be fully qualified, not '' at /tmp/x.pp:3
      Wrapped exception:
      File paths must be fully qualified, not ''

      On CentOS:

      [root@myhost ~]# cat /tmp/x.pp
      file

      { '/': # path => '/', }

      [root@myhost ~]# puppet apply --debug /tmp/x.pp
      Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/hpsrl.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/iptables_persistent_version.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
      Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
      Notice: Compiled catalog for myhost in environment production in 0.13 seconds
      Error: Parameter path failed on File[/]: File paths must be fully qualified, not '' at /tmp/x.pp:3
      Wrapped exception:
      File paths must be fully qualified, not ''

      We discovered this while implementing more of our active and enthusiastic security team's hardening requirements.

      I filed priority and UX as "trivial" since while it's not treating / like other directories, I can specify the path and still use a file type.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                cwood Christopher Wood
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: