| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's really slow and has no actual functionality
any more, since we just remove the catalogs from memory
anyway.
This should be a good speed boost for very little effort.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The semantic interaction of tidy/matches and tidy/recurse is tricky to get
right; it only makes sense to use matches with recursion (a fixed path will
either statically match or it won't, no need for a run-time check) but there
was nothing to warn users of this fact. To compound matters, the example
in the matches parameter doc string even made this mistake.
This patch: 1) fixes the doc string; 2) prohibits the use of match without a
value of recurse capable of generating files to match, 3) fixes tests that
were passing for the wrong reason and adds tests on the prohibition added
in (2).
|
| |
| |
| |
| |
| |
| |
| | |
Puppet::Resource::Catalog's spec
This issue causes other specs to fail, because they depend on the
default terminus being unchanged.
|
| |
| |
| |
| |
| |
| | |
The output variable in the inner block wasn't visible in the outer block,
and wasn't needed in any case, since the results are returned naturally
if you just leave everything alone.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a targeted fix to the issue of permissions when writing ssh authorized
key files by 1) requiring that an existing users be specified on the resource
and 2) doing the write as that user. It's based on Michael DeHaan's initial
implementation of Luke's idea, but with a number of simplifications (mostly by
testing necessary conditions as early as possible so the code isn't cluttered
up with a lot of checks).
|
| |
| |
| |
| |
| |
| | |
It's about 10x faster to read the whole file than to read each line and
concatenate them (actually, it's O(n) vs. O(n^2), so the exact speedup
depends on the file size).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The plussignment operator was constructing the new parameter value by
modifying the param object's value in place (so as to preserve the file
and line information for debugging). However, when multiple resources
are overridden by the same plussignment this would result in all of the
resources sharing the same value (the union of all the prior values and
the new value), which is wrong.
Instead, we need to give each resource its own copy of the value (e.g.,
a copy of the param object), which this patch implements.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| |
| |
| |
| | |
Thanks to Benedikt Böhm for the patch
|
| | |
|
| |
| |
| |
| |
| | |
We default to logging via syslog so there aren't any puppet logs on many
boxes. Causing a weekly restart shouldn't be necessary.
|
| | |
|
| |
| |
| |
| | |
modules
|
| | |
|
| |
| |
| |
| |
| | |
As purged is not contained by default within ensureable we need to
extend the parameter to properly deal with purged lists.
|
| |
| |
| |
| |
| |
| |
| | |
The new to_yaml method doesn't take format arguments (as they are
unnneeded).
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The "Ensure Parameter" tries to call destroy on the
provider and not delete.
|
| |
| |
| |
| |
| |
| | |
containing the specified command.
Also adds rspec tests for generate().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
You need to:
gem install yard
Then run:
rake yard
This will generate a "doc" directory containing YARD documentation.
|
| | |
|
| |
| |
| |
| | |
Thanks to Jasper Lievisse Adriaanse for the fix.
|
| |
| |
| |
| | |
Fix via Brice Figureau
|
| | |
|
| |
| |
| |
| | |
puppetd/puppetmasterd
|
| |
| |
| |
| | |
/var/lib/puppet
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to a bug in Ruby 1.8.7 net/http will attempt to close a connection
that wasn't successfully opened (it's nil), first checking to see if the
connection is already close, and thus raising a method missing exception.
This bug causes error messages that are confusing / misleading.
To get around this, we add a closed? method to nil such that a nil (unopened)
connection is always considered closed, allowing the real problem to be
reported.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch reverts the semantically significant parts of #2890 due to the
issues discussed on #3360 (security concerns when used with autosign,
inconsistency between REST & XMLRPC semantics) but leaves the semantically
neutral changes (code cleanup, added tests) in place.
This patch is intended for 0.25.x, but may also be applied as a step in the
resolution of #3450 (refactored #2890, add "remove_certs" flag) in Rolwf.
|
| |
| |
| |
| | |
dev-lang/php).
|
| | |
|
| |
| |
| |
| | |
Thanks for Eric Sorenson for the patch.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will rarely be used, but it enables even more architectural
flexibility, such as precompiling catalogs and storing them in memcached
or equivalent. With this setup, a single host can probably serve all
catalogs and you would then just have as many compiling hosts as
needed.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This basically allows a sysadmin to control when a client
will compile a new catalog - with this option enabled,
the client will use the cached catalog as long as it has
one, only recompiling when run with the option disabled.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
| |
| |
| |
| |
| | |
This is the patch from Mike Pountney <Mike.Pountney@gmail.com> off
the list with the additional test Luke requested.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Tests that generating resources performs a check and only returns
resources that check as true. There is already spec coverage for this
behavior.
|
| |
| |
| |
| | |
it has been superceded by an rspec spec.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The original pure ruby yaml patch missed some edge cases; specifically, classes
that were modified by the syck version to directly call it and thus never
reached the pure ruby version. This adds monkey patches to all of those case
which we might reasonably care about (omitting, for example, calls within the
syck version to itself) and tests which show that the monkey patch works.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following manifest:
case $var {
/match/: {
if $var =~ /matchagain/ {
}
}
}
is failing because the "=~" operators when matching sets an ephemeral
variable in the scope. But the case regex also did it, and since they
both belong to the same scope, and Puppet variables are immutables, the
scope raises an error.
This patch fixes this issue by adding to the current scope a stack
of ephemeral symbol tables. Each new match operator or case/selector
with regex adds a new scope. When we get out of the case/if/selector
structure the scope is reset to the ephemeral level we were when
entering it.
This way the following manifest produces the correct output:
case $var {
/match(rematch)/: {
notice("1. \$0 = $0, \$1 = $1")
if $var =~ /matchagain/ {
notice("2. \$0 = $0, \$1 = $1")
}
notice("3. \$0 = $0, \$1 = $1")
}
}
notice("4. \$0 = $0")
And the output is:
1. $0 = match, $1 = rematch
2. $0 = matchagain, $1 = rematch
3. $0 = match, $1 = rematch
4. $0 =
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| | |
Some tests didn't define this setting which caused this method
to fail.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
| |
| |
| |
| | |
Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This method has two issues:
* it is inefficient when there are many events
* it tries to match edges that shouldn't be matched
With recursive file resources, many change events can be generated.
The method used to find the good ones is pretty inefficient, allocating
arrays and/or appending to arrays which is a slow operation that can
consume lot of memory.
Still with recursife file resources, the current code tries to match the
events with edges pointing to generated sub-file-resources, which is not
necessary. In fact this all happens because we masquerade the sub-generated
resources with the topmost resource whic itself has auto-required links
to them. There is no reason to send back those events to where they were
generated.
This patch tries to minimize allocations or array appending, it also collect
event names (instead of events themselve) while matching since there are
great chances there are way less events names than events (and we're matchin
by name).
This patch also makes sure we select only edges that don't point back to
the event sources.
Results for matching 1100 events:
* old code: 22s
* new code: 0.02s
This patch also helps on the memory consumption side since the GC has
almost no work to perform.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|