| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue is that case/selectors are downcasing the value before it
is compared to the options.
Unfortunately regex are matching in a case sensitive way, which would
make the following manifest fail:
$var = "CaseSensitive"
case $var {
/CaseSensitive/: {
notice("worked")
}
default: {
fail "miserably"
}
}
This patch fixes the issue by making sure the regexp match is done
one the original (not downcased) value, but still doing a case
sensitive match.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
File checksum is "md5" by default. When managing local files (not sourced
or content) it might be desirable to not checksum files, especially
when managing deep hierarchies containing many files.
This patch allows to write such manifests:
file {
"/path/to/deep/hierarchy":
owner => brice, recurse => true, checksum => none
}
Then puppet(d) won't checksum those files, just manage their ownership.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Patch thanks for Micah Anderson
|
| |
| |
| |
| | |
Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch brings in a pure ruby yaml generation library, analagous
to what we did with JSON/PSON, but without the renaming dodge we had
to do in that case to avoid fighting with Rails.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
|
| |
| |
| |
| | |
Unit tests for path changes
|
| |
| |
| |
| | |
Signed-off-by: Martin Englund <martin@englund.nu>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Due to the fact that resource.set_parameter is overwriting the previous
set_parameters, we were losing the previous relationships we set there,
either in a previous call of require or in the same call.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
exception logic
|
| |
| |
| |
| |
| |
| |
| | |
A 'require' statement with a path confused ruby enough to cause the same
file to get interpreted twice.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
type/user.rb was assuming that catalog.resources would return resources.
In 0.25.x, it (confusingly) returns strings. type/user ignored this, and
the codepath was a no-op.
In 2.6, the method was renamed to something less confusing, causing the
codepath in type/user to fail outright.
This patch added a catalog.resources method that returns resource
objects.
As a side effect, user resources will now autorequire group resources
again.
|
| |
| |
| |
| | |
Added the require.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch fixes the narrow problem of #4205, wherein type_loader would reparse
a file each time it was imported (causing the parser to incorrectly think that
it was in a loop) by checking @imported inside the existing check on the
thread-guarded @loaded. (@imported was being set but never checked).
This works (and is thread safe) because all of this is going on inside a giant
synchronize care of @loaded. But it, like the fix for #4208, does nothing
about the global lock.
Areas for future research:
1) Why is the looping inside of import?
2) Why are there separate @loaded and @imported tables?
3) Why is the parsing treated like a function (called deep in the structure)
yet coded like a thread-savvy pseudo state monad (e.g. raising errors that
presume it knows/owns what's going on outside the whole process)?
These and many other exciting questions are deferred to #4211
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to the glob pattern used, we are trying to import manifests twice.
Since it isn't possible (see #4205), it is not possible to use a pattern
in an import statement.
This patch makes sure manifests are returned only once.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Environments contain a deal of transitory information and references to other
objects, none of which is wanted when they are serialized.
Rather than having this serialization concern propogate through the code by
replacing environments by their names prior to serialization (which would be
one way to address the problem) this patch changes environments so they only
serialize their identity (name) and not their contents.
|
| |
| |
| |
| |
| |
| |
| | |
import_if_possible calls itself recursively, but it was failing to pass
its block parameter to its younger self. Thus when the inner call
reached the un-blocked case, it raised an exception rather than doing
something useful.
|
| | |
|