The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #14960

MCollective client discovery randomize should take a optional seed.

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

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

0%

Category:Core
Target version:2.1.x
Keywords: Affected mCollective version:2.0.0
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

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)

History

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

  • Status changed from Unreviewed to Accepted

#2 Updated by Jeremy Carroll almost 2 years ago

Submitted PR.

https://github.com/puppetlabs/marionette-collective/pull/43

#3 Updated by R.I. Pienaar almost 2 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

http://git.io/bt_dIg 4 files changed, 73 insertions(+), 8 deletions(–)

Also available in: Atom PDF