what gets run when a client can't connect?

33 views
Skip to first unread message

JonY

unread,
Dec 8, 2014, 10:57:39 AM12/8/14
to puppet...@googlegroups.com
Anything? Some cached set? 

jcbollinger

unread,
Dec 9, 2014, 9:12:35 AM12/9/14
to puppet...@googlegroups.com


On Monday, December 8, 2014 9:57:39 AM UTC-6, JonY wrote:
Anything? Some cached set? 

If the agent cannot retrieve a catalog from the master then it may apply a cached version of the most recent one successfully retrieved.  I say "may" because the behavior can be disabled (so that the agent does nothing unless it successfully retrieves a fresh catalog).


John

JonY

unread,
Dec 9, 2014, 5:05:19 PM12/9/14
to puppet...@googlegroups.com
Situation: client insists on ability to use a 3G modem to connect to AWS servers (including puppet). I need a way to ensure that the 'wvdial' process is running. It will lose the carrier and hang-up at times so I wrote a piece of bash that (re)starts it from puppet.. but you see the problem - if wvdial isn't running then the puppet agent will fail so the exec script won't get run.

Is there a way around this? Or do i need to use a cron to fix this?

R.I.Pienaar

unread,
Dec 9, 2014, 5:17:24 PM12/9/14
to puppet-users


----- Original Message -----
> From: "JonY" <ethr...@gmail.com>
> To: "puppet-users" <puppet...@googlegroups.com>
> Sent: Tuesday, December 9, 2014 4:05:19 PM
> Subject: [Puppet Users] Re: what gets run when a client can't connect?

> Situation: client insists on ability to use a 3G modem to connect to AWS
> servers (including puppet). I need a way to ensure that the 'wvdial'
> process is running. It will lose the carrier and hang-up at times so I
> wrote a piece of bash that (re)starts it from puppet.. but you see the
> problem - if wvdial isn't running then the puppet agent will fail so the
> exec script won't get run.
>

use puppet to configure a proper process supervisor. Or even a cron job.

Puppet is configuration management, not cron daemon, process management or monitoring. Use it to configure those tools


> Is there a way around this? Or do i need to use a cron to fix this?
>
> On Tuesday, December 9, 2014 6:12:35 AM UTC-8, jcbollinger wrote:
>>
>>
>>
>> On Monday, December 8, 2014 9:57:39 AM UTC-6, JonY wrote:
>>>
>>> Anything? Some cached set?
>>>
>>
>> If the agent cannot retrieve a catalog from the master then it may apply a
>> cached version of the most recent one successfully retrieved. I say "may"
>> because the behavior can be disabled (so that the agent does nothing unless
>> it successfully retrieves a fresh catalog).
>>
>>
>> John
>>
>>
>
> --
> 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/8353fd91-c8fa-45b0-8d9c-2acf176a04be%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
Dec 10, 2014, 9:10:25 AM12/10/14
to puppet...@googlegroups.com


On Tuesday, December 9, 2014 4:05:19 PM UTC-6, JonY wrote:
Situation: client insists on ability to use a 3G modem to connect to AWS servers (including puppet). I need a way to ensure that the 'wvdial' process is running. It will lose the carrier and hang-up at times so I wrote a piece of bash that (re)starts it from puppet.. but you see the problem - if wvdial isn't running then the puppet agent will fail so the exec script won't get run.

Is there a way around this? Or do i need to use a cron to fix this?


During the catalog run is too late.  You need the network connection available before the catalog request is made, so that a new catalog can be retrieved -- not so much to get wvdial running but to ensure that you get an up-to-date catalog.  Otherwise, you might never get a fresh catalog.

A task scheduler such as cron is a good way to ensure wvdial is running.  As long as you're doing that, you might as well use the same scheduler, and even the same job, to run the agent.  There are considerable advantages to running the agent via an external scheduler instead of as a daemon.


John

Juan Sierra Pons

unread,
Dec 18, 2014, 6:30:53 AM12/18/14
to puppet...@googlegroups.com
Hi,

Also you can use the pre_run directive on your client puppet.conf to run a command that check vwdial is nunning and starts it if necessary.

More info can be found on https://www.packtpub.com/books/content/puppet-integrating-external-tools

Best regards

--------------------------------------------------------------------------------------
Juan Sierra Pons                                 ju...@elsotanillo.net
Linux User Registered: #257202      
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------

--
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.
Reply all
Reply to author
Forward
0 new messages