Re: Puppet client not auto updating

485 views
Skip to first unread message

Drew Blessing

unread,
Apr 7, 2013, 2:06:07 PM4/7/13
to puppet...@googlegroups.com
Sy,

Welcome to Puppet.  Hopefully we can help you get going so you can experiment further.

First, what version of Puppet are you running?  I'm guessing by your commands that it's definitely prior to version 3.  I recommend updating to Puppet 3 before going further, especially since you're just starting out.  If the Ubuntu repos don't have that version then you can look at the documentation on how to install the Puppet apt repos - http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html

Ok, so now on to your problem.  I highly recommend that you don't run Puppet as a service.  It is much easier to control when run as a cron job.  We choose to run Puppet at 30 minute intervals on our clients.  The command we run is:

puppet agent --onetime --no-daemonize --logdest syslog

This should solve your issue.  It doesn't particularly say why your puppet service wasn't working, but I think the cron method is the way you want to go in the long run anyway.  Let me know if this helps or if you have other questions.


On Friday, April 5, 2013 5:48:10 PM UTC-5, Sy Doveton wrote:
Hi,

I am new to puppet and am experimenting with some basic commands. I have a puppetmaster server and a couple or servers with puppet client. All servers are running ubuntu.

I have set up the link between the master and the clients and their certs have been signed etc.

The clients have had puppet started via 'service puppet start' and can confirm they are running with 'service puppet status'.

When I make any changes on the master nothing happens on the servers. I have waited a couple of hours and e.g. the required package has not been installed on the client. As soon as I run on the client:-

puppetd --test

It will immediately install the package so I know my manifests / modules are correct as it does what I request when I manually ask it. I just need it to run periodically automatically and get the latest info from the master.

Any ideas of things I can check?

Sy Doveton

unread,
Apr 8, 2013, 8:32:42 AM4/8/13
to puppet...@googlegroups.com
Hi Drew,

Thanks for your message.

I have gone through my test environment and have installed the PPA and upgraded to 3.1.1 on the master and clients.

I will test how things work with the service, failing that I will try the cron route. So to confirm on the puppet clients you would stop the service from running then use:-

puppet agent --onetime --no-daemonize --logdest syslog

As the command run by cron?

Martijn

unread,
Apr 8, 2013, 10:01:01 AM4/8/13
to puppet...@googlegroups.com
Hi Sy,

The Puppet agent will usually log to syslog, both in case of errors or succes, so check in /var/log/syslog (on Ubuntu) for any messages. By default, the agent runs every half hour so I'd expect to see some entries in the log every half hour.

Make sure the puppet agent service runs as root. The puppet master does not need to be root but the agent needs permission to check and change the system. If you used the distro's of Puppetlabs' packages this is most likely already the case.

Instead of the obsolete puppetd command, use puppet agent --test for manually starting a run. Add --noop for a trial-run, say if you just want to see what would happen.

Contrary to Drew's suggestion we actually prefer running the agent service, instead of cron. Just to provide another opinion :). Still, both methods should work fine, so we'll need to figure that out first.

Regards, Martijn

Op zaterdag 6 april 2013 00:48:10 UTC+2 schreef Sy Doveton het volgende:

jcbollinger

unread,
Apr 8, 2013, 10:07:45 AM4/8/13
to puppet...@googlegroups.com


On Friday, April 5, 2013 5:48:10 PM UTC-5, Sy Doveton wrote:
Hi,

I am new to puppet and am experimenting with some basic commands. I have a puppetmaster server and a couple or servers with puppet client. All servers are running ubuntu.

I have set up the link between the master and the clients and their certs have been signed etc.

The clients have had puppet started via 'service puppet start' and can confirm they are running with 'service puppet status'.

When I make any changes on the master nothing happens on the servers. I have waited a couple of hours and e.g. the required package has not been installed on the client. As soon as I run on the client:-

puppetd --test

It will immediately install the package so I know my manifests / modules are correct as it does what I request when I manually ask it. I just need it to run periodically automatically and get the latest info from the master.

Any ideas of things I can check?


It sounds like the 'runinterval' configuration option on the clients may be set to something very large.  The puppet default is 1800 (seconds), but the packager could have provided a larger value so as to sync less frequently.  The configuration file is normally /etc/puppet/puppet.conf.


John

Sy Doveton

unread,
Apr 9, 2013, 2:25:23 AM4/9/13
to puppet...@googlegroups.com
Hi Martijn,

Thanks for your comments. I am using  puppet agent --test now that I have upgraded to ver3 as it was not available previously.

The service appears to be working better now and am having more luck with things applying.

Thanks all for your help.

Regards
Sy
Reply all
Reply to author
Forward
0 new messages