Project

General

Profile

Actions

Feature #2116

closed

Use MCollective to trigger Puppet runs

Added by Dominic Cleal over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
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.


Files


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #2065: Puppetrun doesn't work in Puppet version > 3.xResolvedDominic Cleal12/20/2012Actions
Actions #1

Updated by Dominic Cleal over 11 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.

Actions #2

Updated by Ohad Levy over 11 years ago

  • Assignee deleted (Ohad Levy)

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

Actions #3

Updated by Sam Kottler over 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Sam Kottler
Actions #4

Updated by Nikolay Georgieff about 11 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 ")}]

Actions #5

Updated by Sam Kottler about 11 years ago

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

Actions #6

Updated by Mark Heily almost 11 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.

Actions #7

Updated by Mark Heily almost 11 years ago

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

Actions #8

Updated by Dominic Cleal almost 11 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
Actions #9

Updated by Sam Kottler almost 11 years ago

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

Applied in changeset commit:"80f8a61f43504ec3a4753dda2ef201483e5ce855".

Actions

Also available in: Atom PDF