summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
...
* Adding modulepath caching to the AutoloaderLuke Kanies2009-05-201-17/+22
| | | | | | | | | 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>
* Adding caching to the Environment classLuke Kanies2009-05-201-2/+18
| | | | | | | | | | | Caching the module path (because we check which directories exist, and this method can get called often), and the complete list of modules. The cache ttl uses the filetimeout, which defaults to 15 seconds. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding TTL support to attribute cachingLuke Kanies2009-05-201-4/+34
| | | | | | | | | 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>
* Fixed #2666 - Broken docstring formattingJames Turnbull2009-05-204-9/+19
|
* Deprecating factsync - pluginsync should be used insteadLuke Kanies2009-05-201-0/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Protecting Stomp client against internal failuresLuke Kanies2009-05-181-1/+5
| | | | | | | | 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>
* Adding some usability bits to puppetqdLuke Kanies2009-05-181-3/+21
| | | | | | | There's better logging, and it's a bit more exception-friendly. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the stomp client and tests a bitLuke Kanies2009-05-181-2/+12
| | | | | | | | | | | | | 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>
* Relying on threads rather than sleeping for puppetqdLuke Kanies2009-05-181-5/+1
| | | | | | | | We previously manually slept, but this uses the queue client to handle keeping the process running, by just joining all running threads. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2250 - Missing templates throw a helpful errorLuke Kanies2009-05-182-10/+7
| | | | | | | | | | | This changes the behaviour of template searching a bit - we previously usually returned a file name, whether the template existed or not. Now we only return a path if it exists. Refactoring a few of the the tests for TemplateWrapper, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2273 - CA location is set correctly in puppetcaLuke Kanies2009-05-171-1/+1
| | | | | | It's set to 'only' instead of 'local'. Signed-off-by: Luke Kanies <luke@madstop.com>
* RackXMLRPC: buffer request contents in memory, as a real string.Christian Hofstaedtler2009-05-151-1/+1
| | | | Fixes #2268 "Rack::RewindableInput is not a valid input stream."
* Modules now can find their own pathsLuke Kanies2009-05-155-40/+80
| | | | | | | | | | | | Previously, when you created a module you had to specify the path. Now Module instances can use the module path to look up their paths, and there are methods for determining whether the module is present (if the path is present). Also cleaned up the methods for figuring out what's in the module (plugins, etc.). Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving file-searching code out of Puppet::ModuleLuke Kanies2009-05-154-91/+100
| | | | | | | | | | The Module class had a bunch of code for finding manifests and templates even when not in a module, and it complicated the class unnecessarily. This moves that code to a new, hackish-but-sufficient module for just that purpose. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2221 - pluginsignore should work againLuke Kanies2009-05-151-1/+1
| | | | | | | | We weren't splitting on whitespace, which is necessary since the settings don't support arrays but files expect them. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix bug #2124 - ssh_authorized_key always changes target if target is not ↵Francois Deppierraz2009-05-151-0/+4
| | | | defined
* Fixing #2265 - rack is loaded with features rather than manuallyLuke Kanies2009-05-141-1/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Added .git to pluginsignore default list of ignoresJames Turnbull2009-05-091-1/+1
|
* Fix #1409 once again, including testFrancois Deppierraz2009-05-061-6/+14
| | | | | | | "user doesn't exit" error appeared once again after the changes which were applied in order to fix #2004. Validation must only check attributes presence, not their value.
* Added split functionJames Turnbull2009-05-061-0/+11
|
* Fixing #2200 - puppetqd expects Daemon to be a classLuke Kanies2009-05-041-10/+12
| | | | | | | | | | | I *swear* I wrote tests for the daemon, but I can't find them in any of my branches so I rewrote them. In the course of writing them, I also fixed the usage of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2195 - the Server class handles bindaddressLuke Kanies2009-05-031-2/+10
| | | | | | | The Server class has all of the logic now, instead of doing weird things in the defaults. Signed-off-by: Luke Kanies <luke@madstop.com>
* Minor fixes to function RST documentationJames Turnbull2009-05-031-2/+4
|
* Remove the old 0.24.x rack support, which is now useless cruftChristian Hofstaedtler2009-05-021-148/+0
|
* puppetmasterd can now run as a standard Rack application (config.ru-style)Christian Hofstaedtler2009-05-021-5/+17
|
* Add XMLRPC compatibility for RackChristian Hofstaedtler2009-05-022-1/+83
|
* Puppet as a Rack applicationChristian Hofstaedtler2009-05-024-0/+138
| | | | | | | This lays the ground: a wrapper for the REST handler, and an application confirming to the Rack standard. Also includes a base class for Rack handlers, as RackREST will not stay the only one, and there needs to be a central place where client authentication data can be checked.
* Use FileCollection to store the pathname part of filesBrice Figureau2009-05-021-0/+12
| | | | | | | | | | | | | Using the FileCollection to store the path parts allows to represent a common path prefix by an integer. This way the memory used to manage deep hierarchies is reduced. The reduction factor depends on the number of managed files per directories: the more files in a directory, the more they will share the same common prefix, and the better we'll gain. Early tests on a 5 level deep hierarchy containing 100 files per level show about a 50% less memory consumption. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add an unmunge capability to type parameters and propertiesBrice Figureau2009-05-022-3/+17
| | | | | | | | | | | | | Unmunge is the reverse of munge. While munge allows the type to return a different parameter value or properties should than the one it was created with, unmunge does the reverse. It can be used for instance to store a value in a different representation but still be able to return genuine value to the outside world. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2218 - Ruby YAML bug prevents reloading catalog in puppetdBrice Figureau2009-05-023-30/+15
| | | | | | | | | | | | | | | | | | | Because of ruby bug: http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886 and http://redmine.ruby-lang.org/issues/show/1331 YAML dump of hashes using ruby objects as keys is incorrect leading to an error when deserializing the YAML in puppetd. The error is easy to correct by a post-process fix-up of the generated YAML, which transforms: &id004 !ruby/object:Puppet::Relationship ? to the correct: ? &id004 !ruby/object:Puppet::Relationship Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixes #2209 - Spec is failing due to a missing requireStéphan Gorget2009-05-021-0/+1
|
* Fix #2207 - type was doing its own tag management leading to subtile bugsBrice Figureau2009-04-291-34/+4
| | | | | | | | | This patch moves Type to use Puppet::Util::Tagging as the other part of Puppet. This brings uniformity and consistency in the way the tags are used and/or compared to each other. Type was storing tags in Symbol format, which produced #2207. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed #2188 - Added set require to simple_graph.rbJames Turnbull2009-04-271-0/+1
|
* Fixed puppetqd require and tweaked stomp library error messageJames Turnbull2009-04-261-5/+5
|
* Fixing #2183 - checksum buffer size is now 4096bLuke Kanies2009-04-241-1/+2
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2187 - Puppet::Resource is expected by Rails supportLuke Kanies2009-04-243-14/+13
| | | | | | | | | | | | | We previously used and expected Puppet::Parser::Resource instances, but 0.25 converts them all to Puppet::Resource instances before they're passed out of the compiler, so the Rails integration had to be changed to expect that. There's still some muddling, because the rails resources only generate parser resources, but that works for now because that's what we expect when collecting resources. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding an 'Exported' attribute to Puppet::ResourceLuke Kanies2009-04-241-1/+5
| | | | | | This is required for Rails support. Signed-off-by: Luke Kanies <luke@madstop.com>
* Making sure the cert name is searched firstLuke Kanies2009-04-241-6/+14
| | | | | | | | | | | The cert name should be searched first in default circumstances, even if it disagrees with the hostname. Brice's change to the way catalogs are searched for didn't quite work when the hostname and certname didn't agree *and* the certname was fully qualified. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing an "inspect" method that often failed in testingLuke Kanies2009-04-241-4/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing deprecated concurrency setting usage in railsLuke Kanies2009-04-241-1/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Always making sure graph edges appear firstLuke Kanies2009-04-241-1/+11
| | | | | | | If we don't do this, there's a chance we'll get hit by the ruby yaml bug again. Signed-off-by: Luke Kanies <luke@madstop.com>
* Reverting part of the switch to sets in SimpleGraphLuke Kanies2009-04-241-3/+3
| | | | | | | | | Unfortunately, again because of a Ruby bug (http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886) Ruby can't print yaml that it can read, if custom classes are used as keys in hashes, which Sets use internally. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing rails feature testLuke Kanies2009-04-242-6/+8
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Failing to enable storeconfigs if ActiveRecord isn't availableLuke Kanies2009-04-251-0/+1
| | | | | | This is the last step to fixing #2189. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the Rails feature test to require 2.3.xLuke Kanies2009-04-251-17/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Modifying the Settings#handlearg prototypeLuke Kanies2009-04-251-2/+2
| | | | | | | | 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>
* Fixes #2172 - service provider for gentoo fails with ambiguous suffixesJames Turnbull2009-04-241-1/+1
|
* SMF import support working and documentation updateBryan Allen2009-04-241-0/+20
|
* Fixes #2145 and #2146Bryan Allen2009-04-242-37/+60
| | | | | Adds manifest param for service type, defines a command or manifest to set up a service Add service setup (import) support
* Fix configurer to retrieve catalog with client certnameBrice Figureau2009-04-231-1/+1
| | | | | | | | | | | | | | | | | Rationale: Before this change, the catalog was retrived with this uri: /catalog/hostname On the server side, the corresponding node was found by using the request node, then finding if this node also match hostname (which it does of course). But it is not possible to have an ACL matching the hostname part of the uri, because it: * it would be compared to the node name (certname), which obviously is not the same * it is not possible to create a dynamic allow/deny rule on a non-fqdn Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>