| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch conflicts with a backport of itself. This merge resolution
favors the original patch for the code changes, and the 2.6.2 patch for
the specs.
Manually Resolved Conflicts:
lib/puppet/dsl/resource_type_api.rb
lib/puppet/parser/ast/definition.rb
lib/puppet/parser/parser_support.rb
spec/integration/parser/ruby_manifest_spec.rb
spec/unit/dsl/resource_type_api_spec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
environments or staleness check
Changed the resource type API to create AST objects rather than
directly instantiating resource types. This allows the same code
paths to be used to handle the results of parsing both .pp and .rb
files. This makes .rb files work properly in multiple environments,
because the types are now instantiated by code that is aware of which
environment the compilation is happening in. It also reduces the risk
of future changes breaking .rb file support.
Also, switched to using "instance_eval" rather than "require" to
evaluate the contents of the .rb file. This ensures that if the file
has to be recompiled (because it became stale), it will actually get
re-evaluated. As a side benefit, ResourceTypeAPI is now a class
rather than a mixin to Object, so its methods do not pollute the
global namespace.
To reduce the risk of customers coming to rely on implementation
details of the resource type API, changed its methods to return nil,
and removed methods from it that were misleadingly labeled as
"private".
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
A newline that was part of a diagnostic was left in, and this caused problems
with the serialization of strings in "preserve newlines" mode.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The evaluate_definitions method was first figuring out which resources
needed to be evaluated (using unevaluated_resources), and then
evaluating them one by one. As a result, if evaluating one resource
triggered another resource to be evaluated, the latter resource could
get evaluated twice. This bug could occur, for example, if both
resources were classes that were included into the node by an external
node classifier, and if the first of the two classes included the
second.
Modified Resource#evaluate to be idempotent.
Also added an integration test to verify the fix.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds a new feature to user providers "manages_password_age", along
with properties password_min_age and password_max_age to the user type.
These represent password min and max age in days. The useradd and
user_role_add providers now support these new properties.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code made assumptions about report structure that weren't valid for
2.6.x. The change has been verified to work with 0.25.x and 2.6.x
report formats.
Paired with: Rein Henrichs
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Modified the launchd provider to use OSX's "plutil" command to read
plists. This allows it to handle properly lists in both XML format
and binary format.
Launchd continues to write out propertly lists in XML format. This is
not a problem because the operating system is able to understand both
formats.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MS Windows is apparently only "posix curious;" many of the usual fcntl flags
are not defined when running under MS Windows. It also appears that we are
only using a small subset of the vendored event-loop library and could replace
it with a handful of (portable) extracted methods. This, however, would be
too agressive of a refactor for 2.6.2 and so this commit simply avoids referring
to the unsupported flag values in environments where they are not defined.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The debugging information added in commit b7e2580ab49ecdb67fc9b522829c005fc3750fbe
was not thread safe and, as it turns out, not as useful as had been hoped. This
commit reverts it.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Part of the ongoing refinement / cleanup of the string interpolation semantics.
When scanning for an unescaped string terminator we now also allow an 0 or more
pairs of backslashes (that is, escaped backslashes) before the terminator.
Thanks to Jacob for the test I should have added.
|
| | |
| | |
| | |
| | | |
Added a missing require to webrick/rest.rb.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The API for AST objects has changed, making the initialization of this
spec somewhat more complicated.
Also, git seems to have been confused by whitespace changes.
Manually Resolved Conflicts:
lib/puppet/parser/ast/resource.rb
|
| | |
| | |
| | |
| | |
| | | |
This is another case where our test objects were overly mocked so they
didn't alert us to problems with our implementation.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
This commit merges in d057b90 with the addition of commit 6dd1930 to fix
some tests that are confined to machines where rrd is installed.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The patch for #4726 causes old unit tests of the rrd reporting
infrastructure to run on my machine. These tests were calling the old
report api, which does not succeed.
Also, the rrd settings had unintentionally been moved out of the
:metrics section, making it possible that the rrd report directory would
fail to get created during testing.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The rrd project has been shipping ruby bindings since 1.3.0, and the old
rrdtool ruby library is no longer being maintained.
This patch is based upon Davor Ocelic's submitted code, with the
addition that I've added conditionals so it can still call the old
rrdtool library if a modern rrd is not installed.
|
|\| |
| | |
| | |
| | | |
There are test failures in commits following this one.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Having a root ca_name that matches the fqdn of the puppet master would
cause certificate lookup problems on some clients, resulting in failed SSL
negotiation.
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Whits are inserted into the dependency graph in the place where an empty
class is being required. Unfortunately, when such a class is involved in
a loop, the error message shows the cycle as involving Whit[Classname].
This patch changes it to say Class[Classname], which is much easier to
understand. It also fixes puppetdoc from generating documentation on the
Whit type.
|
| | |
| | |
| | |
| | |
| | | |
This change just forces a file to be written to the filebucket before we
drop the permissions necessary to do so.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Calling this method caused storeconfigs not to run.
ActiveRecord::Base.allow_concurrency was deprecated in Rails 2.2. We
support activerecord 2.1 and higher, so we still need to call this
method for 2.1. I factored out the code that determines our
activerecord version to a method in util so that the code was easier to
read and test.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The global "-o" option ("--onetime") was overriding the
application-specific option "-o" because global options were being
sent to the OptionParser after application-specific options.
Modified the order in which options are sent to the OptionParser to
have the correct behavior. Also merged together the two methods that
were applying options so that the order is more explicit.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This conflict was a little too complicated for diff to figure out, but
the resolution is actually fairly mechanical.
Some unit tests changed because they were mocking unnecessarily.
Manually Resolved Conflicts:
lib/puppet/util/rdoc/parser.rb
spec/unit/util/rdoc/parser_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When running puppet doc, if the directory containing the user's
specified manifest file overlaps with the modules directory (i.e. they
are the same directory or one contains the other), Puppet doc would
try to parse the overlapping files twice, triggering an exception
which made the documentation run fail.
Fixed the bug by adding a check to the RDoc::Parser#scan method to
prevent re-parsing of files that have already been parsed. Also added
a spec test to verify that this works.
|
|\| |
| | |
| | |
| | | |
There are merge conflicts with commits following this one.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The :undef symbol, which we use internally to distinguish between
undefined variables and variables whose value is the empty string, is
being leaked in calls to functions (e.g. "split"). This is a
departure from 0.25.x behavior, where undefined variables evaluated to
"".
This patch restores the 0.25.x behavior.
|
| | |
| | |
| | |
| | | |
This code was using a constant that might not always be loaded.
|
| | |
| | |
| | |
| | | |
Fredrik Eriksson's suggested change, from the ticket.
|
| | | |
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some specs were in conflict, as they had been recently modified to use
the API functionality that f950061 removes. This merge commit simply
restores the verson of those specs from f950061.
Manually Resolved Conflicts:
spec/unit/dsl/resource_type_api_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Made the following modifications to ResourceTypeAPI:
(1) returned nil from “define”, “hostclass”, and “node”.
(2) renamed “mk_resource_type” and “munge_type_arguments” to
“__mk_resource_type__” and “__munge_type_arguments__” to discourage
customers from calling them.
(3) Made ResourceTypeAPI a class rather than a module, and changed the
parser to evaluate the contents of pure ruby manifests using a
instances of this class.
(4) Changed ResourceTypeAPI to insert newly instantiated types into
Thread.current[:known_resource_types] rather than the default
environment's known_resource_types.
This effectively backports the fix for issue #4657 to 2.6.x.
Also backported the new spec tests from #4657.
|
|\| |
| | |
| | |
| | | |
There are merge conflicts with commits following this one.
|
| | | |
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 2b50f30 simplified and fixed bugs in code that had already been
modified extensively by 4da88fb and 6b1dd81. This merge resolution
commit is a manual replay of the changes from 2b50f30 onto next.
Manually Resolved Conflicts:
lib/puppet/parser/type_loader.rb
spec/unit/parser/type_loader_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function import_if_possible, which was supposed to be responsible
for making sure that no two threads tried to import the same file at
the same time, was not making this decision based on the full pathname
of the file, since it was being invoked before pathnames were
resolved. As a result, if we attempted to import two distinct files
with the same name at the same time (either in two threads or in a
single thread due to recursion), one of the files would not always get
imported.
Fixed this problem by moving the thread-safety logic to happen after
filenames are resolved to absolute paths. This made it possible to
simplify the thread-safety logic significantly.
|
|\| |
| | |
| | |
| | | |
There are merge conflicts with commits following this one.
|
| | |
| | |
| | |
| | | |
changed the regex so that tagmail allows . in tagname.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a minimal fix for #4631 by reversing one part of the refactor for #1903
commit 0d4fd60c7c143cc1f4e4b0f99f359c09cbfbf21e. It fixes the immediate issue
(implicit classes not being added to resources) but leaves open several other
questions which are defered to #4687.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Returning
nil in this provider had the effect that on every run, puppet would end
up calling yum erase . Returning the correct data structure
resolves this.
Thanks to Stephen Gran for the patch
|
| | | |
|
| | | |
|
| | | |
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes spec and unit tests indirectly related to the previous
patch-revert.
One failure was from trying to test the User Type's roles, when,
on many platforms, the roles feature wasn't supported by the default
Provider.
Other tests could fail on some platforms because they assumed that
unsupported attributes would be ignored with a warning, but the code was
crashing instead.
|