Marco Schröder
2012-Dec-11 15:44 UTC
[Puppet Users] Deployment of puppetmaster with capistrano causes problems
Hi group, I''m using capistrano to deploy my puppet manifests to the puppet master server. Capistrano copies the new files on the server in a ''releases'' directory and after that just changes the ''current'' symlink to the new version. (/usr/share/puppet/configuration/current in my case) This works very well so far. Unfortunately the master seems to have problems with that symlink change until I restart the puppetmaster daemon. If I do not restart the master daemon the clients are getting error messages complaining that the master does not provide any configuration: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class example for server.example.domain After manually restart of master daemon, everything works again. Here are some of my master''s config dirs: puppet master --configprint libdir /var/lib/puppet/lib puppet master --configprint confdir /usr/share/puppet/configuration/current puppet master --configprint modulepath /usr/share/puppet/configuration/current/modules Anyone an idea what''s going wrong here? Thx, Marco -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rfZRwyPJAYIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Craig White
2012-Dec-11 17:15 UTC
Re: [Puppet Users] Deployment of puppetmaster with capistrano causes problems
On Dec 11, 2012, at 8:44 AM, Marco Schröder wrote:> Hi group, > > I''m using capistrano to deploy my puppet manifests to the puppet master server. > Capistrano copies the new files on the server in a ''releases'' directory and after that just changes the ''current'' symlink to the new version. > (/usr/share/puppet/configuration/current in my case) > This works very well so far. > > Unfortunately the master seems to have problems with that symlink change until I restart the puppetmaster daemon. > If I do not restart the master daemon the clients are getting error messages complaining that the master does not provide any configuration: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class example for server.example.domain > > After manually restart of master daemon, everything works again. > > Here are some of my master''s config dirs: > > puppet master --configprint libdir > /var/lib/puppet/lib > puppet master --configprint confdir > /usr/share/puppet/configuration/current > puppet master --configprint modulepath > /usr/share/puppet/configuration/current/modules > > Anyone an idea what''s going wrong here?---- seems pretty typical of a ruby/rails application to have to restart the server after changes because of caching so I would probably add a step to do that in your capistrano deploy.rb - something like (untested) after ''deploy'', ''deploy:restart'' and if necessary, add the task namespace :deploy do #undoubtedly this already exists task :restart do run "touch /var/lib/puppet/rack/tmp/restart.txt" # where ever your ''rack'' directory, should be a tmp folder end end Craig -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Marco Schröder
2012-Dec-11 18:23 UTC
[Puppet Users] Re: Deployment of puppetmaster with capistrano causes problems
Hi Craig, thx for that hint. Now I added a second capistrano task: cap invoke SUDO=1 COMMAND="/sbin/service puppetmasterd restart" That works so far! Thx, Marco On Tuesday, December 11, 2012 4:44:01 PM UTC+1, Marco Schröder wrote:> > Hi group, > > I''m using capistrano to deploy my puppet manifests to the puppet master > server. > Capistrano copies the new files on the server in a ''releases'' directory > and after that just changes the ''current'' symlink to the new version. > (/usr/share/puppet/configuration/current in my case) > This works very well so far. > > Unfortunately the master seems to have problems with that symlink change > until I restart the puppetmaster daemon. > If I do not restart the master daemon the clients are getting error > messages complaining that the master does not provide any configuration: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class example for server.example.domain > > After manually restart of master daemon, everything works again. > > Here are some of my master''s config dirs: > > puppet master --configprint libdir > /var/lib/puppet/lib > puppet master --configprint confdir > /usr/share/puppet/configuration/current > puppet master --configprint modulepath > /usr/share/puppet/configuration/current/modules > > Anyone an idea what''s going wrong here? > > Thx, > Marco >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/taKnhOpNNZcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.