| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Since there isn't any unit test for puppetdoc rdoc code (my fault),
nobody noticed it was using direct access to the parser AST array.
This changeset fixes the way puppetdoc uses the parser results.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
| |
This works around a linux kernel bug that causes a select() on
/proc/mounts to hang.
|
|
|
|
|
|
|
|
|
| |
We basically just make sure that we tell Ruby
about files we've loaded, so you can 'require' these
files and doing so will essentially no-op, rather
than clobbering the already-loaded code.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Requires the pandoc binary to function (http://johnmacfarlane.net/pandoc/).
|
|
|
|
|
|
|
|
| |
This is to fix puppetdoc boolean parameters.
Puppetdoc defers sending parameters to Puppet::Util::Setting, and
in this case, boolean parameters are stored as a boolean value.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It could happend that we were generating doc for subclasses
before classes, in which case we were forgotting some
parent class instance and recreating them.
We ended up generating doc for some classes multiple times, from
which some were missing documentation.
The fix is to sort the parsed classes alphabetically, which auto-
matically puts enclosing class before enclosed classes.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
| |
This provides the class-method behaviour that Ruby's JSON
support expects but that we don't provide.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
|
|
|
|
|
| |
This commit should have no functional effect.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
This allows a more fine-grained load-balancing
of the queue, which makes it easy to spin up
multiple puppetqd instances and process the
queues faster.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
This method name clashed with Puppet::Indirector::Envelope#expired?,
and its name wasn't actually very appropriate.
The new method name is 'dependent_data_expired?'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This is the big win, because it causes us to just
skip the whole loading infrastructure, including
skipping looking through the modulepath.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The cache isn't actually used yet - this just adds
all of the plumbing.
It was found that stat'ing files that didn't exist
could take up to 85% of a run, so this is progress
toward getting rid of those stats.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Removing class methods and such, and switching to
relying solely on a setting for the queue configuration.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
implementation.
Puppet::Util::Queue provides queue client mix-in behaviors that enable easy queue client management for consumer classes. Some relevant behaviors include:
* standard Puppet instance loader behavior for loading queue client modules on-demand based on the client module specified by symbolic name
* singleton registry of known queue client types (based on symbol-to-class mappings from the instance loading behavior)
* simple interface for working with an actual queue client instance
Puppet::Util::Queue::Stomp wraps the Stomp::Client class to provide an initial queue client option supporting the Stomp messaging protocol. This defines the interface for all Puppet queue client plugins going forward.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mix Puppet::Util::CacheAccumulator into an ActiveRecord-like class, and then for any
attribute in that class on which you are likely to call find_or_create_by_*, specify:
accumulates :foo
and instead of :find_or_create_by_foo use :accumulate_by_foo.
The class will cache known results keyed by values of :foo.
Do an initial bulk-lookup: class.accumulate_by_foo('foo1', 'foo2', 'foo3', 'foo4')
|
|
|
|
|
|
|
|
| |
The database was automatically converting booleans
to strings, and value comparison was not working correctly
as a result.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This moves all code from the Parser class into
the ActiveRecord classes, and gets rid of
'ar_hash_merge'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
We were previously missing some hooks for settings set
via the command-line, because different code paths were
being used.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/ralsh
lib/puppet/executables/client/certhandler.rb
lib/puppet/parser/functions/versioncmp.rb
lib/puppet/parser/resource/reference.rb
lib/puppet/provider/augeas/augeas.rb
lib/puppet/provider/nameservice/directoryservice.rb
lib/puppet/provider/ssh_authorized_key/parsed.rb
lib/puppet/type.rb
lib/puppet/type/file/checksum.rb
spec/integration/defaults.rb
spec/integration/transaction/report.rb
spec/unit/executables/client/certhandler.rb
spec/unit/indirector/ssl_rsa/file.rb
spec/unit/node/catalog.rb
spec/unit/provider/augeas/augeas.rb
spec/unit/rails.rb
spec/unit/type/ssh_authorized_key.rb
spec/unit/type/tidy.rb
test/executables/filebucket.rb
test/executables/puppetbin.rb
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
semicolons
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This means, at the least, that we can now serve files
via REST when they have spaces and other weird characters
in their names.
This involves a small change to many files.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The goal of this refactor was to use a cached attribute
for the LoadedFile instance we use to monitor whether
the file needs reparsing. We were getting tests that
affected later tests because they were holding on to
LoadedFile stubs, somehow.
The other main change here is that the Settings#parse
method now knows how to look up its own file path.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|\|
| |
| |
| |
| | |
Conflicts:
test/ral/manager/type.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I was getting failing tests because I was using non-files
for testing and they didn't back up the same, not
surprisingly.
This moves the 'backup' method to the :flat filetype
and then only backs up if the filetype supports it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/indirector/facts/facter.rb
lib/puppet/provider/augeas/augeas.rb
lib/puppet/util/filetype.rb
spec/unit/indirector/facts/facter.rb
spec/unit/provider/augeas/augeas.rb
test/util/filetype.rb
|
| |
| |
| |
| |
| |
| |
| |
| | |
This moves responsibility for backups from the filetype
to the consumer of the filetype, but only ParsedFile actually uses
filetypes.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ruby's exception hierarchy is a bit strange, in that only
exceptions that sub RuntimeError are caught by default.
This patch explicitly catches the base class, Exception,
which means that LoadError, SyntaxError, and any
RuntimeErrors will all be caught.
This is done for both load() and loadall(); load() uses
Kernel.load, but loadall() uses Kernel.require.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
CHANGELOG
spec/unit/type/file/selinux.rb
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
*only* if you use the default configuration file locations.
In the end, this was a relatively minor change; most of the actual
diff centers around making the code more readable so I could think
my way into the fix, and adding tests for cases that were either
untested or refactored slightly.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.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>
|