Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I regularly but randomly get the following error message when I run the puppet client on machines (non-daemonized):

err: Could not create : Parameter path failed: File paths must be fully qualified
warning: Not using cache on failed catalog
warning: Configuration could not be instantiated: Parameter path failed: File paths must be fully qualified

It seems moderately clear what it means -- that I don't have a fully-qualified path in a parameter. However, it doesn't tell me where I can find this to fix it, or even which parameter is wrong :(

(If I use the debug option it consistently works, so it seems like a problem with the caching of the manifests... It would be nice to get rid of this for production use, still)

Note : I cannot make this happen consistently :/

share|improve this question
    
putting $variable_dir = "/etc/puppet/bar" in the site.pp worked for me but putting it in the params.pp and adding require myclass::params in the init.pp did not work. –  user210637 Feb 24 at 14:56
add comment

3 Answers

up vote 2 down vote accepted

[Answering own question after getting around to prodding at the config for a while]

I've managed to track this down to one of the modules which I have written (of course), but it was due to a use of a variable which didn't work out how I expected.

What happened was:

$variable_dir = "/etc/puppet/bar"

class foo {
  file { $variable_dir:
    ensure => directory
  }
}

define some-define() {
   # Trimmed for brevity
   exec { "some-$name":
     # command, creates, timeout etc here
     require => File[$variable_dir],
   }
}

..which basically caused some confusion with the File[] using a variable. I've replaced these with the explicit value of the variable for now and it all works fine, but it was something of a surprise! I'm assuming that my understanding of scope and when variables can be defined/used is somewhat out of whack with Puppet, so I'm going to learn that a lot better...

It seems to have caused the same behaviour as using non-fully-qualified paths on file strings, by failing to find the variable or not obtaining the value? Quite odd, anyway.

share|improve this answer
add comment

When you test your puppet configuration, you can do it by running

puppetd --test

which will give you much more verbose output, and it should show you where it fails. If you are really desperate, you can tack on --debug to get even more output.

If you want to go looking in your .pp files you should search for a

file { "path/to/file":
    ...
}

which has a missing / (i.e. it should read /path/to/file instead)

share|improve this answer
    
Unfortunately I've not ever had it do this when using the --debug switch to see if I can get any more hints out of it... I think I'll have to search through the .pp files and functions for any uses without full paths (although some are built up from chunks so that will be awkward too :) –  David Gardner Jul 19 '09 at 9:55
add comment

You can put the actual path to path property, then it works. This works for me:

$variable_dir = "/etc/puppet/bar"

class foo {
  file { 'variable_dir':
    path => ${variable_dir},
    ensure => directory
  }
}

define some-define() {
   # Trimmed for brevity
   exec { "some-$name":
     # command, creates, timeout etc here
     require => File['variable_dir'],
   }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.