Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
puppetlabs/marionette-collective
Agi199/marionette-collective
AlexanderPavlenko/marionette-collective
AsherBond/marionette-collective
CNXTEoEorg/marionette-collective
Huron-City-Schools/marionette-collective
Iristyle/marionette-collective
LabattFoodService/marionette-collective
MFredette/marionette-collective
Magisus/marionette-collective
MaxMartin/marionette-collective
McdonaldSeanp/marionette-collective
MichelleJaeg/marionette-collective
MosesMendoza/marionette-collective
RubyTuesdayDONO/marionette-collective
ScottGarman/marionette-collective
Servana/marionette-collective
Sharpie/marionette-collective
UcasRichard/marionette-collective
XANi/marionette-collective
abelletti/marionette-collective
adamgibbins/marionette-collective
adamhjk/marionette-collective
adreyer/marionette-collective
adrienthebo/marionette-collective
ahpook/marionette-collective
alcy/marionette-collective
alexjfisher/marionette-collective
avisheksarkar20/marionette-collective
ayaz/marionette-collective
beergeek/marionette-collective
beezly/marionette-collective
bheusinkveld/marionette-collective
bladealslayer/marionette-collective
bmlrmdev/marionette-collective
bobtfish/marionette-collective
branan/marionette-collective
brianwawok/marionette-collective
brothers/marionette-collective
bw-y/marionette-collective
camilo-schoeningh-sociomantic/marionette-collective
caseywilliams/marionette-collective
ccaum/marionette-collective
cherubines/marionette-collective
chjohnst/marionette-collective
cicloid/marionette-collective
clantant/marionette-collective
conkiztador/marionette-collective
crazed/marionette-collective
crekev/marionette-collective
croomes/marionette-collective
databus23/marionette-collective
dduvnjak/marionette-collective
denmat/marionette-collective
dforste/marionette-collective
digital-science/marionette-collective
drewrm/marionette-collective
ekinanp/marionette-collective
elmer/marionette-collective
er0ck/marionette-collective
ericalthatcher/marionette-collective
eschizoid/marionette-collective
evilensky/marionette-collective
ferventcoder/marionette-collective
fiddyspence/marionette-collective
gazetaj/marionette-collective
georgiou/marionette-collective
gerricchaplin/marionette-collective
gguillotte/marionette-collective
glarizza/marionette-collective
glennsarti/marionette-collective
gregretkowski/marionette-collective
haf/marionette-collective
halfninja/marionette-collective
hawknewton/marionette-collective
heathseals/marionette-collective
hickey/marionette-collective
hilli/marionette-collective
holguinj/marionette-collective
hyfather/marionette-collective
ingardm/marionette-collective
j2sh/marionette-collective
jasperla/marionette-collective
jayendren/marionette-collective
jaytaph/marionette-collective
jbondpdx/marionette-collective
jbussdieker/marionette-collective
jdw112/marionette-collective
jeffmccune/marionette-collective
jessereynolds/marionette-collective
johnduarte/marionette-collective
josb-ebaysf/marionette-collective
joshcooper/marionette-collective
jsane/marionette-collective
jstangroome/marionette-collective
jtappa/marionette-collective
jtimberman/marionette-collective
justcfx2u/marionette-collective
justinstoller/marionette-collective
justinwyer/marionette-collective
jweiss/marionette-collective
kbarber/marionette-collective
keocra/marionette-collective
khadrin/marionette-collective
kiall/marionette-collective
kleopatra999/marionette-collective
leet1976/marionette-collective
macjacktw/marionette-collective
maguec/marionette-collective
mamackenzie/marionette-collective
mateusz-gozdek-sociomantic/marionette-collective
matthewbarr/marionette-collective
mburger/marionette-collective
mcanevet/marionette-collective
mdxp/marionette-collective
melissa/marionette-collective
meowtochondria/marionette-collective
mfournier/marionette-collective
mgeggie/marionette-collective
mikepea/marionette-collective
mmrobins/marionette-collective
morshEtoro/marionette-collective
mosadev/marionette-collective
mpagalan/marionette-collective
mruzicka/marionette-collective
mstine/marionette-collective
msutter/marionette-collective
mwaggett/marionette-collective
ncdc/marionette-collective
netdata-be/marionette-collective
nfagerlund/marionette-collective
nhooey/marionette-collective
nicklewis/marionette-collective
nicksellen/marionette-collective
nigelkersten/marionette-collective
ody/marionette-collective
onejli/marionette-collective
optionalg/marionette-collective
oswell/marionette-collective
pandian912/marionette-collective
paperplane/marionette-collective
parisiale/marionette-collective
peterhuene/marionette-collective
phobos182/marionette-collective
phuong3030/marionette-collective
piavlo/marionette-collective
pimpajr/marionette-collective
pizzaops/marionette-collective
ploubser/marionette-collective
pmialon/marionette-collective
raphink/marionette-collective
reguero/marionette-collective
reidmv/marionette-collective
relistan/marionette-collective
rgevaert/marionette-collective
richardc/marionette-collective
ripienaar/marionette-collective
rlinehan/marionette-collective
robertgstoehl/marionette-collective
robinbowes/marionette-collective
rockwithyou/marionette-collective
romke/marionette-collective
rondinelisaad/marionette-collective
rottenbytes/marionette-collective
sarameisburger/marionette-collective
sborsje/marionette-collective
shance3c/marionette-collective
shawnferry/marionette-collective
sheldonh/marionette-collective
shishir/marionette-collective
shraddhagore/marionette-collective
shrug/marionette-collective
sikhosonke-manyela/marionette-collective
simonpasquier/marionette-collective
skottler/marionette-collective
sliranc/marionette-collective
someword/marionette-collective
spandeyindia/marionette-collective-1
spidie/marionette-collective
stahnma/marionette-collective
tampakrap/marionette-collective
tarhashi/marionette-collective
teancom/marionette-collective
tetsusoh/marionette-collective
thedeeno/marionette-collective
timbyr/marionette-collective
torrancew/marionette-collective
traylenator/marionette-collective
tremble/marionette-collective
trlinkin/marionette-collective
underscorgan/marionette-collective
ustuehler/marionette-collective
vaibhav-walke/marionette-collective
vicglarson/marionette-collective
vinaykotla/marionette-collective
viviallddn/marionette-collective
wfarr/marionette-collective
xepa/marionette-collective
yo61/marionette-collective
zaargy/marionette-collective
Nothing to show
Choose a base branch
Choose a Head Repository
puppetlabs/marionette-collective
Agi199/marionette-collective
AlexanderPavlenko/marionette-collective
AsherBond/marionette-collective
CNXTEoEorg/marionette-collective
Huron-City-Schools/marionette-collective
Iristyle/marionette-collective
LabattFoodService/marionette-collective
MFredette/marionette-collective
Magisus/marionette-collective
MaxMartin/marionette-collective
McdonaldSeanp/marionette-collective
MichelleJaeg/marionette-collective
MosesMendoza/marionette-collective
RubyTuesdayDONO/marionette-collective
ScottGarman/marionette-collective
Servana/marionette-collective
Sharpie/marionette-collective
UcasRichard/marionette-collective
XANi/marionette-collective
abelletti/marionette-collective
adamgibbins/marionette-collective
adamhjk/marionette-collective
adreyer/marionette-collective
adrienthebo/marionette-collective
ahpook/marionette-collective
alcy/marionette-collective
alexjfisher/marionette-collective
avisheksarkar20/marionette-collective
ayaz/marionette-collective
beergeek/marionette-collective
beezly/marionette-collective
bheusinkveld/marionette-collective
bladealslayer/marionette-collective
bmlrmdev/marionette-collective
bobtfish/marionette-collective
branan/marionette-collective
brianwawok/marionette-collective
brothers/marionette-collective
bw-y/marionette-collective
camilo-schoeningh-sociomantic/marionette-collective
caseywilliams/marionette-collective
ccaum/marionette-collective
cherubines/marionette-collective
chjohnst/marionette-collective
cicloid/marionette-collective
clantant/marionette-collective
conkiztador/marionette-collective
crazed/marionette-collective
crekev/marionette-collective
croomes/marionette-collective
databus23/marionette-collective
dduvnjak/marionette-collective
denmat/marionette-collective
dforste/marionette-collective
digital-science/marionette-collective
drewrm/marionette-collective
ekinanp/marionette-collective
elmer/marionette-collective
er0ck/marionette-collective
ericalthatcher/marionette-collective
eschizoid/marionette-collective
evilensky/marionette-collective
ferventcoder/marionette-collective
fiddyspence/marionette-collective
gazetaj/marionette-collective
georgiou/marionette-collective
gerricchaplin/marionette-collective
gguillotte/marionette-collective
glarizza/marionette-collective
glennsarti/marionette-collective
gregretkowski/marionette-collective
haf/marionette-collective
halfninja/marionette-collective
hawknewton/marionette-collective
heathseals/marionette-collective
hickey/marionette-collective
hilli/marionette-collective
holguinj/marionette-collective
hyfather/marionette-collective
ingardm/marionette-collective
j2sh/marionette-collective
jasperla/marionette-collective
jayendren/marionette-collective
jaytaph/marionette-collective
jbondpdx/marionette-collective
jbussdieker/marionette-collective
jdw112/marionette-collective
jeffmccune/marionette-collective
jessereynolds/marionette-collective
johnduarte/marionette-collective
josb-ebaysf/marionette-collective
joshcooper/marionette-collective
jsane/marionette-collective
jstangroome/marionette-collective
jtappa/marionette-collective
jtimberman/marionette-collective
justcfx2u/marionette-collective
justinstoller/marionette-collective
justinwyer/marionette-collective
jweiss/marionette-collective
kbarber/marionette-collective
keocra/marionette-collective
khadrin/marionette-collective
kiall/marionette-collective
kleopatra999/marionette-collective
leet1976/marionette-collective
macjacktw/marionette-collective
maguec/marionette-collective
mamackenzie/marionette-collective
mateusz-gozdek-sociomantic/marionette-collective
matthewbarr/marionette-collective
mburger/marionette-collective
mcanevet/marionette-collective
mdxp/marionette-collective
melissa/marionette-collective
meowtochondria/marionette-collective
mfournier/marionette-collective
mgeggie/marionette-collective
mikepea/marionette-collective
mmrobins/marionette-collective
morshEtoro/marionette-collective
mosadev/marionette-collective
mpagalan/marionette-collective
mruzicka/marionette-collective
mstine/marionette-collective
msutter/marionette-collective
mwaggett/marionette-collective
ncdc/marionette-collective
netdata-be/marionette-collective
nfagerlund/marionette-collective
nhooey/marionette-collective
nicklewis/marionette-collective
nicksellen/marionette-collective
nigelkersten/marionette-collective
ody/marionette-collective
onejli/marionette-collective
optionalg/marionette-collective
oswell/marionette-collective
pandian912/marionette-collective
paperplane/marionette-collective
parisiale/marionette-collective
peterhuene/marionette-collective
phobos182/marionette-collective
phuong3030/marionette-collective
piavlo/marionette-collective
pimpajr/marionette-collective
pizzaops/marionette-collective
ploubser/marionette-collective
pmialon/marionette-collective
raphink/marionette-collective
reguero/marionette-collective
reidmv/marionette-collective
relistan/marionette-collective
rgevaert/marionette-collective
richardc/marionette-collective
ripienaar/marionette-collective
rlinehan/marionette-collective
robertgstoehl/marionette-collective
robinbowes/marionette-collective
rockwithyou/marionette-collective
romke/marionette-collective
rondinelisaad/marionette-collective
rottenbytes/marionette-collective
sarameisburger/marionette-collective
sborsje/marionette-collective
shance3c/marionette-collective
shawnferry/marionette-collective
sheldonh/marionette-collective
shishir/marionette-collective
shraddhagore/marionette-collective
shrug/marionette-collective
sikhosonke-manyela/marionette-collective
simonpasquier/marionette-collective
skottler/marionette-collective
sliranc/marionette-collective
someword/marionette-collective
spandeyindia/marionette-collective-1
spidie/marionette-collective
stahnma/marionette-collective
tampakrap/marionette-collective
tarhashi/marionette-collective
teancom/marionette-collective
tetsusoh/marionette-collective
thedeeno/marionette-collective
timbyr/marionette-collective
torrancew/marionette-collective
traylenator/marionette-collective
tremble/marionette-collective
trlinkin/marionette-collective
underscorgan/marionette-collective
ustuehler/marionette-collective
vaibhav-walke/marionette-collective
vicglarson/marionette-collective
vinaykotla/marionette-collective
viviallddn/marionette-collective
wfarr/marionette-collective
xepa/marionette-collective
yo61/marionette-collective
zaargy/marionette-collective
Nothing to show
Choose a head branch
Commits on Apr 23, 2014
fix rpc responses processing for bad replies
This fixes a bug where the rpc client stops processing incoming rpc responses
with the user specified block when encoutering the reply of a broken or
misconfigured node.
Commits on May 20, 2014
Commits on May 21, 2014
Merge pull request #192 from jasperla/packaging
Unbreak after mc-call-agent removal
(MCO-186) Change url in solaris readme
This commit changes to broken codehaus.org url to refer to rubygems
instead.
Commits on May 22, 2014
MCO-325 - update win32 instructions to point at 1.9.3
MCollective runs acceptably well on 1.9.3 on windows.  It's what
we ship in PE and also what the unofficial .msi uses.
Merge pull request #194 from richardc/MCO-325_windows_readme
MCO-325 - update win32 instructions to point at 1.9.3
Commits on Jun 10, 2014
Moses Mendoza
Moses Mendoza
Merge branch 'stable'
* stable:
  (maint) Update release date
  MCO-336 - update release notes and changelog for 2.5.2
  (MCO-346) - Fix Data plugin and Agent load ordering
  (MCO-311) Remove current directory from Ruby load path
