summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Adding Application options to InterfacesLuke Kanies2011-02-231-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Adding render and exit_code override supportLuke Kanies2011-02-221-1/+28
| | | | | | | | | | | | | | | | | | | | | This is mostly in response to feature requests from Dan. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| * | Fixing 'puppet interface list'Luke Kanies2011-02-222-1/+11
| | | | | | | | | | | | | | | | | | | | | Also added a test to hopefully confirm it won't break again. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| * | Adding a simple "config" appLuke Kanies2011-02-222-0/+37
| | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| * | Splitting the Application base classLuke Kanies2011-02-2213-2/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Adding a string form to interfacesLuke Kanies2011-02-221-0/+4
| | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| * | Switching Interfaces to be instancesLuke Kanies2011-02-2210-0/+490
| / | | | | | | | | | | | | | | | | 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>
* | Merge branch '2.6.x' into nextMax Martin2011-04-074-46/+75
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Fix #4339 - Locally save the last report to $lastrunreportBrice Figureau2011-04-053-0/+51
| | | | | | | | | | | | | | | | 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>
| * Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2011-04-053-7/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'tickets/2.6.x/3127' into 2.6.nextJames Turnbull2011-04-041-1/+11
| |\ | | | | | | | | | | | | * tickets/2.6.x/3127: Fixed #3127 - Fixed gem selection regex
| | * Fixed #3127 - Fixed gem selection regexJames Turnbull2011-04-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | (#5437) Invalidate cached TypeCollection when there was an error parsingJacob Helwig2011-04-012-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | (#5670) Don't trigger refresh from a failed resourceNick Lewis2011-03-301-27/+34
| |/ | | | | | | | | | | | | | | 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
* | Merge branch 'feature/next/resource_application_order' into nextMarkus Roberts2011-04-067-114/+143
|\ \
| * | (5200) -- replace containers with sentinalsMarkus Roberts2011-04-065-84/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | (6911) Cleanup and renaming of transaction internalsMarkus Roberts2011-04-011-13/+3
| | | | | | | | | | | | | | | | | | | | | 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.
| * | (6911) Core change -- replace topsort with frontier ordered by salted SHA1Markus Roberts2011-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | (6911) Cleanup of generate_additional_resourcesMarkus Roberts2011-03-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The previous commit left only one meaningful value for the method parameter of generate_additional_resources, making it a constant not a parameter. This commit removes it. Paired-with: Jesse Wolfe
| * | (6911) Refactor to localize eval_generate dependency assumptionsMarkus Roberts2011-03-314-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | To implement #6911 we will need to be able to make incremental descisions about order of application based only on the contents of the resource graph and local "working data." This commit begins to pull the needed structure into a method (visit_resources) while, for the moment, maintaining the original semantic. Paired-with: Jesse Wolfe
* | | Merge branch 'feature/master/5528-certificates_signing_api' into nextMax Martin2011-04-053-54/+341
|\ \ \ | |/ / |/| | | | | | | | * feature/master/5528-certificates_signing_api: (#5528) Add REST API for signing, revoking, retrieving, cleaning certs
| * | (#5528) Add REST API for signing, revoking, retrieving, cleaning certsMax Martin2011-04-053-54/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new Indirector terminus, certificate_status, which allows for signing, revoking, listing, and cleaning SSL certificates over HTTP via REST. Documentation for these new features can be found in our REST API documentation on the docs site: http://docs.puppetlabs.com/guides/rest_api.html This documentation has not been updated as of the writing of this commit, but will be very soon. Puppet::SSL::Host is now fully integrated into the Indirector. Paired-with:Matt Robinson, Jacob Helwig, Jesse Wolfe, Richard Crowley, Luke Kanies
* | | Merge branch '2.6.x' into nextMax Martin2011-03-302-4/+16
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * 2.6.x: (#5908) Add support for new update-rc.d disable API (#6862) Add a default subject for the mail_patches rake task Fixed #6256 - Creation of rrd directory.
| * | (#5908) Add support for new update-rc.d disable APIMax Martin2011-03-301-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for the new disable API to update-rc.d and added spec tests to check this functionality. This change was made because in versions of sysv-rc >= 2.88, 'update-rc.d stop' is broken and actually enables the service. We only changed the disable case as the enable case still works on systems which use sysv-rc 2.88 or greater (atm, only Debian Lenny). We wanted to change as little as possible because update-rc.d prints a message stating that the new enable/disable API is unstable and may change in the future. Paired-with:Matt Robinson, Jacob Helwig
| * | Merge branch 'tickets/2.6.x/6256' into 2.6.nextJames Turnbull2011-03-261-2/+2
| |\ \ | | | | | | | | | | | | | | | | * tickets/2.6.x/6256: Fixed #6256 - Creation of rrd directory.
| | * | Fixed #6256 - Creation of rrd directory.James Turnbull2011-03-261-2/+2
| | | | | | | | | | | | | | | | Added :metrics to the settings used by the master
| * | | Merge branch 'ticket/2.6.next/5477' into 2.6.nextJesse Wolfe2011-03-254-18/+35
| |\ \ \
| | * | | (#5477) Allow watch_file to watch non-existent files, especially site.ppJesse Wolfe2011-03-254-18/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Backported this change to 2.6.x Paired-With: Jacob Helwig <jacob@puppetlabs.com>
* | | | | Merge branch 'tickets/master/6494' of https://github.com/domcleal/puppet ↵Jesse Wolfe2011-03-291-0/+54
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into next
| * | | | | (#6494) Add setm command to Augeas providerDominic Cleal2011-02-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Augeas setm command can set the value of multiple nodes in a single operation. Takes a base path, then a subnode path expression (relative to the base) and then the value itself.
| * | | | | (#6494) Add mv command to Augeas providerDominic Cleal2011-02-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves the first node to the position of the second, deleting it and its children if it already exists.
| * | | | | (#6494) Add defnode command to Augeas providerDominic Cleal2011-02-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses Augeas' defnode command which creates a variable pointing to a node, creating it with 'set' if it doesn't already exist.
| * | | | | (#6494) Add defvar command to Augeas providerDominic Cleal2011-02-251-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses Augeas' native defvar command to define variables for certain expressions that can then be referenced later with $variable.
* | | | | | Merge branch 'tickets/master/6324' of https://github.com/domcleal/puppet ↵Jesse Wolfe2011-03-291-0/+137
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into next
| * | | | | | Fix non-existent method called in SMF manifest import exception message, ↵Dominic Cleal2011-02-191-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | updated spec
| * | | | | | (#6324) Use real service resource object instead of a stubDominic Cleal2011-02-191-10/+3
| | | | | | |
| * | | | | | (#6324) Add spec for SMF service providerDominic Cleal2011-02-181-0/+133
| |/ / / / /
* | | | | | Merge branch 'feature/master/6144' of https://github.com/ghoneycutt/puppet ↵Jesse Wolfe2011-03-291-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | into next
* | | | | | Merge branch 'feature/2.6.next/5909' of https://github.com/bodepd/puppet ↵Jesse Wolfe2011-03-291-0/+135
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into next
| * | | | | | (5909) Function to dyncamically generate resources.Dan Bode2011-03-161-0/+135
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function allows you to dynamically generate resources, passing them as a hash to the create_resources function. This was originally written to be used together with an ENC. Resources can be programitally generated as yaml and passed to a class. classes: webserver::instances: instances: instance1: foo: bar instance2: foo: blah Then puppet code can consume the hash parameters and convert then into resources class webserver::instances ( $instances = {} ) { create_resources('webserver::instance', $instances) } Now I can dynamically determine how webserver instances are deployed to nodes by updating the YAML files.
* | | | | | (#6830) Fix tests that depended on special inherited behaviorMatt Robinson2011-03-2913-63/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class Foo def self.inherited(subclass) puts "#{subclass.inspect} inherited from #{self}" end end class Bar < Foo end a = Class.new(Bar) do def self.to_s "some other class" end end In Ruby 1.9 this prints Bar inherited from Foo #<Class:0x0000010086c198> inherited from Bar In Ruby 1.8 the to_s override used to be in effect so printed: Bar inherited from Foo some other class inherited from Bar Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
* | | | | | (#6830) Fix overly stubbed testsMatt Robinson2011-03-291-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 1.9 calling .each on a stub calls to_a, and if you're not stubbing to_a you get: unexpected invocation: #<Mock:option1>.to_a() Could have stubbed to_a also, but less stubbing is better in these cases Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
* | | | | | (#6830) Fix badly stubbed Time object in testMatt Robinson2011-03-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.9 won't allow to_i to be called on a symbol. It results in the error: undefined method `to_i' for :now:Symbol Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
* | | | | | Merge branch 'ticket/next/5477' into nextJesse Wolfe2011-03-254-19/+36
|\ \ \ \ \ \
| * | | | | | (#5477) Allow watch_file to watch non-existent files, especially site.ppJesse Wolfe2011-03-254-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Paired-With: Max Martin <max@puppetlabs.com> Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | Merge commit '2.6.next^1' into nextJesse Wolfe2011-03-252-2/+22
|\ \ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | These changes were superseded by existing commits in next: lib/puppet/parser/compiler.rb spec/unit/parser/compiler_spec.rb
| * | | | | | Merge branch 'ticket/2.6.next/5221' into 2.6.nextNick Lewis2011-03-241-0/+8
| |\ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | |
| | * | | | | (#5221) Add test for fix to fileset with trailing separatorNick Lewis2011-03-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Pieter van de Bruggen
| * | | | | | Merge branch 'feature/2.6.next/4576' of https://github.com/bodepd/puppet ↵Jesse Wolfe2011-03-241-2/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into 2.6.next
| | * | | | | | (4576) - if ENC declares invalid class, it is logged at warning.Dan Bode2011-03-161-2/+1
| | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | used to be at info, so you had to run the master on verbose to see it an ENC was trying to declare a class that could not be loaded.