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

Creating a file called /etc/facter causes an error in facter which makes puppet agent not run

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.7.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • CS Priority:
      Reviewed

      Description

      Steps to repro in PE3.7:

      [root@master371-centos ~]# puppet --version
      3.7.3 (Puppet Enterprise 3.7.1)
      [root@master371-centos ~]# touch /etc/facter
      [root@master371-centos ~]# puppet agent -t
      Error: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      

      OR

      [root@master371-centos ~]# puppet --version
      3.7.3 (Puppet Enterprise 3.7.1)
      [root@master371-centos ~]# mkdir /etc/facter; touch /etc/facter/facts.d
      [root@master371-centos ~]# puppet agent -t
      Error: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      Could not autoload puppet/type/user: Could not autoload puppet/provider/user/useradd: Not a directory - /etc/facter/facts.d
      [root@master371-centos ~]#
      

      Steps to repro in PE3.3.2:

      [root@master332-centos ~]# touch /etc/facter/facts.d
      [root@master332-centos ~]# puppet agent -t
      /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `open': Not a directory - /etc/facter/facts.d (Errno::ENOTDIR)
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `entries'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `entries'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:55:in `load'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `block in load'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `each'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `load'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:154:in `load_external_facts'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:110:in `load'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:84:in `fact'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:140:in `value'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter.rb:112:in `block (2 levels) in singletonclass'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:4:in `default_diffargs'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:231:in `<module:Puppet>'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:1:in `<top (required)>'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet.rb:111:in `<module:Puppet>'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet.rb:29:in `<top (required)>'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/util/command_line.rb:12:in `<top (required)>'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
          from /usr/local/bin/puppet:7:in `<main>'
      

      OR

      [root@master332-centos ~]# touch /etc/facter
      [root@master332-centos ~]# puppet agent -t
      /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `open': Not a directory - /etc/facter/facts.d (Errno::ENOTDIR)
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `entries'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:75:in `entries'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/directory_loader.rb:55:in `load'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `block in load'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `each'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/composite_loader.rb:10:in `load'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:154:in `load_external_facts'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:110:in `load'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:84:in `fact'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter/util/collection.rb:140:in `value'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/facter.rb:112:in `block (2 levels) in singletonclass'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:4:in `default_diffargs'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:231:in `<module:Puppet>'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/defaults.rb:1:in `<top (required)>'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet.rb:111:in `<module:Puppet>'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet.rb:29:in `<top (required)>'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/util/command_line.rb:12:in `<top (required)>'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      	from /usr/local/bin/puppet:7:in `<main>'
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                nick.walker Nick Walker
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support