Commits on Jun 23, 2014
Commits on Jun 24, 2014
Eric Timmerman
Eric Timmerman
(RE-1497) Remove quantal from build_defaults
This commit removes quantal from all build defaults because it is end of
life. It removes the defaults from the build_defaults yaml.
Commits on Jun 25, 2014
Merge pull request #200 from clantant/RE-1497/master/srcs
(RE-1497) Remove quantal from build_defaults
Commits on Jun 27, 2014
Eric Timmerman
Eric Timmerman
(MCO-366) Remove Sid/Unstable from build defaults
This commit goes through the build_defaults.yaml and removes the sid and
unstable entries. Part of the reason for this removal is we don't test
against sid but release it and we build packages for debian-testing.
Commits on Jul 01, 2014
(MCO-181) Add --[no-]daemonize flag to mcollectived
Adds the daemonize flag. This flag will override the value defined in
the config file allowing init scripts etc to tell mcollectived whether
it should daemonize or not.
Commits on Jul 02, 2014
Merge pull request #201 from clantant/MCO-366/master/sid
(MCO-366) Remove Sid/Unstable from build defaults
Merge pull request #202 from ploubser/mco-181
(MCO-181) Add --[no-]daemonize flag to mcollectived
Commits on Jul 15, 2014
Merge branch 'stable'
Conflicts:
	ext/build_defaults.yaml
