Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of puppet agent --enable and puppet agent --disable #9

Open
neoice opened this issue Sep 24, 2013 · 7 comments
Open

use of puppet agent --enable and puppet agent --disable #9

neoice opened this issue Sep 24, 2013 · 7 comments

Comments

@neoice
Copy link

neoice commented Sep 24, 2013

I'm investigating mcollective and it is aware of the Puppet3 --enable and --disable flags.

root@test3:~# puppet agent --disable "this is a test message"
root@test3:~# cat /var/lib/puppet/state/agent_disabled.lock  
{"disabled_message":"this is a test message"}#

using these flags allows mcollective to perform puppet runs on enabled hosts but not disabled hosts. in my current infrastructure using puppetctl, mcollective will run on puppetctl disabled hosts.

puppet agent --disable isn't as smart as puppetctl: there's no timed disables or motd modification.

if I wind up modifying puppetctl to support mcollective, are you interested in including the changeset in upstream? I think it might be as simple as also doing a puppet agent --{en,dis}able for the corresponding puppetctl actions.

@bhourigan
Copy link
Contributor

Yeah, this would be very helpful. We have something similar on the short term roadmap and this would be a great help.

We were considering adding a function to puppetctl to allow a manual run while puppet is disabled (i.e. in noop), would this be possible after invoking puppet agent --disable?

@neoice
Copy link
Author

neoice commented Apr 15, 2015

doing a scrub of my open Github issues...

I've been running this in production for over a year now. I don't think I've had any problems.

are there any updates from Mozilla that you can publish? no new updates since Sep 2013!

@bhourigan
Copy link
Contributor

Yeah of course. I'll push an update now. Although, we're still not using puppet's internal enable and disable toggle as we run puppet from cron.

@neoice
Copy link
Author

neoice commented Apr 15, 2015

I've been building a lot of automation with mcollective, but so far, I don't think I actually need the puppet mco agent at all. massive Puppet runs cause all kinds of bottlenecks (VM disk IO, HTTP request timeouts on Puppetmaster, HTTP requests/disk IO on rpm repos, etc).

I could probably remove the --enable/--disable stuff with no negative impacts. in fact, it annoys a few of my team mates because puppet agent --test --noop will refuse to run in disabled state!

@bhourigan
Copy link
Contributor

I just merged an update for you.

Note that we changed the path to the disable state file, if you use that anywhere externally. It's OK to commit this change since any hosts that currently have puppet disabled will remain disabled. Only on their next puppet run will they pick up the path changes.

@neoice
Copy link
Author

neoice commented Apr 15, 2015

awesome. I currently have a lot of disabled hosts, so I might not push it out for a few weeks.

are you able to explain why the path was changed? just good housekeeping?

@bhourigan
Copy link
Contributor

There is a comment inside puppetctl explaining the reason for the change. On RHEL /var/run is cleared at boot, so that had the unintentional side effect of re-enabling puppet. It wasn't a common use case, but it was a surprise for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants