| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We don't have json support for node output yet.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
I renamed it to 'info', too.
It only showed indirector-related info, so this
makes sense.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
I had broken some usages of plugins by incorrectly
selecting command-line arguments. The fix was
to remove the #main method contained in the
IndirectionBase subclass.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This allows all of the actions to react to the CLI
options.
I've also removed the unnecessary 'name' variables I
was using in various places - they were just the first
of the arguments, and they weren't actually always
names.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This is mostly in response to feature requests from
Dan.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Also added a test to hopefully confirm it won't
break again.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We now have an indirection_base class along
with interface_base.
I've also added some basic tests for most
of the interfaces.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
They were previously classes, which made a lot of things stupider
than they needed to be.
This will likely involve some porting, but not much.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
It got broke when the Indirector base class was extracted.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We should exit cleanly rather than throw traces.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The initial work assumed that all interfaces were just
skins on an indirected data type, but some interfaces will
be more abstract than that.
This commit removes that assumption by extracting all of
the indirector work into a new Indirector subclass of
Interface and then makes all of the new interfaces a subclass
of that rather than of Interface itself.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Previously the app, indirection, and interface names
had to match exactly; now they can be arbitrary by
just defining an overriding 'indirection_name' class
method on the interface.
I also renamed the file_bucket_file classes accordingly.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This isn't 100% - it will probably only work for Yaml and
JSON - but it's a good start.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This allows easier use of the Interfaces in ruby.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The whole system seems to work again, as long as
you run it against 2.6.next.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Puppet's autoloader has an incompatibility with ruby's native 'require'
statement that makes it possible to reach the same code multiple times,
which can cause genclass to create multiple classes with the same name.
This patch fixes the uses of some puppet types so that they are loaded
using the autoloader instead of using 'require'.
Paired-With: Jacob Helwig <jacob@puppetlabs.com>
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| / / / / / / /
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* 2.6.x:
(maint) Indentation fixes
(#6490) Add plugin initialization callback system to core
Fix #4339 - Locally save the last report to $lastrunreport
Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml
Fixed #3127 - removed legacy debug code
Fixed #3127 - Fixed gem selection regex
(#5437) Invalidate cached TypeCollection when there was an error parsing
(#6937) Adjust formatting of recurse's desc
(#6937) Document the recurse parameter of File type.
(#6893) Document the cron type in the case of specials.
(#5670) Don't trigger refresh from a failed resource
Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
Conflicts (Manually resolved):
lib/puppet/application/agent.rb
lib/puppet/application/apply.rb
lib/puppet/configurer.rb
lib/puppet/resource/type_collection.rb
lib/puppet/type/file.rb
spec/integration/configurer_spec.rb
spec/unit/application/agent_spec.rb
spec/unit/application/apply_spec.rb
spec/unit/configurer_spec.rb
spec/unit/indirector/report/yaml_spec.rb
spec/unit/resource/type_collection_spec.rb
Paired-with: Nick Lewis
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* 2.6.next:
Fix #4339 - Locally save the last report to $lastrunreport
Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml
Fixed #3127 - removed legacy debug code
Fixed #3127 - Fixed gem selection regex
(#5437) Invalidate cached TypeCollection when there was an error parsing
(#6937) Adjust formatting of recurse's desc
(#6937) Document the recurse parameter of File type.
(#6893) Document the cron type in the case of specials.
(#5670) Don't trigger refresh from a failed resource
Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
|
| | |\ \ \ \ \ \ \ |
|
| | | | |_|_|_|_|/
| | | |/| | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add in a better desc block for "specials" in cron provider, and outline
it's limitations.
The previous text was purely a placeholder.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Using the cache terminus system, when --report is on, we are now
caching the last report as a yaml file in the $lastrunreport file
(which by default is $statedir/last_run_report.yaml).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Once a configuration run is done, puppetd will save on the node a
yaml summary report roughly akin to:
---
time:
notify: 0.001025
last_run: 1289561427
schedule: 0.00071
config_retrieval: 0.039518
filebucket: 0.000126
resources:
changed: 1
total: 8
out_of_sync: 1
events:
total: 1
success: 1
changes:
total: 1
This is almost an hash version of the current --summarize output, with
the notable exception that the time section includes the last run unix
timestamp.
The whole idea is to be able to monitor locally if a puppetd does its job.
For instance this could be used in a nagios check or to send an SNMP trap.
The last_run information might help detect staleness, and this summary
can also be used for performance monitoring (ie time section).
The resource section can also show the number of failed resources.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* tickets/2.6.x/3127:
Fixed #3127 - removed legacy debug code
|
| | | | | | | | | | |
|
| | |\| | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* tickets/2.6.x/3127:
Fixed #3127 - Fixed gem selection regex
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Previously if the gem json_pure was installed and you requested the
gem json then the regex matched too soon and falshly indicated that
the json gem was already installed.
Also updated to add the --no-ri and no-rdoc options and fix tests.
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
* ticket/2.6.x/5437-report-manifest-errors-on-agent:
(#5437) Invalidate cached TypeCollection when there was an error parsing
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The caching of the TypeCollection in Puppet::Node::Environment would cause
parse errors to occur (and be reported) only once and never again, until
the file had changed on disk. This would also cause empty catalogs to be
sent down to the agents further hiding the problem.
Now, when a file fails to parse, it will be re-parsed every time on every
following compilation, causing the parse error to be reported every time,
and preventing sending down empty catalogs to agents.
Paired-with: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Prevous formatting would result in broken Markdown after the docs were generated,
as Markdown does not recognize a two-space tab as a syntactical element.
This patch also changes the list of values to a bulleted list instead of a code block.
|
| | |/ / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Update the desc block with information gleaned from #1469 and the code
about recurse => remote and other types of recursion.
The auto generated documentation was sparse and this is an area that often
comes up on the mailing list/IRC.
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Resources were triggering their subscribing/notified resources when they
failed, which is incorrect. Now, events are only queued if the resource was
successful.
Paired-With: Max Martin
|
| | | | | | | | | |
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The recurring pattern "drop-in code needs to have something done at startup"
is presently being solved with a variety of ad-hock mechanism. This commit
adds a general, extensible, centralized system for adding such hooks and
manages an extensible set of metadata about plugins which it collects by
searching for files named "plugin_init.rb" in a series of directories.
Initially, these are simply the $LOAD_PATH. Applications can add more places
to look for plugins without risk of adding duplicates or changing the order of
ones that have already been found with:
Puppet::Plugins.look_in(*paths)
The contents of each file found is executed in the context of a Puppet::Plugins
object (and thus scoped). An example file might contain:
-------------------------------------------------------
@name = "Greet the CA"
@description = %q{
This plugin causes a friendly greeting to print out on a master
that is operating as the CA, after it has been set up but before
it does anything.
}
def after_application_setup(options)
if options[:application_object].is_a?(Puppet::Application::Master) && Puppet::SSL::CertificateAuthority.ca?
puts "Hey, this is the CA! Hi everyone!!!"
end
end
-------------------------------------------------------
Note that the instance variables are local to this Puppet::Plugin (and so may be
used for maintaining state, etc.) but the plugin system does not provide any
thread safety assurances, so they may not be adequate for some complex use cases.
Presently supported hooks:
before_application_preinit( :application_object => ... )
after_application_preinit( :application_object => ... )
before_application_parse_options( :application_object => ... )
after_application_parse_options( :application_object => ... )
before_application_setup( :application_object => ... )
after_application_setup( :application_object => ... )
before_application_run_command( :application_object => ... )
after_application_run_command( :application_object => ... )
on_commandline_initialization(:command_line_object => ... )
on_application_initialization(:appliation_object => ... )
Paired-with: Daniel Pitman
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit removes the last remaining use of topsort (in SimpleGraph#splice!) by
fixing #5200 in a way that is compatible with graph fontiers. Instead of replacing
containers with many-to-many relationships, we now replace them with a pair of
sentinals (whits) that bracket them.
Thus a graph consisting of two containers, each containing ten resources, and a
dependency between the containers, which would have gone from 21 edges to 100
edges will instead have only 43, and a graph consisting of two containers (e.g.
stages) each containing a similar graph, which would have gone from 45 edges to
400 will only go to 95.
This change had minor consequences on many parts of the system and required lots
of small changes for consistancy, but the core of it is in Catelog#splice! (which
replaces SimpleGraph#splice!) and Transaction#eval_generate. Everything else is
just adjustments to the fact that some one-step edges are now two-step edges and
tests, event propagation, etc. need to reflect that.
Paired-with: Jesse Wolfe
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The preceeding changes left some rough edges in the Transactions (a short,
badly named method that was only used in one place and would be clearer in-
line, a return value that was carfully retained and never used, etc.) This
commit clears some of that up.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is the core change of the ticket; rather than using a topological sort to statically
determine the order in which resources should be applied, we use the graph wrapper
introduced in the prior commit to dynamically determine the order in which to apply
resources based on 1) the status of the resource (ready, done) 2) the explicit &
implied dependencies, 3) the salted SHA1 of the title (for stability).
Further work is needed:
1) Resolving the handling of failed resources
2) Tests of the new behavior, to the extent posible
3) Newly-dead-code removal in simple_graph & transaction
4) Fix the name-prefix ordering hack in eval_generate by either:
a) Moving the logic into file
b) Refactoring Type#eval_generate to return a tree
c) ....?
5) Rough performace testing to look for hotspots
6) Investigation of possible interaction with #3788, #5351, #5414, #5876, #6020, #6810,
and #6944 which may simplify or complicate their resolution.
Paired-with: Jesse Wolfe
|