Commits on Jul 16, 2014
(MCO-360) Remove all references to the 'mcollective' agent
Controller messages have been deprecated for an extremely long time.
After deprecating it we stopped processing messages directed at the
'mcollective' agent but we are still connecting to its related queues
and topics.

This commit removes all trace of the 'mcollective' agent and controller
messages.
Merge pull request #204 from ploubser/mco-360
(MCO-360) Remove all references to the 'mcollective' agent
Commits on Jul 17, 2014
(MCO-199) Fix halt_code to return the correct exitcode for mco ping
When calling halt_code with the client object created from a mco ping
application we are in the special case where we have 0 nodes discovered
and a non zero amount of responses.

This commit changes the list of "return if" statements in favor of a
if/else statement and adds the check where discovered = 0 but responses
> 0, allowing the method to behave as documented and ping to work as
> intended.
Merge pull request #205 from ploubser/mco-199
(MCO-199) Fix halt_code to return the correct exitcode for mco ping
(MCO-407) Add requirement for connector plugins to have ddl files.
Due to the primary connector plugins being mainly shipped with core and
developed by Puppet Labs fixing bugs or extending the connectors often
require changes in core to happen at the same time. This puts us in the
position where connector plugins often depend on specific minimum
version of MCollective but that we cannot enforce.

This commit adds the requirement that connector plugins should always
ship with a ddl.

(MCO-406) Add DDL's to Connectors

This commit adds ddl's to both the ActiveMQ and RabbitMQ connectors and
adds test coverage to the MCollective::Connector::Base class.
(MCO-410) Fix direct addressing
MCO-360 broke direct addressing by inadvertently removing the method
call that created the subscription to the mcollective.nodes queue.

