Concat function not found after switching to dynamic environments

205 views
Skip to first unread message

Agustin Horischnik

unread,
Mar 14, 2014, 8:31:20 AM3/14/14
to puppet...@googlegroups.com
I just switched to using environments more or less as described in http://puppetlabs.com/blog/git-workflow-and-puppet-environments and now puppet agent --test on a previously working node fails with...

Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/pip_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb
Info: Loading facts in /var/lib/puppet/lib/facter/python_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/virtualenv_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/nodejs_latest_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/nodejs_stable_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb
Info: Loading facts in /var/lib/puppet/lib/facter/nodejs_installed_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Unknown function concat at /etc/puppet/environments/testing/modules/gi/manifests/inst.pp:104 on node france-4.kimsufi.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

My puppet.conf in the master looks like this:

...
[main]
logdir       = /home/log/puppet #changed var to home
vardir       = /var/lib/puppet
ssldir       = /var/lib/puppet/ssl
rundir       = /var/run/puppet
factpath     = $vardir/lib/facter
templatedir  = $confdir/templates
hiera_config = $confdir/hiera.yaml

[master]
environment  = production
manifest     = $confdir/environments/$environment/manifests/site.pp
manifestdir  = $confdir/environments/$environment/manifests
modulepath   = $confdir/environments/$environment/modules
tamplatedir  = $confdir/environments/$environment/templates
...

Both master and agent puppet version is 3.4.3.
stdlib is installed in /etc/puppet/environments/testing/modules/stdlib

Any ideas what could I be doing wrong?


José Luis Ledesma

unread,
Mar 14, 2014, 4:38:48 PM3/14/14
to puppet...@googlegroups.com

Mmm not sure, but hace you tried to move the environment=production to the agent section?

Regards,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c24fa1d3-c999-481e-932a-72ef069496dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chuck

unread,
Mar 14, 2014, 10:43:38 PM3/14/14
to puppet...@googlegroups.com
Modules that provide plugins / functions  need to exist in all environments (preferably the same version, other issues can occur if they are not) if you want everything to work correctly with the current state of puppet.  In this case your puppet master is most likely looking for concat / stdlib in the production environment that it is part of and not finding the function when trying to compile the catalog.  This is really the biggest drawback of the current environment system in puppet.  

Agustin Horischnik

unread,
Mar 19, 2014, 5:25:36 PM3/19/14
to puppet...@googlegroups.com
I actually found what was wrong with this in the time since my last message a few hours ago. But since that message is still lost in moderation town I don't really feel like explaining in detail to see it posted half a day later.

The problem has to do with shared modules. Stdlib was shared module so I had to delete it form the shared module folder and then install it using the --modulepath option. Tryied with --environment before but didn't work. There may be something else and if somebody has a similar issue I'll be happy to help.

Agustin Horischnik

unread,
Mar 19, 2014, 5:40:58 PM3/19/14
to puppet...@googlegroups.com
OFF TOPIC APOLOGY -> I just learned that my last message was not stuck in moderation but never got there it seems... so I apologize for complaining about moderators. I wrote to them explaining and they answer in a couple of mins. <- OFF TOPIC APOLOGY 
Reply all
Reply to author
Forward
0 new messages