| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
I fixed a few of these in a previous patch, but Hudson found more. I
replaced the pattern of using Time.now and then doing date math to
calculate intervals with the pattern of hard setting the intervals using
utc times for the test.
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The internal format of parameters was changed between 0.25.x and 2.6.x, making
them incompatible when serialized. This was fixed for PSON under ticket #3656
(by modifying the data as it was serialized) in:
commit f66095d35bc5f9645eb19bbb8cefa342c0181d2d
and
commit 2edf7fe968ac3d8af9865f65100940747c1fa894
but nothing was done about the other serialization formats. This commit adds
a callback to zaml property serialization and uses it to route data through the
fixup method added in the commits above, thus fixing the problem "the same way"
as it was fixed for PSON under #3656.
It does nothing about marshal, mostly because I have not totaly gone over to
the dark side (yet).
|
|
|
|
|
|
|
|
| |
This script helps people quickly test different branches of various
puppet related projects like facter, puppet-scaffold, puppet-dashboard,
etc... It allows the user to simply clone puppet and start running
different puppet version without installing puppet or any other setup
costs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out that:
zero = Time.now # Reset the current time to X:00:00
current = zero - (zero.hour * 3600) - (zero.min * 60) - zero.sec
current is actually 1am on a day where the time falls back (Nov 7th),
not midnight as the test expected.
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
|
|
|
|
|
|
| |
Standardize how we create tmpdirs by using the puppet function instead
of Dir.tmpdir.
Paired-with: Paul Berry <paul@puppetlabs.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just to follow up on 5112 I have a dirty patch that appears to work.
Nominally tested it on 10.4, 10.5, & 10.6. 10.4 now applies catalogs
instead of failing. All versions successfully manage a test services
state as well.
Does anyone have a better suggestion than '-o /dev/stdout'? Seems a
mite hacky to me.
Also I think that the 10.4 machines are going to a have a \ ( slash )
file in whatever puppets working dir was. plutil seems to have been
interpreting as literal file name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 0.25.x the type & title of a resource were wrapped in a Puppet::Resource::Reference
object whereas in 2.6.x they are attributes of the resource itself without the
additional indirection (see 7089446697ad550c22012bc2b5572030727d67e1).
When pson serialization is used this isn’t a problem but with formats in which
we just blindly emit the structure either because we have no choice (marshal)
or because we just use the default (yaml) it is a compatibility-breaking change.
This patch resoloves the problem by adding a dummy reference object to cause
the "correct" serialization; it is intended as a stop-gap for 2.6.x and should
NOT be merged into next.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reconciliation/melding of Paul's
(#4534) Class inheritance with parameterized classes is no longer ignored
and Markus's
Fix for #4778 -- evaluate parameterized classes when they are instantiated
Extracted the code from Resource::Type#mk_plain_resource that evaluates
parents and tags the catalog, and moved that into a new method called
instantiate_resource. Instantiate_resource is now also called from
Parser::Ast::Resource#evaluate, so that the notation
"class { classname: }"
now executes this code too. Likewise adds class evaluation so that it behaves
the same (with regard to lazy / strict evaluation) as
include classname
|
|
|
|
|
|
|
|
|
|
|
| |
This was a regression, not covered by a test; previously the string
"foo\
bar"
would be interpreded as "foobar" but this was changed to "foo\\\nbar" in
2.6.x with my string interpolation refactor. This change restores the
behaviour.
|
| |
|
|
|
|
|
|
|
|
|
| |
The PSON library needlessly assumed that the data to be transmitted was well-
formed unicode. This made Latin-1 users (and anyone who needed to serialize
arbitrary binary data) sad. This patch goes some of the way to resolving the
issues, by passing through non-unicode data rather than just failing, adds
tests, and cleans up a pernicious assumption about escape characters in ruby
regular expressions not marked "n" (no-encoding).
|
|
|
|
|
| |
This is intended to be a minimal fix, with tests, to prevent chage from running
unless needed.
|
|
|
|
|
| |
This fixes the command / option issues of #4963 as suggested on the ticket; the
setting-expiry when not needed aspects are deferred to #4975.
|
| |
|
|
|
|
|
|
|
|
| |
The fix for #4644 usurped an existing option flag to supress the installation
of man pages on Microsoft Windows, when the desired behaviour was to only skip
the installation on MSWin and not change the behaviour on other platforms.
This patch implements the check explicitly to correctly express the desired
behaviour.
|
|
|
|
| |
This fix for #3707 was incorrect & just moved the problem (see #4929).
|
|
|
|
| |
/usr/lib/ruby/site_ruby/1.8/puppet/util/metric.rb:62: warning: parenthesize argument(s) for future version
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The spec test changes for ticket 4025 (binary plist support) failed on
non-OSX systems because of a missing stub. Added the missing stub so
that the spec tests can now run on all systems.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is another case where our test objects were overly mocked so they
didn't alert us to problems with our implementation.
|
| |
|
|
|
|
|
|
|
|
|
| |
We were failing to make the sbin directory, and so the install script
was failing to install files to it. Also, we were trying to add man
pages regardless of whether or not we actually wanted to. Changed
operating system detection to use Facter["operatingsystem"], which is
easier to check than RUBY_PLATFORM (there are multiple different values
for Windows).
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|