| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
There's more caching to add, but this simplifies
the interface to the list of paths and then caches
that list so we aren't constantly searching the
filesystem.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Caching the module path (because we check which
directories exist, and this method can get called
often), and the complete list of modules.
The cache ttl uses the filetimeout, which defaults to
15 seconds.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
Previously you had to have an Expirer, but now
you can declare a TTL for a cached attribute
and it will be expired automatically when the
cached value is older than the ttl.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
Apparently the stomp client is really unhelpful with
failures; this attempts to provide at least a bit
more information.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
There's better logging, and it's a bit more
exception-friendly.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main goal of this refactor is to tell the client to
be resilient to failures (configured at initialization time),
and to send all messages as persistent messages (configured
for each message).
In the process, the client now parses the queue source URI
and handles each argument separately. The tests are more
thorough, also.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
We previously manually slept, but this uses
the queue client to handle keeping the process running,
by just joining all running threads.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the behaviour of template searching a bit -
we previously usually returned a file name, whether the template
existed or not. Now we only return a path if it
exists.
Refactoring a few of the the tests for TemplateWrapper, also.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
It's set to 'only' instead of 'local'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Fixes #2268 "Rack::RewindableInput is not a valid input stream."
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when you created a module you had to specify
the path. Now Module instances can use the module path
to look up their paths, and there are methods for determining
whether the module is present (if the path is present).
Also cleaned up the methods for figuring out what's in
the module (plugins, etc.).
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
The Module class had a bunch of code for finding
manifests and templates even when not in a module,
and it complicated the class unnecessarily. This
moves that code to a new, hackish-but-sufficient
module for just that purpose.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
We weren't splitting on whitespace, which is necessary
since the settings don't support arrays but files
expect them.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
defined
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
|
|
|
| |
"user doesn't exit" error appeared once again after the changes which were
applied in order to fix #2004.
Validation must only check attributes presence, not their value.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I *swear* I wrote tests for the daemon, but I
can't find them in any of my branches so I rewrote
them.
In the course of writing them, I also fixed the
usage of Daemon.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
The Server class has all of the logic now,
instead of doing weird things in the defaults.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This lays the ground: a wrapper for the REST handler, and an application
confirming to the Rack standard. Also includes a base class for Rack
handlers, as RackREST will not stay the only one, and there needs to be
a central place where client authentication data can be checked.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the FileCollection to store the path parts allows to represent
a common path prefix by an integer.
This way the memory used to manage deep hierarchies is reduced.
The reduction factor depends on the number of managed files per
directories: the more files in a directory, the more they will share
the same common prefix, and the better we'll gain.
Early tests on a 5 level deep hierarchy containing 100 files
per level show about a 50% less memory consumption.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unmunge is the reverse of munge.
While munge allows the type to return a different parameter value
or properties should than the one it was created with, unmunge
does the reverse.
It can be used for instance to store a value in a different
representation but still be able to return genuine value to the
outside world.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of ruby bug:
http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886
and
http://redmine.ruby-lang.org/issues/show/1331
YAML dump of hashes using ruby objects as keys is incorrect leading
to an error when deserializing the YAML in puppetd.
The error is easy to correct by a post-process fix-up of
the generated YAML, which transforms:
&id004 !ruby/object:Puppet::Relationship ?
to the correct:
? &id004 !ruby/object:Puppet::Relationship
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch moves Type to use Puppet::Util::Tagging as the other
part of Puppet. This brings uniformity and consistency in the
way the tags are used and/or compared to each other.
Type was storing tags in Symbol format, which produced #2207.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously used and expected Puppet::Parser::Resource
instances, but 0.25 converts them all to Puppet::Resource
instances before they're passed out of the compiler,
so the Rails integration had to be changed to expect that.
There's still some muddling, because the rails resources
only generate parser resources, but that works for now
because that's what we expect when collecting resources.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
This is required for Rails support.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The cert name should be searched first in default
circumstances, even if it disagrees with the hostname.
Brice's change to the way catalogs are searched for didn't
quite work when the hostname and certname didn't agree *and*
the certname was fully qualified.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
If we don't do this, there's a chance we'll get hit
by the ruby yaml bug again.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
Unfortunately, again because of a Ruby bug
(http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886)
Ruby can't print yaml that it can read, if custom
classes are used as keys in hashes, which Sets use internally.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
This is the last step to fixing #2189.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
I'd made the argument no longer optional
because I thought the method was rarely used,
but it's used in puppetd a good bit.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
|
|
|
|
| |
Adds manifest param for service type, defines a command or manifest to set up a service
Add service setup (import) support
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationale:
Before this change, the catalog was retrived with this uri:
/catalog/hostname
On the server side, the corresponding node was found by using the
request node, then finding if this node also match hostname
(which it does of course).
But it is not possible to have an ACL matching the hostname part
of the uri, because it:
* it would be compared to the node name (certname), which obviously
is not the same
* it is not possible to create a dynamic allow/deny rule on a non-fqdn
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|