Project

General

Profile

Feature #2116

Use MCollective to trigger Puppet runs

Added by Dominic Cleal over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Much requested feature from the Foreman 1.1: what do you want to see next? thread.

Puppet run/kick is deprecated from Puppet 3.x and MCollective is recommended instead. Foreman should support using MCollective to execute the puppetd agent (runonce action) on the host.


Related issues

Related to Foreman - Bug #2065: Puppetrun doesn't work in Puppet version > 3.xResolved2012-12-20

Associated revisions

Revision 80f8a61f (diff)
Added by Sam Kottler over 6 years ago

fixes #2116 - mcollective support for the proxy to initialize puppetrun

History

#1 Updated by Dominic Cleal over 6 years ago

Christian McHugh implemented this by shelling out to mco: http://pastebin.com/1U8ibyrt

I think we should probably use the mco library, e.g. http://docs.puppetlabs.com/mcollective/simplerpc/clients.html, probably via the proxy for consistency.

#2 Updated by Ohad Levy over 6 years ago

  • Assignee deleted (Ohad Levy)

it seems i had a really old branch too at https://github.com/ohadlevy/smart-proxy/tree/mc

#3 Updated by Sam Kottler over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Sam Kottler

#4 Updated by Nikolay Georgieff over 6 years ago

I have a workaround for foreman-proxy to use Mcollective:

[root@puppet proxy]# diff puppet.rb.orig puppet.rb
23c23
< command = %x[#{sudo} #{puppetrun} --host #{hosts.join(" --host ")}]
---

command = %x[#{sudo} /usr/bin/mco puppet runonce -I #{hosts.join(" --host ")}]

#5 Updated by Sam Kottler over 6 years ago

Yep, there is a patch that I'm working on refactoring right now that does something not too dissimilar to that.

#6 Updated by Mark Heily over 6 years ago

The 'puppetd' MCollective plugin is deprecated, and has been replaced by the 'puppet' plugin. We need to support both plugins. I've attached a patch that works for me.

#7 Updated by Mark Heily over 6 years ago

Attaching a new version of the patch with a one-line change to use escape_for_shell() when running mco.

#8 Updated by Dominic Cleal over 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Assignee changed from Sam Kottler to Dominic Cleal
  • Target version set to 1.2.0

#9 Updated by Sam Kottler over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:"80f8a61f43504ec3a4753dda2ef201483e5ce855".

Also available in: Atom PDF