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

With a gem install of puppet, when run as root, 'puppet {agent|apply}' fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: PUP 4.0.0
    • Fix Version/s: PUP 4.2.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      3
    • Sprint:
      Client 2015-05-13, Client 2015-05-27
    • Release Notes:
      Bug Fix

      Description

      This is because of the new AIO paths. For package installs, these directories are created, and for non-root users, the appropriate directories are created. But gem installs run as root will run into something like this:

      [root@om6o1hcgialwa9i ~]# puppet apply -e 'notice foo'
      Notice: Scope(Class[main]): foo
      Notice: Compiled catalog for om6o1hcgialwa9i.delivery.puppetlabs.net in environment production in 0.36 seconds
      Error: Cannot create /etc/puppetlabs/puppet; parent directory /etc/puppetlabs does not exist
      Error: /File[/etc/puppetlabs/puppet]/ensure: change from absent to directory failed: Cannot create /etc/puppetlabs/puppet; parent directory /etc/puppetlabs does not exist
      Error: Cannot create /etc/puppetlabs/code; parent directory /etc/puppetlabs does not exist
      Error: /File[/etc/puppetlabs/code]/ensure: change from absent to directory failed: Cannot create /etc/puppetlabs/code; parent directory /etc/puppetlabs does not exist
      Error: Cannot create /opt/puppetlabs/puppet/cache; parent directory /opt/puppetlabs/puppet does not exist
      Error: /File[/opt/puppetlabs/puppet/cache]/ensure: change from absent to directory failed: Cannot create /opt/puppetlabs/puppet/cache; parent directory /opt/puppetlabs/puppet does not exist
      Error: Cannot create /var/log/puppetlabs/puppet; parent directory /var/log/puppetlabs does not exist
      Error: /File[/var/log/puppetlabs/puppet]/ensure: change from absent to directory failed: Cannot create /var/log/puppetlabs/puppet; parent directory /var/log/puppetlabs does not exist
      Notice: /File[/opt/puppetlabs/puppet/cache/state]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/state]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/lib]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/lib]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl/certs]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl/certs]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl/public_keys]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl/public_keys]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl/certificate_requests]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl/certificate_requests]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl/private_keys]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl/private_keys]: Skipping because of failed dependencies
      Notice: /File[/etc/puppetlabs/puppet/ssl/private]: Dependency File[/etc/puppetlabs/puppet] has failures: true
      Warning: /File[/etc/puppetlabs/puppet/ssl/private]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/client_yaml]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/client_yaml]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/client_data]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/client_data]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/clientbucket]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/clientbucket]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/state/graphs]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/state/graphs]: Skipping because of failed dependencies
      Notice: /File[/opt/puppetlabs/puppet/cache/facts.d]: Dependency File[/opt/puppetlabs/puppet/cache] has failures: true
      Warning: /File[/opt/puppetlabs/puppet/cache/facts.d]: Skipping because of failed dependencies
      Error: Got 4 failure(s) while initializing: File[/etc/puppetlabs/puppet]: change from absent to directory failed: Cannot create /etc/puppetlabs/puppet; parent directory /etc/puppetlabs does not exist; File[/etc/puppetlabs/code]: change from absent to directory failed: Cannot create /etc/puppetlabs/code; parent directory /etc/puppetlabs does not exist; File[/opt/puppetlabs/puppet/cache]: change from absent to directory failed: Cannot create /opt/puppetlabs/puppet/cache; parent directory /opt/puppetlabs/puppet does not exist; File[/var/log/puppetlabs/puppet]: change from absent to directory failed: Cannot create /var/log/puppetlabs/puppet; parent directory /var/log/puppetlabs does not exist
      

      QA


      risk: high
      probability: medium (gem installs run as root)
      severity: high (must run from different install)
      test level: acceptance

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  kylo Kylo Ginsberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: