summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Moving Rails initialization to Compiler terminusLuke Kanies2010-02-172-15/+7
| | | | | | | It was previously handled by the Interpreter, but we're planning on getting of that. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Parser now uses Environment resource type collectionLuke Kanies2010-02-171-29/+23
| | | | | | | | | 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>
* Adding 'known_resource_types' to EnvironmentLuke Kanies2010-02-172-14/+54
| | | | | | | 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>
* Renaming LoadedCode to ResourceTypeCollectionLuke Kanies2010-02-172-12/+28
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Storing per-environment LoadedCode instancesLuke Kanies2010-02-171-1/+1
| | | | | | | | | | | | 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>
* Removing old, never-used DSL codeLuke Kanies2010-02-171-275/+0
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding support for parsing ruby filesLuke Kanies2010-02-171-2/+8
| | | | | | | 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>
* Adding []/[]= support to Parser::ResourceLuke Kanies2010-02-171-0/+4
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fix for #3366 - --tags '' treated as boolean 'true'Markus Roberts2010-02-171-2/+5
| | | | | This is the patch from Mike Pountney <Mike.Pountney@gmail.com> off the list with the additional test Luke requested.
* Fix for #3424 and tests to prove it.Markus Roberts2010-02-171-4/+6
| | | | | | | | 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.
* Fix for #2604 Pure Ruby yaml generationMarkus Roberts2010-02-172-0/+343
| | | | | | | | This patch brings in a pure ruby yaml generation library, analagous to what we did with JSON/PSON, but without the renaming dodge we had to do in that case to avoid fighting with Rails. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixes #3113 - When importing a manifest puppet needs to chillMarkus Roberts2010-02-171-2/+4
|
* Fix 2239 (step five): introduce new Puppet::Transaction#stop_processing? ↵Ethan Rowe2010-02-171-0/+7
| | | | 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?.
* Fix 2239 (step four): Refactored Puppet::Daemon's stop/restart methods to ↵Ethan Rowe2010-02-171-7/+5
| | | | 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.
* Fix 2239 (step three): Refactored Puppet::Agent to base starting/restarting ↵Ethan Rowe2010-02-171-45/+15
| | | | behaviors and predicates on new run-status interface of Puppet::Application.
* Fix 2239 (step two): introduce Puppet::Application.controlled_run method to ↵Ethan Rowe2010-02-171-0/+12
| | | | 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.
* Fix 2239 (step one): introduce global settings represeting application run ↵Ethan Rowe2010-02-171-0/+64
| | | | | | | | 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.
* Allow skipped resources to process eventsJesse Wolfe2010-02-171-3/+2
|
* Actually invoke the allow_changes? method in ResourceHarnessJesse Wolfe2010-02-171-0/+2
|
* Generated resources' events are actually bound to the resource thatJesse Wolfe2010-02-171-8/+8
| | | | generated them.
* Since the types stored in resource's @parameters have changed,Jesse Wolfe2010-02-171-0/+4
| | | | we need to also change include? method to be more robust.
* Mark resource/status as failed if they are associated with a failingJesse Wolfe2010-02-171-0/+3
| | | | | | | event. This restores behavior for resource dependencies that was broken in the #2759 series.
* Restore noop non-behavioursJesse Wolfe2010-02-171-2/+4
| | | | | | In the #2759 series, noop was altering the synced timestamp and calling the flush() method on nooped resources. This patch prevents those things from happening.
* Fixing most failing test/ tests.Luke Kanies2010-02-173-7/+10
| | | | | | | | | 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>
* Fixing Configurer interface to transaction reportLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing fingerprint tests to work with new log validationLuke Kanies2010-02-171-1/+4
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing "require" function to use new class interfaceLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing now-obsolete "retrieve" method on package typeLuke Kanies2010-02-171-10/+0
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing feature validation when passed one itemLuke Kanies2010-02-171-0/+1
| | | | | | | | 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>
* Changing method profile for other event queueingLuke Kanies2010-02-171-6/+4
| | | | | | | | 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>
* Refactoring event queueing for performanceLuke Kanies2010-02-171-2/+14
| | | | | | | This does some normalization so we're not doing duplicate queries for large event collections. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing the method profile of EventManager#queue_eventLuke Kanies2010-02-172-20/+20
| | | | | | | 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>
* Moving Metric management to the reportsLuke Kanies2010-02-176-93/+94
| | | | | | | | | | | | 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>
* Removing mention of @changes in TransactionLuke Kanies2010-02-171-48/+2
| | | | | | This is handled in the Status instances now. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing #2759 - reports now have complete change infoLuke Kanies2010-02-173-16/+8
| | | | | | | | 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>
* ResourceHarness now doesn't check params with no 'should'Luke Kanies2010-02-171-4/+6
| | | | | | | | | | | 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>
* Changing Transaction to use the new ResourceHarnessLuke Kanies2010-02-174-186/+114
| | | | | | | | | | | | 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>
* Fixing log message when changes failLuke Kanies2010-02-171-3/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing some compatibility and old testsLuke Kanies2010-02-171-1/+1
| | | | | | | We all know these tests should be removed, but hey, at least these ones pass now. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Renaming some methods in Transaction::ChangeLuke Kanies2010-02-171-16/+1
| | | | | | | | | | | 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>
* Adding Transaction::ResourceHarness classLuke Kanies2010-02-171-0/+62
| | | | | | | | | 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>
* Adding first version of Resource::Status classLuke Kanies2010-02-171-0/+51
| | | | | | | 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>
* Fixing File type indentationLuke Kanies2010-02-171-715/+713
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing last event collection transaction codeLuke Kanies2010-02-171-13/+18
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Solidifying the RAL/Event integration.Luke Kanies2010-02-174-8/+18
| | | | | | | | | | | | | | This has two changes: * Clarifies how we get the property and resource name (we pass the instance, the event converts to a string) * Logs at the resource's loglevel when there's no error These are related, because the event creator (resource) was passing in a string rather than an instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the Change/Event/Property interfaceLuke Kanies2010-02-173-6/+30
| | | | | | | | This gives all logging responsibility to the event, which can now produce logs identical to those produced directly by the property. At this point, the events are entirely supersets of the logs.
* Cleaning up the Log initialization code.Luke Kanies2010-02-171-20/+24
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the RAL interface to loggingLuke Kanies2010-02-174-20/+34
| | | | | | | | | | | Previously, the Log class knew a lot about RAL objects, but now the Logging module is the only one that does. This greatly simplifies the Log class, which is good, and means that whatever complexity does need to exist is directly exposed in the Logging middleware module. Signed-off-by: Luke Kanies <luke@madstop.com>
* Using Logging module in main Puppet moduleLuke Kanies2010-02-171-18/+3
| | | | | | | We've had essentially duplicate methods in this module forever, and this just removes that duplication. Signed-off-by: Luke Kanies <luke@madstop.com>
* Correcting comments and making report timestamp internalLuke Kanies2010-02-172-9/+3
| | | | | | | | | We had some no-longer-correct comments in the Transaction class, which are now removed. This also moves the timestamp for reports into the report class, so it's created at initialization by the report, rather than by the transaction. Signed-off-by: Luke Kanies <luke@madstop.com>