| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
| |
Restored deleted lines from type.rb and reinstated unit tests
|
|
|
|
|
|
| |
This restricts the change introduced in #4691 to hostclasses, and leaves defined
resources and nodes alone, thus more closely mimicing the 0.25.x behaviour. It
also includes title, as this was similarly affected.
|
|
|
|
|
| |
A use of namevar apparently slipped through the net or got (re)introduced
in a merge/conflict resolution.
|
| |
|
|
|
|
|
|
| |
The class name is now stored internally with an initial capital, which changed
the contents of $name in a way that broke some manifests. This fix stores the
downcased version in $name.
|
|
|
|
|
|
|
|
|
|
|
| |
My fix for #4542 was overly enthusiastic about assuring that all resources had
a stage, resulting in stages designations being serialized for resources in
manifests which did not use resources (everything was in implicit main). This
broke 0.25.x compatibility, as all catalogs now refered to stages.
This patch scales back the change for #4542 slightly, supressing the setting of
main on the puppetmaster and relying on the default behaviour on the client (for
2.6.x and later, treat it as main; for 0.25.x, do nothing).
|
|
|
|
| |
The test was expecting a stub object but wasn't providing one.
|
|
|
|
|
|
| |
If the file streaming is to be thwarted when running standalone the test for
standalone needs to be stubbed when running specs, lest the tests inexplicably
fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basing pervasive low-level behaviour changes on the application name isn't a
good idea, but if we're going to do it we need to remember to update the test
when we rename the application. Further, if we optimize around such low-level
tests (as we did when implementing file-streaming) we need to carry the tests
over into the new data paths.
This commit addresses both of these isues, restoring 0.25.x stand-alone file
serving by adjusting the process-name test in the indirector to recognize
"apply" as standalone (and thus not use http to fetch the files) and by adding
a branch to the file streaming code to do the same when fetching the content.
I am not certain that this change is globally correct; there may be other
related problems that will not be fixed (and may in fact be exacerbated) by
this patch.
|
|
|
|
|
|
| |
puppet agent was not catching all species of exceptions, causing it to
crash on net/http timeout errors.
This patch broadens the types of exceptions that are caught.
|
| |
|
| |
|
|
|
|
|
|
| |
Autotest was failing on puppet apply tests because it was reading
autotest's args as the manifest file and then erroring because it wasn't
a valid file.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The less stuff being done in the spec_helper the better for reasoning
about what's happening in the tests. puppettest.rb does a lot of things
that aren't necessary for the specs, so this patch gets those things out
of the spec_helper.
Reviewed by: Jesse Wolfe
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The serialization of much of the memory image was being triggered by a copy of
an unchanging method return value in an instance variable. I had introduced
this as a performance hack. The results were correct, but when the object was
serialized it took a huge amount of data with it (known_resource_types, and
from there...)
As the underlying costly operation is no longer being called (thanks to Paul and
Jesse) the caching is no longer a significant performance boost, and can thus
simply be removed.
|
| |
|
|
|
|
|
|
|
| |
When a regexp is used in a selector, vim shouldn't choke if more than one slash
is found on the same line.
This patch also adds support for colons in attribute names.
|
| |
|