-1

Is it possible to disable puppet runs (every 30 minutes) but it should be still listening?

I'm setting up puppetkick or mcollective. So the agents should be still running and listening so I can push updates but should not automatically run to look for updates, not even once (runinterval).

EDIT:

The answers in the topic (link below) doesn't address or resolve the problem. They're onto disabling agent, disabling start-up, or change run interval. Also the daemonize=false, just hangs puppet init start, nothing happens.

I want the agent to be in listening mode, if its possible

How to disable automatic scheduled Puppet runs that occur every 30 minutes?

anon
  • 9
  • 3
  • 4
    Possible duplicate of [How to disable automatic scheduled Puppet runs that occur every 30 minutes?](https://serverfault.com/questions/657911/how-to-disable-automatic-scheduled-puppet-runs-that-occur-every-30-minutes) – deagh Jun 24 '17 at 06:26
  • Yes, I already read that and then I posted this question as there was no resolution in that 2yrs old thread. I should've mentioned that, Instead I just mentioned about "run interval" they suggested and kept the title close to that topic. I'll make sure I'll refer to the link if it's close to duplicate next time. Thanks – anon Jun 25 '17 at 13:30
  • From forum rules - questions seeking installation, configuration or diagnostic help must include the desired end state, the _specific_ problem or _error_, sufficient _information about the configuration and environment_ to reproduce it, and _attempted solutions_. **Show** these things in your question, i.e. your environment description, configurations, error messages, attempts to address errors, etc. – Colt Jun 25 '17 at 13:30
  • 1
    I've posted a bounty on the other question since, as you said, there is no resolution there. – Jenny D Jun 25 '17 at 14:29
  • Not exactly what you asked for, but I think it could work for you : You should configure your agents in [noop](https://docs.puppet.com/puppet/latest/man/agent.html#OPTIONS) mode, and use the '--no-noop' argument with mcollective. So your agents can run but will not do anything except sending reports of what they would do whithout noop. And when you call them with mcollective, they willl apply your changes – Wee Jun 26 '17 at 07:35
  • Actually the main point of not wanting it to run is because it consumes 90-100% CPU whenever it runs. Most of my servers are VM's and have only 1 or 2 cores. – anon Jun 26 '17 at 09:40
  • If any of the new answers on the other question works for you, please write that in a comment, so I can award the bounty to it! – Jenny D Jun 28 '17 at 11:12
  • 1
    Hi Jenny, No none of answers from that thread works. You can take the bounty back. But really thankful, I got some answers here that got redirected from that thread. I'll be verifying few things this week and probably accept @faker answer if he's right. – anon Jun 28 '17 at 17:28
  • `I want the agent to be in listening mode, if its possible`. The agent is in listening mode. It will not run every 30 minutes anymore. MCollective works. – 030 Jun 29 '17 at 12:18

3 Answers3

2

MCollective does not connect directly to the puppet daemon.
It uses it's own daemon (mcollectived) which will get commands from its configured queue server.

Puppet does not need to run at all in your setup.
Runs will be triggered via mco puppet runonce ....

faker
  • 17,326
  • 2
  • 60
  • 69
  • Thanks. Good to know that puppet agent does not need to be running. I'll verify this soon – anon Jun 28 '17 at 06:28
0

puppetkick is deprecated, so don't build on that :) If you're using FOSS Puppet, you want to use mcollective. Configure puppet to not start the agent (however you do that) and mcollective will have no trouble running the agent in runonce mode. The official docs for that (linked to by the deprecation warning) are here. If you're using PE you can still use mcollective, or (in sufficiently recent versions) use puppet jobs with the orchestrator.

Bill Weiss
  • 10,782
  • 3
  • 37
  • 65
0

You can disable puppet agent schedule typing: /opt/puppetlabs/bin/puppet resource service puppet ensure=stopped enable=false

So, agent only runs when you invoque directly from konsole: puppet agent -t