mcollective puppetd plugin does not work

617 views
Skip to first unread message

Hai Tao

unread,
Jul 30, 2012, 12:17:33 AM7/30/12
to puppet...@googlegroups.com
I used the puppetd plugin to disable the puppet service on a node,
however the puppet is still running on the node. Can someone explain
why?

# mco puppetd -I test-01 disable

* [ ============================================================> ] 1 / 1


test-01 Request Aborted
Already disabled

Finished processing 1 / 1 hosts in 64.07 ms
# mco puppetd -I test-01 status

* [ ============================================================> ] 1 / 1

test-01 Currently disabled; last
completed run 1550 seconds ago

Finished processing 1 / 1 hosts in 60.37 ms

Anatoliy Lisovskiy

unread,
Jul 30, 2012, 1:32:32 AM7/30/12
to puppet...@googlegroups.com
Service name is puppet, not puppetd




--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Hai Tao

unread,
Jul 30, 2012, 10:29:37 AM7/30/12
to puppet...@googlegroups.com
the service is puppetd:

# ls /root/mcollective-plugins/agent/puppetd/agent (here is where I
copied the plugin from)
puppetd.ddl puppetd.rb

# ll /usr/libexec/mcollective/mcollective/application/
total 56
-rw-r--r-- 1 root root 2664 Apr 30 10:34 controller.rb
-rw-r--r-- 1 root root 1305 Apr 30 10:34 facts.rb
-rw-r--r-- 1 root root 373 Apr 30 10:34 find.rb
-rw-r--r-- 1 root root 651 Apr 30 10:34 help.rb
-rw-r--r-- 1 root root 9155 Apr 30 10:34 inventory.rb
-rw-r--r-- 1 root root 2131 Apr 30 10:34 ping.rb
-rw-r--r-- 1 root root 7276 Apr 30 10:34 plugin.rb
-rw-r--r-- 1 root root 4793 Jul 29 21:06 puppetd.rb
-rw-r--r-- 1 root root 4825 Apr 30 10:34 rpc.rb



# mco puppet
The Marionette Collective version 2.0.0

usage: /usr/sbin/mco command <options>

Known commands:

controller facts find
help inventory ping
plugin puppetd rpc

Type '/usr/sbin/mco help' for a detailed list of commands and
'/usr/sbin/mco help command'
to get detailed help for a command

# mco puppetd
puppetd failed to run: Please specify an action. (RuntimeError)
--
Hai Tao

pmbuko

unread,
Jul 30, 2012, 11:27:28 AM7/30/12
to puppet...@googlegroups.com
Hai,

When you tell mcollective to disable puppet on a node, it *administratively disables* the agent but it does not stop the puppetd process. If you try 'puppet agent -t' on an node that has been administratively disabled you will see that puppet won't actually run.

--
Peter
 

Hai Tao

unread,
Jul 30, 2012, 12:23:33 PM7/30/12
to puppet...@googlegroups.com
This makes sense and is interesting. I was suspecting disable means
turning off in chkconfig, but it is not as I checked.

# puppet agent --server=puppet --test --noop
notice: Run of Puppet configuration client already in progress; skipping

so can you explain what "administratively disables" mean, and where I
can find doc for this?

Thanks.

Hai T.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/AFPGM7_T5SwJ.

Peter Bukowinski

unread,
Jul 30, 2012, 12:36:14 PM7/30/12
to puppet...@googlegroups.com
The agent enable/disable is documented in the output of 'puppet help agent' as well as here:


Your output of 'puppet agent --server=puppet --test --noop' shows that you have a 'puppetdlock' file (in /var/lib/puppet/state by default), but that puppet is interpreting the lock file's presence as a run in progress. If there is no run in progress when you disable the agent, then you should be seeing this output when you try to run puppet (with version 2.6+) :

notice: Skipping run of Puppet configuration client; administratively disabled; use 'puppet agent --enable' to re-enable.

If you try 'puppet agent --enable' does the puppetdlock file disappear from this location? It should.

--
Peter

--
Peter

Hai Tao

