How do I set global noop?

381 views
Skip to first unread message

Sam Morrison

unread,
Jul 22, 2013, 7:29:24 PM7/22/13
to puppet...@googlegroups.com
I'm trying to set a global noop but it doesn't seem possible,

There are 2 bugs open about this which to me look pretty serious as the expected behaviour isn't the case.

http://projects.puppetlabs.com/issues/21286
http://projects.puppetlabs.com/issues/6549

If anyone has a work around (that doesn't include modifying puppet.conf file) I would be very interested.

Cheers,
Sam


Ellison Marks

unread,
Jul 23, 2013, 1:12:10 PM7/23/13
to puppet...@googlegroups.com
How are you running puppet? If cron or mcollective, you can add a --noop flag to the command line somewhere.

Sam Morrison

unread,
Jul 23, 2013, 11:03:04 PM7/23/13
to puppet...@googlegroups.com


On Wednesday, 24 July 2013 03:12:10 UTC+10, Ellison Marks wrote:
How are you running puppet? If cron or mcollective, you can add a --noop flag to the command line somewhere.


We're just using it the standard way running it as a daemon

Klavs Klavsen

unread,
Jul 25, 2013, 8:18:22 AM7/25/13
to puppet...@googlegroups.com
well - perhaps you can put noop = true
or something in puppet.conf on the clients ? 

Sam Morrison

unread,
Jul 25, 2013, 8:08:17 PM7/25/13
to puppet...@googlegroups.com
Yeah but then when we push out noop = true in puppet.conf how do we then push out noop = false via puppet if they're all in noop.

Managing on the server is the only way to do it in a safe and scalable way (we have 500+ nodes)





On Thu, Jul 25, 2013 at 10:18 PM, Klavs Klavsen <kl...@enableit.dk> wrote:
well - perhaps you can put noop = true
or something in puppet.conf on the clients ? 

--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/HzjRMtQlHRU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Wolf Noble

unread,
Jul 26, 2013, 6:07:02 PM7/26/13
to puppet...@googlegroups.com
Hi Sam,

it somewhat depends on your requirements, but if you have a window during which changes are not permitted, end of story, what about a cronjob to set it to false at a particular time?

or in the same run that you set noop to true, require an exec which creates an at job to re-enable at a specific time?

you could go full tilt maverick, and have a cron job which does a curl to a known server asking if the value should be true/false and use sed to change the value, and then wake puppet from its nap.

you're essentially removing the ability for puppet to do anything so you'll have to use some other tool to let puppet out of it's cage.


I'm sure others have additional (likely better) suggestions.. 

rvlinden

unread,
Jul 27, 2013, 11:52:01 AM7/27/13
to puppet...@googlegroups.com
Sam,
 
You could make some changes to you site.pp and set some defaults like this

Exec {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
File {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
Group {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
Mount {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
Package {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
Service {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
User {
  schedule => $::globalvars_schedule,
  noop => $::globalvars_noop,
}
 
..... and more .....

 

Make sure that all puppet types you use within you modules are covered in the site.pp and have the noop => $::globalvars_noop added.
 
The final step is to set the topscope variable 'globalvars_noop' somewhere (for example hiera, or Puppet console) and your node will be run with noop.
No need to touch any puppet config on the clients, and very easy to manage :-)
 
Regards,
Rene vd Linden

Justin Brown

unread,
Jul 27, 2013, 12:11:25 PM7/27/13
to puppet...@googlegroups.com
Sam,

You should setup MCollective. You can implement a simple plugin that
changes the global noop setting in puppet.conf and restarts the
daemon.

That will give you the best scalability, and you have fine-grained
control in MCollective on which hosts run using metadata in your
Puppet classes and facts.

Regards,
Justin
> --
> 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

Sam Morrison

unread,
Jul 29, 2013, 2:13:51 AM7/29/13
to puppet...@googlegroups.com
Thanks Justin,

Yes MCollective would be great, just have to find the time.

Rene: I have gone with your solution at the moment. I still think it's a bug that doing it on the Resource resource doesn't work, hopefully someone will look into those bugs.

Cheers,
Sam
Reply all
Reply to author
Forward
0 new messages