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

Craig White
2012-12-11T17:15:53Z

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