unread,
Jul 30, 2012, 7:24:37 PM7/30/12
to puppet...@googlegroups.com
wired, I installed the service plugin on the puppet master and a node
called nodeA, however,

# mco service sshd -I nodeA status

| [ > ] 0 / 1


---- service summary ----
Nodes: 1 / 0
Statuses: No responses received
Elapsed Time: 62.07 s

why do not I get the service sshd status of the node?
Hai Tao

R.I.Pienaar

unread,
Jul 30, 2012, 8:36:27 PM7/30/12
to puppet...@googlegroups.com


----- Original Message -----
> From: "Hai Tao" <eha...@gmail.com>
> To: puppet...@googlegroups.com
> Sent: Monday, July 30, 2012 4:24:37 PM
> Subject: Re: [Puppet Users] Re: mcollective puppetd plugin does not work
>
> wired, I installed the service plugin on the puppet master and a node
> called nodeA, however,
>
> # mco service sshd -I nodeA status
>
> | [ > ]
> | 0 / 1
>
>
> ---- service summary ----
> Nodes: 1 / 0
> Statuses: No responses received
> Elapsed Time: 62.07 s
>
> why do not I get the service sshd status of the node?

anything weird logged on your server mcollective.log?

Hai Tao

unread,
Jul 30, 2012, 10:33:24 PM7/30/12
to puppet...@googlegroups.com
I changed puppet-service.rb to service.rb, and it works now.

why the plugin use puppet-service.rb, but with service.ddl, and we
have to manually change it?

snlsin...@gmail.com

unread,
Feb 1, 2013, 6:23:25 AM2/1/13
to puppet...@googlegroups.com
Hey i have installed mcollective server cleint and puppet master, agent successfully. I have also installed puppet agent plugin. But when i run
mco puppet runonce

* [ ============================================================> ] 2 / 2

Finished processing 2 / 2 hosts in 1093.05 ms
This command runs successfully for all nodes. But i want to run puppet agent for only the specified server. For this i m using ..

mco puppet runonce --server puppet.example.net
I m getting following error ===>>

The puppet application failed to run, use -v for full error details: Cannot validate input server: Unknown validator: 'puppet_server_address'.
I m unable to find put the issue. Please help me??

Keith Burdis

unread,
Feb 1, 2013, 6:40:17 AM2/1/13
to puppet-users
I can't check at the moment but shouldn't that be 'mco puppet runonce fqdn=puppet.example.net' ?

  - Keith


--
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 post to this group, send email to puppet...@googlegroups.com.

R.I.Pienaar

unread,
Feb 1, 2013, 6:53:26 AM2/1/13
to puppet...@googlegroups.com


----- Original Message -----
> From: "Keith Burdis" <ke...@burdis.org>
> To: "puppet-users" <puppet...@googlegroups.com>
> Sent: Friday, February 1, 2013 12:40:17 PM
> Subject: Re: [Puppet Users] Re: mcollective puppetd plugin does not work
>
> I can't check at the moment but shouldn't that be 'mco puppet runonce fqdn=
> puppet.example.net' ?
>
> - Keith
>
>
> On 1 February 2013 11:23, <snlsin...@gmail.com> wrote:
>
> > Hey i have installed mcollective server cleint and puppet master, agent
> > successfully. I have also installed puppet agent plugin. But when i run
> > mco puppet runonce
> >
> > * [ ============================================================> ] 2 / 2
> >
> > Finished processing 2 / 2 hosts in 1093.05 ms
> > This command runs successfully for all nodes. But i want to run puppet
> > agent for only the specified server. For this i m using ..
> >
> > mco puppet runonce --server puppet.example.net
> > I m getting following error ===>>
> >
> > The puppet application failed to run, use -v for full error details:
> > Cannot validate input server: Unknown validator: 'puppet_server_address'.
> > I m unable to find put the issue. Please help me??

--server chooses a specific puppet master to run against, the error suggests
you didnt install the plugin properly though

The filtering and limiting of which nodes you run against is standard across
all mcollective commands, plenty of examples over @ http://docs.puppetlabs.com/mcollective/reference/basic/basic_cli_usage.html
Reply all
Reply to author
Forward
0 new messages