This commit replaces that call but also clarifies the intent by adding
comments and wrapping it in a new method call which has been appropriately
named.
Merge pull request #207 from ploubser/mco-410
(MCO-410) Fix direct addressing
Commits on Jul 18, 2014
Merge pull request #181 from databus23/dont_fail_on_bad_reply
fix rpc responses processing by block for bad replies
(MCO-205) Fix call_agent_batched to work with active_record
MCollective monkey patches array to include #in_groups_of, unless the
method is already defined. In the case of using MCollective and
active_record this method is already defined.

MCollective's version of #in_groups_of can yield multiple results to the
block parameter. This is not the same behaviour as ActiveRecord's
implementation so when the method gets called using MCollective's
symantics #in_groups_of does not show the expected behaviour.

This commit is based on a recommendation by Fabian Ruff and changes the
invocation of #in_groups_of to match that of the method defined by
ActiveRecord.
Merge pull request #208 from ploubser/MCO-205
(MCO-205) Fix call_agent_batched to work with active_record
Commits on Jul 21, 2014
Commits on Jul 22, 2014
MCO-363 Extract normalize_facts from get_fact and make recursive
In dealing with structured facts we need to recursively transform all
non-string scalars to strings, while preserving the hashes and arrays.
MCO-363 Add structured matching semantics to has_fact?
Here we add simple structured fact support to the has_fact? utility
method.

In order to get there we extract the core matching into test_fact_value,
to allow for it to be applied to structured data compound data
structures more readily.  Then we add the semantics for matching
against structured values (any of the the contents of an Array or
keys of a Hash should match the test)
maint - add tests that ensure comparisons are numeric
With a string-wise comparison "100" > "2" yields false (because "1" > "2" is
false and you can shortcut out)

Here we add some additional testing to check that the automatic conversion did
work, and not that "1" > "2".

This should avoid reintroducing a regression that I caused in an earlier
iteration of implementing MCO-363.
MCO-363 Add a fact_data plugin
This plugin exposes the walking of structured facts to the compound query
language.

Some example usages:

   ./mco ping -S 'fact("roles.0").value=base'
   ./mco ping -S 'fact("system_uptime.days").value>10'

We split the parameter into path components on the '.', and then recursively
walk from the root facts down, by hash key or array index.

As a data plugin cannot return structured data directly, we may json encode the
value, and set the value_encoding property to 'application/json', otherwise it
will be 'text/plain' or, if a value is not found, the boolean false.
Commits on Jul 23, 2014
MCO-293 check for correct-looking base64
The default Base64.decode method is very accepting, and will ignore
any characters not of the base64 character set, and decode those
that it does handle.  This can lead to unfortunate error messages
in the case where the message was not base64 encoded to begin with,
but a connector may be configured to expect them, so it attempts
to decode what bits it can from a message body, yeilding something
that's just the base64-decodable portions of the input string, which
will typically choke a higher level deserialiser.

Here we reject any 'base64' messages that contain characters that
aren't in the base64 character set or whitespace, in order to raise
an error sooner.
Commits on Jul 29, 2014
MCO-411 remove examples of catching RPCErrors in response blocks
It was originally intended that the appropriate exception for a
given rpc response would be propogated into the block supplied to
the call_agent method.  This isn't possible in ruby as noted in the
discussion around MCO-264.

Here we rework the misleading example code to reflect that we no
longer attempt to re-raise the exception in the supplied block, and
instead demonstrate testing response[:body][:statuscode].
Pierre-Gilles Mialon and richardc
MCO-351 Fix rabbitmq connector under custom discovery
If reply_to is set use it. In the case of using a custom discovery method,
the direct addressing method is used. In this case we want to keep the
reply_to if it is set by the command line.
Merge pull request #212 from richardc/MCO-411_docs_for_MCO-264
MCO-411 remove examples of catching RPCErrors in response blocks
(MCO-93) Introduce the ability to reset limit_targets
This commit adds the ability to RPC::Client#limit_targets= to reset
the @limit_targets instance variable by passing a nil or false value.
Merge pull request #214 from ploubser/mco-93
(MCO-93) Introduce the ability to reset limit_targets
Merge pull request #213 from richardc/finish_pr_198
MCO-351 Fix rabbitmq connector under custom discovery
Commits on Jul 30, 2014
Commits on Jul 31, 2014
MCO-416 specify the --daemonize option in init scripts
MCO-181 added the --daemonize and --no-daemonize options to mcollectived so
that the invoking init script could have final say about what it expects the
mcollectived to do - to daemonize or stay in the foreground - and so insulate
itself from a potential mismatch in the server.cfg and the expected behaviour.

Here we update the init scripts we have to make use of this feature.
Merge pull request #216 from richardc/MCO-416_init_daemonize
MCO-416 specify the --daemonize option in init scripts
(MCO-83) Add ability to sort rpc results
This commit adds the --sort flag to rpc clients which will sort
the rpc results by sender name before processing.

This is done by implementing the <=> operator for the RPC::Result
class.
Merge pull request #217 from ploubser/mco-83
(MCO-83) Add ability to sort rpc results
maint - fix visibility of Logger::Base#start and log
start and log are parts of the public api of Logger plugins

Logger#start is invoked by MCollective::Log#configure
Logger#log is invoked by MCollective::Log#log

As such these virtual methods should not be considered part of
MCollective::Logger::Base's private api.
MCO-328 add reopen to Logger::Base
Here we add the reopen method to the Logger api.  This will be used to have the
logger reopen the logfiles on signal, for better interaction with logrotate.
MCO-328 Add Log.reopen that just delegates to @logger.reopen
Loggers are not used raw by the rest of the codebase, but via their owner
MCollective::Log.  Here we expose the Logger#reopen method through the
MCollective::Log class
maint - add basic file_logger_spec.rb
Here we add some basic testing to File_logger.   There's not much
to test, as most of File_logger simply delegates to ::Logger.
MCO-328 hook SIGWINCH to Log.reopen
USR1 and USR2 are already taken, so we're left with SIGWINCH.  SIGWINCH is sent
when the terminal driver detects that the terminal has changed size, and is
most applicable to full-screen console applications.
(MCO-68) Allow --batch flag to use percentages
This commit adds the ability to RPC::Client::call_agent_batched to
determine a batch size based on a percentage of the amount of hosts
discovered.

