Performing sanity check of puppetmaster configuration: FAILED, puppetmaster exited with status 1
Could not prepare for execution: Got 1 failure(s) while initializing: change from directory to file failed: Could not set 'file on ensure: Is a directory - /var/puppet/facts
/usr/local/etc/rc.d/puppetmaster: WARNING: failed precmd routine for puppetmaster
and the following is logged to syslog:
Feb 8 22:34:06 puppetmaster puppet-master[14713]: (/File[/var/puppet/facts]) Not removing directory; use 'force' to override
Feb 8 22:34:06 puppetmaster puppet-master[14713]: (/File[/var/puppet/facts]) Not removing directory; use 'force' to override
Feb 8 22:34:06 puppetmaster puppet-master[14713]: (/File[/var/puppet/facts]/ensure) change from directory to file failed: Could not set 'file on ensure: Is a directory - /var/puppet/facts
Feb 8 22:34:07 puppetmaster puppet-master[14719]: (/File[/var/puppet/facts]) Not removing directory; use 'force' to override
Feb 8 22:34:07 puppetmaster puppet-master[14719]: (/File[/var/puppet/facts]) Not removing directory; use 'force' to override
Feb 8 22:34:07 puppetmaster puppet-master[14719]: (/File[/var/puppet/facts]/ensure) change from directory to file failed: Could not set 'file on ensure: Is a directory - /var/puppet/facts
/var/puppet/facts is a directory, and I'm not sure why puppet would want to convert it to a file, or why it would fail to do so if it really needs it to be a file.
> ls -ld /var/puppet/ /var/puppet/facts/
drwxr-xr-x 12 puppet puppet 512 Jan 25 18:00 /var/puppet/
drwxr-xr-x 2 puppet puppet 512 Jan 25 18:00 /var/puppet/facts/
facts-related config entries in the dist puppet.conf are:
> grep fact puppet.conf | grep -v '^ *#'
factsource = puppet://puppet/facts/
factpath = /var/puppet/lib/facter:/var/puppet/facts
factdest = /var/puppet/facts/
Does anyone know what's causing this, or how to correct it? Google is showing me a couple other occurrences of this with older versions, but no solutions.
I reached the same conclusion. I still have no idea why the complaint or even really what generated it.. in all the reading I've done I've never seen anything that describes what appears to be a default manifest that the puppet master applies to its own system. And, if it is indeed such a thing, I think it's weird that it only does it in the presence of a config file.
Also of note, after a bit of digging into the build process, I established that the default config file I referenced in my original email is actually generated by 'puppetmasterd --genconfig' so I find it even more strange that it doesn't work out of the box.
Comment out the 'factdest' setting in the [master] section of the config files
produced by the --genconfig option and it will work.
-Brian