The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:
MCollective client discovery randomize should take a optional seed.
|Assignee:||R.I. Pienaar||% Done:|
|Keywords:||Affected mCollective version:||2.0.0|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
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)
#3 Updated by R.I. Pienaar over 3 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(–)