This is achieved by softening the argument validation of the --batch
flag to also allow strings which match the regular expression /^\d+%?$/.

The ability to override and reset global batch sizes has been kept.
Merge pull request #219 from ploubser/mco-68
(MCO-68) Allow --batch flag to use percentages
MCO-418 Explain that we're ignoring the message
Currently if a message exceeds its TTL we raise MsgTTLExpired which is logged
at WARN and then don't process the message.  Here we tweak the message a little
so that it's more apparent to the user that the message was rejected by
validation.
Merge pull request #220 from richardc/MCO-418_ttl_warnings
MCO-418 Explain that we're ignoring the message
(MCO-408) Add ability to globally define if agents should be loaded
This commit adds the global configuration option, 'activate_agents',
which functions similarly to 'activate_agent' which can be specified
on a per agent bases.

When set to false no agents will be loaded. This behaviour can be
overridden on a per agent basis.

The current default behaviour of loading all agents by default has
been kept.
Merge pull request #221 from ploubser/mco-408
(MCO-408) Add ability to globally define if agents should be loaded
Commits on Aug 01, 2014
(MCO-272) Add ability splay registration plugins
This commit adds the registration_splay global configuration option.
When set starting the registration thread will be delayed by a random
amount of seconds between 0 and the registation interval.
Merge pull request #222 from ploubser/mco-272
(MCO-272) Add ability splay registration plugins
MCO-193 add 'discovery_timeout' to the configuration file
Here we add a discovery_timeout option to the configuration file, which is
allows you to set a default for the --discovery-timeout cli option.
Merge pull request #223 from richardc/MCO-193_discover_timeout_config…
…file

MCO-193 add 'discovery_timeout' to the configuration file
MCO-156 - don't set environment variables with the value of nil
Here we change the behaviour of the Shell helper filter the setting of any
environment variables with the value nil.

The initial usecase is the ability to inherit LC_ALL from the environment of
the mcollectived, to achieve this the user would use something like this:

  Shell.new('date', :environment => { 'LC_ALL' => nil })
Merge pull request #224 from richardc/MCO-156-LC_ALL
MCO-156 - don't set environment variables with the value of nil
MCO-421 Do signal processing in threads
In ruby 2.0 and onwards it's not permitted to do anything that would
block in a signal handler.  As our control flow doesn't have an
obvious place to process a raised flag, we instead take the approach
of spinning off a new thread to do the processing.

Tested on ruby 2.1.2
Commits on Aug 06, 2014
(MCO-243) Add max duration for soft_shutdown
This commit adds the soft_shutdown_timeout config variable that is used
to time out the soft shutdown action that is performed by the runner
thread.

This enabled soft_shutdown on Windows when the timeout is set. It will
still revert back to normal shutdown behaviour if the timeout is not
set.
MCO-175 Document the heartbeat options in the connector pages
This commit takes the information that we added to the release notes
for 2.4.0 and adds them with a little rewording to the reference
pages for the connectors.
Merge pull request #226 from richardc/MCO-175_keepalive_options
MCO-175 Document the heartbeat options in the connector pages
Commits on Aug 07, 2014
Merge pull request #227 from ploubser/mco-243
(MCO-243) Add max duration for soft_shutdown
Commits on Aug 08, 2014
add documentation of threaded to client docs
This is based on the documentation added to the 2.4.0 release notes.
Add publish_timeout to client docs
This is based on the documentation added to the 2.4.0 release notes.
Add soft_shutdown to server docs
This is based on the documentation added to the 2.5.0 release notes
Commits on Aug 11, 2014
Update recommendation for registration to heartbeating
The recommendation to use registration predates having good support for STOMP
1.1 heartbeats in the stomp-gem and our connectors.

Here we rework the Note that outlines what registration does for us in terms of
keeping the connection alive and fault detection, as this also applies to
protocol heartbeats, and move it to the section on connector settings.
Merge pull request #229 from richardc/docs_heartbeat_not_registration
Update recommendation for registration to heartbeating
Commits on Aug 12, 2014
MCO-443 Use a distinct reply queue per request
In very large installations we sometimes will see late discovery
responses arrive on the reply queue after the client has moved on to
expect a response to the subsequent rpc action, as the same reply
queue will be used for all requests made by that process.

Here we avoid this by introducing Client.request_sequence to keep
track of the sequence of requests sent, and use that value to create
a distinct reply queue per request, rather than per process.
maint - increase required api version to 2.6.0
When implementing MCO-443 we added MCollective::Client.request_sequence and
made use of it in the connectors.  This commit completes this by bumping the
required mcollective api version to 2.6.0, the first version that will have
that new api.
Merge pull request #232 from richardc/connector_api_version
maint - increase required api version to 2.6.0
Commits on Aug 14, 2014
Merge branch 'stable'
Conflicts:
	ext/build_defaults.yaml
Commits on Aug 19, 2014
(MCO-453) Fix validator plugin load race condition
This commit fixes a race condition which occurs when validator plugins
are loaded for the first time by adding a mutex to the Validator
module.

