| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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).
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Rather than just creating a handler for the base mime-type (e.g. "text/yaml") we
create some synonyms where appropriate (e.g. "text/x-yaml", "application/yaml",
etc.)
|
|
|
|
|
|
|
|
|
|
| |
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.
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.
|
|
|
|
|
|
| |
This commit unifies the code paths on which classes are added, alters the default
stage to respect the stage of the parent if any, and assures that the resource is
notified if its stage is assigned (turning an implicit stage into an explicit one).
|
|
|
|
|
|
|
| |
The refactors for 2.6.x stopped "puppet apply" from saving reports; this fix
adds report saving back to puppet apply but leaves a number of related issues
(code path consolidation, report contents, etc.) unresolved for future patches
in the 2.6.x series or more significant refactoring in 2.7.x.
|
| |
|
|
|
|
|
|
|
|
|
| |
puppet queue was trying to call .subscribe on
Puppet::Resource::Catalog::Queue, but that object had not been loaded
into the ruby interpreter.
This bug was partially masked by ruby's confusing constant resolution,
which was incorrectly returning the Puppet::Application::Queue class
instead of throwing a NameError
|
|
|
|
|
|
|
| |
Internally the cron type is seeing params containing only '*', as
absent. However, if a user was setting a parameter explicitely as
'*', we weren't munging it to be absent. Hence, we were setting
this param over and over again.
|
|
|
|
|
|
|
| |
The responsibility for adding classes to the compiler's classes list (for use
in constructing classes.txt) moved around a bit in the 0.25 to 2.6 transition
before being dropped in a merge conflict resolution. Ooops. This restores it,
and adds tests to prevent regression.
|
|
|
|
|
|
|
| |
This basically involved adding a search method to the yaml indirector, which I
did by copying the one from ssl_file and fiddling with it until the tests
passed. Since the most straight forward way to do this required extending the
interface to the path method I added tests for the additional behaviour.
|
|
|
|
| |
A contributor has requested that his changes be removed from puppet.
|
|
|
|
|
|
|
|
| |
Also warns you it's skipping files if you pass it more than one file to
apply.
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
Signed-off-by: Matt Robinson <matt@puppetlabs.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Updated defaults.rb to Markdown
Migrated report documentation to Markdown
Migrated Naginator doco to Markdown
Updated provider documentation to Markdown
|
| |
|
|
|
|
| |
Signed-off-by: Jes Fraser <jes@gadget.geek.nz>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Some recent versions of rails have started calling yaml with the internal
(and IIRC depricated) signature; this does nothing special in yaml but it
breaks with zaml, so we add an ignored parameter to simulate the non-behavior.
*sigh* I love rails.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the rest of the change for #4303; James and I discussed various
ways the solution to that ticket needed to be extended but, as neither of us
committed code, nothing changed. This is the least implact extension, which
mimics the behaviour of prior versions.
It leaves open the question: should '\\x' start with a single or double
backslash? If, as now, '\\x' starts with a double backslash (i.e. single quote
is the only escapable characterin single quoted strings) a string ending in a
backslash can not be represented in a single quoted string.
|
|
|
|
|
|
|
|
|
| |
When streaming a file through rack, we set the Content-Length header
to be the size of the transmitted file.
This size is an int, and recent passenger versions only support string
values.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
| |
Stage[main] is created without an associated source, to which
Parser::Resource::Param objects. This patch observes that the source
attribute of both Parser::Resource and Parser::Resource::Param seem
not to be used anywhere, and removes the requirement that it be
supplied.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating the error message when we can't find any instances for a
search request, we were "inspect"ing the request which now contains
an environment instance which itself contains a lots of things (including
all the known resource types).
Thus it was generating a very large "reason" (ie the HTTP error string).
On some environments (ie proxied mongrel) this was too large and the
proxy would produce an error 500.
I just changed the error message to just log the indirection name and
request key (which should be enough to understand what is wrong).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
| |
The patch for #3904 should not have been accepted; it's buggy and the use case
(supporting having nodes in ldap more than once with the same name but distinct
records) is ill-conceived.
This commit reverts the patch (a7884b47) and the previous attempt to fix it
(e6709da4), restoring the old (0.25.x) behaviour.
|
|
|
|
|
|
|
|
|
| |
* Remove hard-coded facts terminus in master
* Change facts_terminus default to 'yaml' for master and 'facter' for
everything else.
Paired-with: Matt Robinson <matt@puppetlabs.com>
Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
|
|
|
|
| |
http://serverfault.com/questions/166199/puppet-md5-sum-of-string
|
|
|
|
|
|
|
| |
extlookup was adding its data files to the list of watched source files.
This causes the .pp manifests to be re-parsed whenever the .csv files
change, which is no longer necessary, as the .csv files are already
reparsed on every function call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We found the gsub! in extlookup was actually modifying the value for
extlookup_precedence, so the next node to call it just got the
interpolated value from the first run.
We did two things in the code to prevent this:
1. We returned a dup of the ast string object so that modifying it
wouldn’t change puppet’s state. We didn’t do this for all possible
return values because we depend on using the original ast array object
to do array concatenation
2. We fixed extlookup to not do a destructive gsub
Reviewed by: Jesse Wolfe
|
| |
|
|
|
|
|
|
| |
The run_mode value was incorrectly getting stored to Puppet[:mode], which
was confusing the optparser for applications that declare a --mode
parameter.
|
|
|
|
|
|
| |
My earlier #4397 patch was not aware of the parameterized class
instantiation syntax, and failed on manifests that instantiate
parameterized classes.
|
|
|
|
|
|
|
| |
The new syntax for instantiating parameterized classes was confusing the
lexer's notion of namespaces.
This is a simple fix to prevent that syntax from polluting the
namespaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST resources.
Move type-name resolution out of Puppet::Resource into the AST resources.
Move find_resource_type out of Puppet::Resource into Scope
Thus, never pass unqualified type names to Puppet::Resource objects.
Thus, Puppet::Resource objects don't need the namespace property,
and Puppet::Resource objects never consult the harddrive to look for
.pp files that might contain their type definitions,
Thus, performance is improved.
Also removes the temporary fix for #4257 that caused #4397
(The code was too eager to look for a class in the topscope)
Paired-With: Paul Berry <paul@puppetlabs.com>
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
Due to type collection madness, agent tries to import modules
to resolve resource types. That is wrong, decreases performance,
and causes problems. This patch forces agent to not import any
files by setting ignoreimport to true.
|
|
|
|
|
|
|
|
|
| |
When the name of a module matches the name of a file in the local
directory, puppet agent would sometimes try to read that file and
interpret it as puppet code. This happened because files.rb was
unintentionally permitting puppet files without an extension. Fixed
by changing the glob pattern to only permit ".pp" and ".rb"
extensions.
|