| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch re-implements the status() remote procedure as a REST interface.
A running server returns key-value pairs, currently the only implemented
key is "is_alive" which will always be set to true.
Some future tool will consume this by:
Puppet::Status.indirection.terminus_class = :rest
Puppet::Status.find('https://puppet:8140/production/status/default')
Now with unit tests.
plus fixes a typo.
plus integration test and default security setting.
plus tests suggested by Brice.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is that case/selectors are downcasing the value before it
is compared to the options.
Unfortunately regex are matching in a case sensitive way, which would
make the following manifest fail:
$var = "CaseSensitive"
case $var {
/CaseSensitive/: {
notice("worked")
}
default: {
fail "miserably"
}
}
This patch fixes the issue by making sure the regexp match is done
one the original (not downcased) value, but still doing a case
sensitive match.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
This fixes most of #1943, except the checksum indirection
still uses this.
This basically always chooses the most recent file when
finding files, and saves the file with the default format.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This is toward fixing #1943 - we need the ability
to easily convert between file extensions and file
formats.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Basically, these classes (ResourceType and ResourceTypeCollection)
don't really belong in Parser, so I'm moving them to the
Resource namespace. This will be where anything RAL-related goes
from now on, and as we migrate functionality out of Puppet::Type,
it should go here.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
It's no longer necessary, given the new ResourceTypeCollection
class.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
| |
We now use references to the ResourceTypeCollection
instances through the environment, which is much cleaner.
The next step is to remove the Interpreter class.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
We previously passed a hash of options but now just
the environment.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
| |
We previously defined the method statically.
This also renames the method to match how the environment
thinks of them - known resource types, rather than resource
type collection.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This is so everyone doesn't have to define the same method
everywhere.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
It was previously handled by the Interpreter,
but we're planning on getting of that.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
| |
This is the last step enabling us to make it so no one
needs to maintain these references to the parser. Instead,
everyone will just get access to the type collection from
the Environment.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
Each environment now has its own known collection of resource
types, and it is responsible for caching as necessary.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will soon replace all of the env/parser mungling
we have to do. A given process will only be able to
have one collection of code per environment in memory.
This is somewhat limiting, in theory, but some global means
of looking up code collection (LoadedCode instances) must
exist for the pure ruby stuff to work.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This doesn't work without the later commits - it just relies
on Ruby to read in Ruby files.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
| |
This is the patch from Mike Pountney <Mike.Pountney@gmail.com> off
the list with the additional test Luke requested.
|
|
|
|
|
|
|
|
| |
The original pure ruby yaml patch missed some edge cases; specifically, classes
that were modified by the syck version to directly call it and thus never
reached the pure ruby version. This adds monkey patches to all of those case
which we might reasonably care about (omitting, for example, calls within the
syck version to itself) and tests which show that the monkey patch works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jesse writes:
ethanrowe:tickets/master/2239 leaks state in the spec. After the spec
is run, Puppet::Application is left in a :restart_requested state, and
several important behaviors, particularly Puppet::Transaction#evaluate
are disabled.
It's order dependent, so changing the mtime of spec files makes the
failures appear and disappear.
This spec file was generally pretty good about keeping state from
getting out, but one test was missing a stub for a dangerous call.
I wouldn't be surprised if this cleared up other errors in testing.
|
|
|
|
| |
flag and associated check thereof within the resource evaluation code. This should allow for the transaction to bail out of its processing if it finds that a stop has been requested, based on the state of Puppet::Application.stop_requested?.
|
|
|
|
| |
set status flags appropriately in Puppet::Application, and removed call to now-deprecated @agent.configure_delayed_restart. This should get the restart and stop behavior for daemons and their agents working nicely with the new global process status interface of Puppet::Application.
|
|
|
|
| |
behaviors and predicates on new run-status interface of Puppet::Application.
|
|
|
|
| |
provide simple status-restricted execution of a passed in block; this can replace the process status checks and properly handle delayed restart behavior for Puppet::Agent.
|
|
|
|
|
|
|
|
| |
state with methods for
setting the state and appropriately-named predicates for querying state, all in the Puppet::Application
class itself. To be used by Puppet::Daemon and Puppet::Agent and Puppet::Transaction for better response
to TERM, INT, HUP.
|
|
|
|
| |
generated them.
|
|
|
|
|
|
|
| |
event.
This restores behavior for resource dependencies that was broken
in the #2759 series.
|
|
|
|
| |
Puppet is now main, and the variable got renamed to reflect that.
|
|
|
|
|
|
|
|
|
| |
This is mostly just adjusting existing tests to
meet new APIs, but it's a small amount of fixing the
code to meet new standards and an even smaller amount
of porting code over.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
| |
When I changed how the validation errors worked
I accidentally caused the feature list to need
to be an array rather than supporting either.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
| |
It wasn't clear in the first refactor if this was
necessary, but doing the performance optimization
made it clear it was.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
It now takes multiple events instead of just one. This will
help simplify a bunch of performance optimizations.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is one less bit that the transaction does.
The resource status objects had nearly enough information
to do everything, so I just added that last bit, and moved
everything over. It's all much cleaner now.
I had to change some existing, internal APIs, but mostly
this should be hidden from outside users.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
| |
This is handled in the Status instances now.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
| |
This includes every event generated in the transaction
and a Resource::Status object for each resource managed,
with per-resource information in it.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
I hadn't been skipping parameters that didn't have a
'should' value set. This almost always resulted
in the right behaviour, because most properties
correctly just short-circuit to being in sync
if the 'should' value is nil, but this encodes it
at the harness, which is where it should be.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a much messier commit than I would like,
mostly because of how 'file' works. I had to
fix multiple special cases, and I had to move others.
The whole system appears to now work, though, and we're
ready to change reports to receive resource status
instances rather than events.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Renaming 'go' to 'apply', which is a much more
reasonable name.
Also removing the 'backward' and 'forward' methods,
since they're not actually used anywhere. (Well,
'forward' was used, but it just called 'go'.)
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
| |
This is the interface class between Transactions and
Resources. It's a relatively ugly class, but it
will hopefully allow us to move most/all of the messy
interface code into this one, relatively small class.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This is the class that will be returned in reports,
and they'll contain the events being created.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|