The race condition happens when an agent thread tries to determine
whether it should load the validator plugins, determines that they have
already been loaded by looking at the last_load timestamp but the
validators are in reality still busy loading. By locking the mutex
before the call to #load_validators? we allow
PluginManager.find_and_load to finish before we try and determine if the
validators have been loaded or not.
Commits on Aug 20, 2014
Commits on Aug 21, 2014
Merge pull request #236 from richardc/MCO-429_2_6_0_release_notes
MCO-429 2.6.0 release notes and documentation
Showing with 1,890 additions and 448 deletions.
  1. +15 −2 bin/mcollectived
  2. +0 −1 ext/Makefile
  3. +1 −1 ext/debian/mcollective.init
  4. +1 −1 ext/redhat/mcollective.init
  5. +1 −1 ext/redhat/mcollective.service
  6. +1 −1 ext/solaris/README
  7. +1 −1 ext/solaris/mcollective.init
  8. +2 −2 ext/windows/README.md
  9. +21 −6 lib/mcollective/application.rb
  10. +7 −0 lib/mcollective/client.rb
  11. +13 −1 lib/mcollective/config.rb
  12. +2 −0 lib/mcollective/connector/base.rb
  13. +18 −5 lib/mcollective/facts/base.rb
  14. +7 −0 lib/mcollective/log.rb
  15. +12 −8 lib/mcollective/logger/base.rb
  16. +7 −0 lib/mcollective/logger/file_logger.rb
  17. +1 −1 lib/mcollective/message.rb
  18. +4 −0 lib/mcollective/optionparser.rb
  19. +24 −10 lib/mcollective/registration/base.rb
  20. +7 −1 lib/mcollective/rpc/agent.rb
  21. +89 −35 lib/mcollective/rpc/client.rb
  22. +8 −3 lib/mcollective/rpc/helpers.rb
  23. +4 −0 lib/mcollective/rpc/result.rb
  24. +6 −2 lib/mcollective/rpc/stats.rb
  25. +90 −23 lib/mcollective/runner.rb
  26. +2 −0 lib/mcollective/shell.rb
  27. +5 −0 lib/mcollective/ssl.rb
  28. +29 −1 lib/mcollective/util.rb
  29. +9 −4 lib/mcollective/validator.rb
  30. +1 −1 mcollective.init
  31. +2 −1 plugins/mcollective/application/facts.rb
  32. +6 −2 plugins/mcollective/application/inventory.rb
  33. +3 −1 plugins/mcollective/application/plugin.rb
  34. +9 −0 plugins/mcollective/connector/activemq.ddl
  35. +2 −2 plugins/mcollective/connector/activemq.rb
  36. +9 −0 plugins/mcollective/connector/rabbitmq.ddl
  37. +4 −2 plugins/mcollective/connector/rabbitmq.rb
  38. +28 −0 plugins/mcollective/data/fact_data.ddl
  39. +55 −0 plugins/mcollective/data/fact_data.rb
  40. +6 −0 spec/spec_helper.rb
  41. +10 −0 spec/unit/config_spec.rb
  42. +28 −0 spec/unit/connector/base_spec.rb
  43. +35 −0 spec/unit/facts/base_spec.rb
  44. +9 −0 spec/unit/log_spec.rb
  45. +12 −2 spec/unit/logger/base_spec.rb
  46. +82 −0 spec/unit/logger/file_logger_spec.rb
  47. +1 −0 spec/unit/plugins/mcollective/application/plugin_spec.rb
  48. +44 −17 spec/unit/plugins/mcollective/connector/activemq_spec.rb
  49. +20 −19 spec/unit/plugins/mcollective/connector/rabbitmq_spec.rb
  50. +92 −0 spec/unit/plugins/mcollective/data/fact_data_spec.rb
  51. +46 −0 spec/unit/registration/base_spec.rb
  52. +37 −0 spec/unit/rpc/agent_spec.rb
  53. +68 −15 spec/unit/rpc/client_spec.rb
  54. +21 −0 spec/unit/rpc/result_spec.rb
  55. +97 −19 spec/unit/runner_spec.rb
  56. +5 −0 spec/unit/shell_spec.rb
  57. +5 −0 spec/unit/ssl_spec.rb
  58. +163 −1 spec/unit/util_spec.rb
  59. +37 −0 website/changelog.md
  60. +30 −1 website/configure/client.md
  61. +65 −17 website/configure/server.md
  62. +51 −58 website/index.md
  63. +2 −2 website/reference/basic/configuration.md
  64. +2 −0 website/reference/basic/daemon.md
  65. +8 −8 website/reference/basic/gettingstarted_debian.md
  66. +8 −8 website/reference/basic/gettingstarted_redhat.md
  67. +1 −1 website/reference/basic/messageformat.md
  68. +11 −11 website/reference/integration/puppet.md
  69. +1 −1 website/reference/plugins/aggregate.md
  70. +1 −1 website/reference/plugins/application.md
  71. +28 −0 website/reference/plugins/connector_activemq.md
  72. +38 −10 website/reference/plugins/connector_rabbitmq.md
  73. +2 −2 website/reference/plugins/connector_stomp.md
  74. +15 −15 website/reference/plugins/data.md
  75. +6 −6 website/reference/plugins/ddl.md
  76. +2 −2 website/reference/plugins/facts.md
  77. +27 −27 website/reference/plugins/security_aes.md
  78. +4 −4 website/reference/plugins/security_ssl.md
  79. +1 −1 website/reference/ui/filters.md
  80. +188 −0 website/releasenotes.md
  81. +5 −5 website/screencasts.md
  82. +16 −16 website/security.md
  83. +11 −11 website/simplerpc/agents.md
  84. +1 −1 website/simplerpc/authorization.md
  85. +21 −27 website/simplerpc/clients.md
  86. +11 −11 website/simplerpc/index.md
  87. +3 −3 website/simplerpc/messageformat.md
  88. +7 −7 website/terminology.md
