The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #9460

Feature #8268: Basic Puppet agent support on Windows

Puppet agent fails if the PuppetLabs/puppet directory doesn't exist on Windows

Added by Josh Cooper about 3 years ago. Updated about 3 years ago.

Status:RejectedStart date:09/13/2011
Priority:HighDue date:
Assignee:Cameron Thomas% Done:

0%

Category:windows
Target version:-
Affected Puppet version:development Branch:
Keywords:installer configdir windows

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

The puppet install.rb script creates the parent directories under which the puppet agent stores its var, conf, etc directories:

configdir = File.join(Dir::COMMON_APPDATA, "PuppetLabs", "puppet", "etc")
...
FileUtils.makedirs(configdir) if InstallOptions.configs

If you run the install script, and then delete the directories later, then puppet agent will not run (though puppet apply and puppet resource do work).

Puppet should create the parent directories as necessary.

Z:\work\puppet>puppet agent --server puppetmaster  --no-daemonize
...
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc]/ensure: change from absent to directory failed: Cannot create C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc; parent directory C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet does not exist
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/certs]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/certs]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/private_keys]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/private_keys]: Skipping because of failed dependencies
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var]/ensure: change from absent to directory failed: Cannot create C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var; parent directory C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet does not exist
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/client_yaml]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/client_yaml]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/client_data]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/client_data]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/run]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/run]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/log]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/log]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/private]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/private]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/facts]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/facts]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/certificate_requests]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/certificate_requests]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state/graphs]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state/graphs]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/public_keys]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc/ssl/public_keys]: Skipping because of failed dependencies
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/clientbucket]: Dependency File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var] has failures: true
warning: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/clientbucket]: Skipping because of failed dependencies
debug: Finishing transaction 130113396
Could not prepare for execution: Got 2 failure(s) while initializing: change from absent to directory failed: Cannot create C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/etc; parent directory C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet does not exist; change from absent to directory failed: Cannot create C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var; parent directory C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet does not exist

History

#1 Updated by Josh Cooper about 3 years ago

  • Status changed from Unreviewed to Accepted
  • Priority changed from Normal to High

#2 Updated by Cameron Thomas about 3 years ago

  • Status changed from Accepted to Rejected
  • Assignee set to Cameron Thomas
  • Keywords set to installer configdir windows

This behavior matches that of non-Windows installations. Puppet will assume the value specified for its config dir is correct and stable, and if that directory were to vanish (from user intervention or other) puppet should complain. Puppet will, however, recreate any missing directories under the configdir parent.

As a workaround to this situation, a user could specify the location of an alternative config directory on the command line (—configdir[=OPTIONAL]) at each Puppet invocation, or re-run the installer to recreate the standard config tree.

#3 Updated by James Turnbull about 3 years ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF