There's a generic problem that I suspect that many people are bumping into, but 
I suspect it will surprise others. RIP's concat module includes a facter plugin 
which is required for the catalog to compile. This requires pluginsync to be 
enabled.

Problem is when you have a brand new client, they need to get the puppet config 
which enables pluginsync before this is going to work. You've got stages and 
such set up to do all this before the module which uses concat is called, but 
it will fail compilation. Even if you try to limit the catalog with tags, it 
still needs to compile.

# puppet agent --test --tags puppet
Could not retrieve selinux_config_policy: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_config_policy: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_config_mode: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_current_mode: undefined method `each_line' for 
nil:NilClass
info: Caching catalog for c1-s1.c.company.com
err: Failed to apply catalog: Parameter path failed: File paths must be fully 
qualified, not 'undef' at 
/somepath/puppet/etc/modules/concat/manifests/setup.pp:38

Seriously, you can't do this. If your module requires something from a facter 
to compile, then you need to set a default in your module and override it if 
the information is available from facter.  Having to edit the site manifest to 
remove concat module, then add it back right after the node's basic setup is 
built… so very, very cowboy.

I've rewritten the module to not need a facter plugin at all (because this 
really isn't useful). For anyone else slamming into this problem, the fix is 
easy

-  $concatdir = $concat_basedir
+  $concatdir = "${settings::vardir}/concat"

For anyone writing modules, consider this!

NOTE: the only way I can think of to avoid this issue is to set an environment 
from the command line during puppet initialization, and use the environment to 
limit the modules provided in the catalog.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to