The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Feature #14960

MCollective client discovery randomize should take a optional seed.

Added by Jeremy Carroll almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:06/11/2012
Priority:NormalDue date:
Assignee:R.I. Pienaar% Done:


Target version:2.1.x
Keywords: Affected mCollective version:2.0.0

We've Moved!

Ticket tracking is now hosted in JIRA:


Use Case: I would like to have a seeded random number generator to be able to use percent(%) based discovery deterministically. If I am deploying software to 5% of all of my discovered nodes, I should be able to attach a seed to the request so I can run subsequent commands to the same machines. All of this requires the number of discovered nodes to stay the same. Example below.

Servers: 100 Percentage: 5 (5 servers in list) rand result: server: [3, 5, 60, 24, 77]

I should be able to specify the seed during the discovery request, and get the same server list back each time (if the # of discovered servers does not change)


#1 Updated by R.I. Pienaar almost 4 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Jeremy Carroll almost 4 years ago

Submitted PR.

#3 Updated by R.I. Pienaar almost 4 years ago

  • Status changed from Accepted to Closed

Turns out there was a bug in the original code you were basing your pull on – it was modifying the clients concept of whats discovered nodes so calling out to a remote rpc action once with limit and once without would not yield the expected results.

So I refactored that, changed your code around bit for style and added test coverage, got there in the end, thanks for your submission 4 files changed, 73 insertions(+), 8 deletions(–)

Also available in: Atom PDF