Re: [Puppet Users] Deployment of puppetmaster with capistrano causes problems

114 views
Skip to first unread message

Craig White

unread,
Dec 11, 2012, 12:15:53 PM12/11/12
to puppet...@googlegroups.com

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

Marco Schröder

unread,
Dec 11, 2012, 1:23:39 PM12/11/12
to puppet...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages