| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the hooks provided via the Indirector Request
for determining how the cache is used. These hooks are only
used by the Configurer class. They're messy, but I can't
come up with a better design, and they're at least sufficient.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
Most of these were small changes, like moved methods.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This will eventually be used by puppetrun, but
for now is just called by the old-school Runner handler.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it so we can easily create and use lots
of agent instances, rather than having a single
global instance with shared state.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This replaces the short-lived EventManager class, all of
the service- and timer-related code in puppet.rb, and moves
code from agent.rb, server.rb, and other places into one
class responsible for starting, stopping, pids, and more.
The Daemon module is no longer in existence, so it's been
removed from the classes that were using it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
That class is gone, so until the Client class
is no longer necessary, using a different class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This broke in a previous commit, and was apparently not
tested well because of how the mocks were set up. The
integration test caught it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
This moves the code out of Daemon.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
This will be handled by the Agent or the Daemon class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the way through implementation of this class, I realized
that most of its functionality will never actually be used.
Thus, I'm refactoring it and the Puppet::Daemon module into a
single Puppet::Daemon class with merged functionality, and then
moving all of the daemon-like functionality out of both the
Agent and Server classes.
We'll then have a Daemon class that knows how to start and stop
services, create and remove pidfiles, and whatever else
daemons need to know how to do.
This commit is to just so I have the current code snapshot.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Once I went to add runinterval support to the Agent class,
I realized it's really two classes: One that handles starting,
stopping, running, et al (still called Agent), and one that
handles downloading the catalog, running it, etc. (now
called Configurer).
This commit includes some additional code, but 95% of it is just moving code around.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
Again, necessary so that the class can be dumped
in Marshal or YAML.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was prohibiting the catalog from being dumped.
No tests, because I didn't change behaviour and the existing
tests provided sufficient coverage.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
Converting to a Resource catalog for transmission,
then converting to a RAL catalog on the client.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
We now always get the format name and the method that
failed.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is important because puppetmasterd changes its configurations
a couple of times, and we need to disable any previously-created
caches.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
Otherwise we couldn't disable a cache once configured.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
Also cleaning up the lock usage by yielding to a block
when a lock is attained.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the SSL Host couldn't save a CSR or key, it would still
keep them in memory; this meant that, for instance, a CSR
that couldn't be saved to the server was never resent.
This commit removes in-memory instances that couldn't be saved,
thus forcing regeneration.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This way you don't have data cached that couldn't be
saved to the main repository.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This work was done by the Agent class before,
but it's really related to the catalog, so that's
where it is now.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
I moved all of the extra Fact modifications into the Facts
class, and then moved the calls of those new methods
into the Facter terminus.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't change functionality, it just simplifies
the agent class.
I've also started the work to get the catalog handling
done using REST/the Indirector.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
It's now moved to the Facter indirector terminus.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This work was previously done in the Master client
class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now use any passed in node (used by bin/puppet), then any
authenticated node info (e.g., the cert name), then any
passed in information (usually the host name).
The third option will never be used in Puppet's architecture,
but simplifies using the API for other users.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Made minor changes, including removing the parent class.
The functionality hasn't changed yet -- that comes in later patches --
but all but a couple of the older tests pass.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
This reverts commit bbd99cc87a775732f2fed3686962647a5c30c5b8.
|
| |
| |
| |
| | |
This reverts commit f57a5e88229578747dde2c90af3a696ad0172e72.
|
| |
| |
| |
| |
| |
| |
| | |
so I'm just applying it here so it continues to show
up in the history in case I ever want to look at it again.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
This will handling downloading facts and plugins.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This class replaces the existing, all-knowing Client::Master class,
and it will hopefully be more reasonable in scope.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This will allow the soon-to-be-created Agent class to
skip cached catalogs when desired.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The rationale behind this patch is that it takes a lots of time
to let rails unserialize the ParamValue and ResourceTag object
on each compilation, just to throw them away the second after.
The idea is to fetch directly (and batched host per host) the
parameters and tags from the database and then returns them as
hash.
This allows the no-modification case to takes at least 2 times
less than before.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are unfortunately no tests for this patch; the Rails
code is disappointingly low on tests as it is, and it would
have been essentially an herculian effort add all of the necessary
tests just to make sure this worked.
I've verified it works in practice, which should be sufficient for now.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows you to specify that a metaparameter is undef
inside a definition and keep any parameters from being
inherited from the parent.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds an rspec test which demonstrates #1560 and a custom 'process'
method for the aliases provider to fix it.
The default processing uses split() to break the line into records on
the separator, which breaks if records can contain the separator. The
custom method I've added uses a 'limited' split() to break the line on
the first separator only.
This commit fixes #1560
Signed-off-by: Paul Lathrop <paul@tertiusfamily.net>
|
| |
| |
| |
| |
| |
| | |
indentation of doc strings must be retained.
Signed-off-by: Thomas Bellman <bellman@nsc.liu.se>
|
| |
| |
| |
| |
| | |
A refactoring of ssh_authorized_key parsed provider was needed and tests
were improved. flush method has been split for clarity.
|
| | |
|