View
@@ -8,11 +8,15 @@ require 'mcollective'
require 'getoptlong'
opts = GetoptLong.new(
[ '--daemonize', GetoptLong::NO_ARGUMENT],
[ '--no-daemonize', GetoptLong::NO_ARGUMENT],
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
[ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
[ '--pidfile', '-p', GetoptLong::REQUIRED_ARGUMENT]
)
daemonize = nil
if MCollective::Util.windows?
configfile = File.join(MCollective::Util.windows_prefix, "etc", "server.cfg")
else
@@ -23,22 +27,31 @@ pid = ""
opts.each do |opt, arg|
case opt
when '--help'
puts "Usage: mcollectived.rb [--config /path/to/config] [--pidfile /path/to/pid]"
puts "Usage: mcollectived.rb [--config /path/to/config] [--pidfile /path/to/pid] [--daemonize | --no-daemonize]"
exit
when '--config'
configfile = arg
when '--pidfile'
pid = arg
when '--daemonize'
daemonize = true
when '--no-daemonize'
daemonize = false
end
end
config = MCollective::Config.instance
config.loadconfig(configfile) unless config.configured
# If daemonize has not been set on the cli, reach into the config file to decide
if daemonize == nil
daemonize = config.daemonize
end
MCollective::Log.info("The Marionette Collective #{MCollective::VERSION} started logging at #{config.loglevel} level")
if config.daemonize
if daemonize
MCollective::Log.debug("Starting in the background (#{config.daemonize})")
if MCollective::Util.windows?
View
@@ -11,7 +11,6 @@ install: install-bin install-lib install-conf install-plugins install-doc
install-bin:
install -d $(DESTDIR)/usr/sbin
install -d $(DESTDIR)/usr/bin
cp bin/mc-* $(DESTDIR)/usr/sbin
cp bin/mco $(DESTDIR)/usr/bin
cp bin/mcollectived $(DESTDIR)/usr/sbin/mcollectived
@@ -53,7 +53,7 @@ case "$1" in
start)
echo "Starting daemon: " $name
# start the program
start-stop-daemon -S -p ${pidfile} --oknodo -q -a ${mcollectived} -- ${daemonopts}
start-stop-daemon -S -p ${pidfile} --oknodo -q -a ${mcollectived} -- ${daemonopts} --daemonize
[ $? = 0 ] && { exit 0 ; } || { exit 1 ; }
log_success_msg "mcollective started"
touch $lock
@@ -50,7 +50,7 @@ start() {
echo -n "Starting mcollective: "
# Only try to start if not already started
if ! rh_status_q; then
daemon ${daemonopts} ${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg"
daemon ${daemonopts} ${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg" --daemonize
fi
# This will be 0 if mcollective is already running
RETVAL=$?
@@ -6,7 +6,7 @@ After=network.target
Type=forking
StandardOutput=syslog
StandardError=syslog
ExecStart=/usr/sbin/mcollectived --config=/etc/mcollective/server.cfg --pidfile=/var/run/mcollective.pid
ExecStart=/usr/sbin/mcollectived --config=/etc/mcollective/server.cfg --pidfile=/var/run/mcollective.pid --daemonize
ExecReload=/bin/kill -USR1 $MAINPID
PIDFile=/var/run/mcollective.pid
View
@@ -17,7 +17,7 @@ Requirements, get them from opencsw:
Run requirements
- rubystomp library
http://stomp.codehaus.org/Ruby+Client
https://rubygems.org/gems/stomp
Up and till version 1.0.4 it is a single file. Put in /opt/csw/lib/ruby/site_ruby/1.8/
Configuration
@@ -40,7 +40,7 @@ case "$1" in
rm -f ${pidfile}
${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg"
${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg" --daemonize
if [ $? = 0 ]; then
touch $lock
exit 0
View
@@ -4,7 +4,7 @@ Here are a few instructions for people who wish to do early adopter testing. At
Assuming you are installing MCollective into `C:\marionette-collective`:
* Install Ruby 1.8.7 from <http://rubyinstaller.org/>
* Install Ruby 1.9.3 from <http://rubyinstaller.org/>
* check the boxes for "Add Ruby executables to your PATH" and "Associate .rb and .rbw files with the Ruby installation"
* Run the following commands to install the required gems:
* `gem install --no-rdoc --no-ri stomp win32-service sys-admin windows-api`
@@ -30,4 +30,4 @@ If it does not run:
* Look in the log files. Edit `server.cfg` to set `loglevel` to `debug`.
* If the log files are empty, look at the command the service wrapper runs and run it by hand. This will show you any early exceptions preventing it from running. It wont succesfully start, but you should see why it does not get far enough to start writing logs.
@@ -314,12 +314,27 @@ def halt_code(stats)
:okcount => 0,
:failcount => 0}.merge(stats.to_hash)
return 4 if request_stats[:discoverytime] == 0 && request_stats[:responses] == 0
return 3 if request_stats[:discovered] > 0 && request_stats[:responses] == 0
return 2 if request_stats[:discovered] > 0 && request_stats[:failcount] > 0
return 1 if request_stats[:discovered] == 0
return 0 if request_stats[:discoverytime] == 0 && request_stats[:discovered] == request_stats[:okcount]
return 0 if request_stats[:discovered] == request_stats[:okcount]
if (request_stats[:discoverytime] == 0 && request_stats[:responses] == 0)
return 4
end
if (request_stats[:discovered] > 0)
if (request_stats[:responses] == 0)
return 3
elsif (request_stats[:failcount] > 0)
return 2
end
end
if (request_stats[:discovered] == 0)
if (request_stats[:responses] && request_stats[:responses] > 0)
return 0
else
return 1
end
end
return 0
end
# A helper that creates a consistent exit code for applications by looking at an
@@ -18,6 +18,11 @@ def initialize(configfile)
@connection.connect
end
@@request_sequence = 0
def self.request_sequence
@@request_sequence
end
# Returns the configured main collective if no
# specific collective is specified as options
def collective
@@ -55,6 +60,8 @@ def createreq(msg, agent, filter ={})
request.reply_to = @options[:reply_to] if @options[:reply_to]
end
@@request_sequence += 1
request.encode!
subscribe(agent, :reply) unless request.reply_to
request
View
@@ -15,7 +15,8 @@ class Config
attr_reader :main_collective, :ssl_cipher, :registration_collective
attr_reader :direct_addressing, :direct_addressing_threshold, :ttl
attr_reader :default_discovery_method, :default_discovery_options
attr_reader :publish_timeout, :threaded, :soft_shutdown
attr_reader :publish_timeout, :threaded, :soft_shutdown, :activate_agents
attr_reader :registration_splay, :discovery_timeout, :soft_shutdown_timeout
def initialize
@configured = false
@@ -43,6 +44,8 @@ def loadconfig(configfile)
@registration_collective = val
when "registerinterval"
@registerinterval = Integer(val)
when "registration_splay"
@registration_splay = Util.str_to_bool(val)
when "collectives"
@collectives = val.split(",").map {|c| c.strip}
when "main_collective"
@@ -87,6 +90,8 @@ def loadconfig(configfile)
@classesfile = val
when /^plugin.(.+)$/
@pluginconf[$1] = val
when "discovery_timeout"
@discovery_timeout = Integer(val)
when "publish_timeout"
@publish_timeout = Integer(val)
when "rpcaudit"
@@ -115,6 +120,10 @@ def loadconfig(configfile)
@default_discovery_method = val
when "soft_shutdown"
@soft_shutdown = Util.str_to_bool(val)
when "soft_shutdown_timeout"
@soft_shutdown_timeout = Integer(val)
when "activate_agents"
@activate_agents = Util.str_to_bool(val)
when "topicprefix", "topicsep", "queueprefix", "rpchelptemplate", "helptemplatedir"
Log.warn("Use of deprecated '#{key}' option. This option is ignored and should be removed from '#{configfile}'")
else
@@ -165,6 +174,7 @@ def set_config_defaults(configfile)
@registration = "Agentlist"
@registerinterval = 0
@registration_collective = nil
@registration_splay = false
@classesfile = "/var/lib/puppet/state/classes.txt"
@rpcaudit = false
@rpcauditprovider = ""
@@ -193,6 +203,8 @@ def set_config_defaults(configfile)
@publish_timeout = 2
@threaded = false
@soft_shutdown = false
@soft_shutdown_timeout = nil
@activate_agents = true
end
def read_plugin_config_dir(dir)
@@ -17,6 +17,8 @@ module MCollective
module Connector
class Base
def self.inherited(klass)
plugin_name = klass.to_s.split("::").last.downcase
ddl = DDL.new(plugin_name, :connector)
PluginManager << {:type => "connector_plugin", :class => klass.to_s}
end
end
@@ -34,11 +34,7 @@ def get_fact(fact=nil)
# Force reset to last known good state on empty facts
raise "Got empty facts" if tfacts.empty?
@facts.clear
tfacts.each_pair do |key,value|
@facts[key.to_s] = value.to_s
end
@facts = normalize_facts(tfacts)
@last_good_facts = @facts.clone
@last_facts_load = Time.now.to_i
@@ -81,6 +77,23 @@ def has_fact?(fact)
def force_reload?
false
end
private
def normalize_facts(value)
case value
when Array
return value.map { |v| normalize_facts(v) }
when Hash
new_hash = {}
value.each do |k,v|
new_hash[k.to_s] = normalize_facts(v)
end
return new_hash
else
return value.to_s
end
end
end
end
end
View
@@ -44,6 +44,13 @@ def cycle_level
@logger.cycle_level if @configured
end
# reopen log files
def reopen
if @configured
@logger.reopen
end
end
# logs a message at a certain level
def log(level, msg)
configure unless @configured
@@ -34,6 +34,18 @@ def set_level(level)
@active_level = level.to_sym
end
def start
raise "The logging class did not supply a start method"
end
def log(level, from, msg)
raise "The logging class did not supply a log method"
end
def reopen
# reopen may not make sense to all Loggers, but we expect it of the API
end
private
def map_level(level)
raise "Logger class do not know how to handle #{level} messages" unless valid_levels.include?(level.to_sym)
@@ -60,14 +72,6 @@ def get_next_level
def valid_levels
raise "The logging class did not supply a valid_levels method"
end
def log(level, from, msg)
raise "The logging class did not supply a log method"
end
def start
raise "The logging class did not supply a start method"
end
end
end
end
@@ -41,6 +41,13 @@ def log(level, from, msg)
# STDERR it as last resort
STDERR.puts("#{level}: #{msg}")
end
def reopen
level = @logger.level
@logger.close
start
@logger.level = level
end
end
end
end
@@ -200,7 +200,7 @@ def validate
if msg_age > ttl
PluginManager["global_stats"].ttlexpired
raise(MsgTTLExpired, "message #{requestid} from #{cid} created at #{msgtime} is #{msg_age} seconds old, TTL is #{ttl}")
raise(MsgTTLExpired, "message #{requestid} from #{cid} created at #{msgtime} is #{msg_age} seconds old, TTL is #{ttl}. Rejecting message.")
end
end
@@ -177,6 +177,10 @@ def add_common_options
@parser.on("--threaded", "Start publishing requests and receiving responses in threaded mode.") do |v|
@options[:threaded] = true
end
@parser.on("--sort", "Sort the output of an RPC call before processing.") do |v|
@options[:sort] = true
end
end
private
Oops, something went wrong.

No commit comments for this range