summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix for #2600 (wrong number of arguments under older mongrel)Markus Roberts2009-09-153-15/+13
|/ | | | | | | | | | | | | | | | | | This was an API compatibility problem with mongrel's HTTPResponse.start() method between Mongrel 1.0.x and 1.1.x (the number of parameters changed). The older version does not provide the option to set the response header message which was used (redundantly with the response body) to return the error message when the HTTP response was signaling an error. In order to suport the older version the call was wrapped with a fallback and the coresponding code in the other rest implementations was adjusted to always send the error message in the response body. Then the rest terminus was adjusted to pull the message from the response body (if it is present) rather than from the header (which is only used as a fallback for dealing with older puppetmasters), and the tests were augmeted to verify this behaviour. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixs #2620 authconf interpolation, #2570 0-9 in domain namesMarkus Roberts2009-09-141-53/+29
| | | | | | | | | | | | | | Partial refactoring to clean up the case in the ticket (host name containing dots, begining and ending with a digit, was mistaken for an IP address) and a range of related edge cases. Stopped short of a full refactoring (put off to 0.26 as #2623) Added tests for numerous edge cases. This also fixes the issue raised in #2570. Signed-off-by: Markus Roberts <Markus@reality.com>
* Require active_record/version to support ActiveRecord < 2.3Todd Zullinger2009-09-091-0/+1
| | | | | | | | | ActiveRecord < 2.3.0 did not autoload active_record/version which caused puppet to incorrectly believe ActiveRecord was not available. This compliments 1a5c5b3 (Fixing #2508 - removing mention of ActiveRecord 2.3). Signed-off-by: Todd Zullinger <tmz@pobox.com>
* Ticket #2525 don't fail find_manifest on invalid module namesMarkus Roberts2009-09-052-14/+12
| | | | | | | | | The patch that put validity assertions in for module names broke find_manifest because rather than returning a failure it now rasies an exception. This patch catches the exception and treats it as a negative result. Signed-off-by: Markus Roberts <Markus@reality.com>
* This further normalizes the handling of init-style services (includingMarkus Roberts2009-09-053-58/+36
| | | | | | | | | the redhat "service" wrapper script). Removes special case handling of non-zero exit code in redhat (base already did this) and centralizes scattered @resource[:has_____] checks. Tests that proper versions of each are called and one level of fallbacks. Signed-off-by: Markus Roberts <Markus@reality.com>
* Combined fix for #2525, #2552 -- RedHat service issuesMarkus Roberts2009-09-051-1/+9
| | | | | | | | | This patch normalizes the structure of the RH service routines which should clear up any lingering issues; xxxcmd routines always return an appropriate array, while the coresponding routines (status/restart/ etc.) either call super or take the needed actions. Signed-off-by: Markus Roberts <markus@phage.local>
* Fixed #2589 - Renamed zfs delete to destroy and added testsJames Turnbull2009-09-051-1/+1
|
* Monkey patch to improve yaml compatibility between ruby versionsMarkus Roberts2009-09-052-0/+44
| | | | | | | | | Ruby 1.8.1 can not parse the yanl produced by later versions because it requires explict type tagging of symbols. This patch adds the tagging on to later versions so that mixed version instalations can use yaml. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixing #2592 - you can escape slashes in regexesLuke Kanies2009-09-041-3/+14
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2590 - modulepath is not cached inappropriatelyLuke Kanies2009-09-031-0/+8
| | | | | | | | | | | | | | | | It was getting cached by Environment instances too early, thus causing some executables to use the default even when it was overridden. We're taking the slightly extreme step of clearing the environment list if any parameter is set, but this is relatively inexpensive and is the only way to always be correct. The reason that the environments cache this value at all is that to build up their module path they have to search through every known module for a lib or plugins directory, which is then done every time a class is sought in the language. Caching it saves a *ton* of file accesses. Signed-off-by: Luke Kanies <luke@madstop.com>
* Update documentation string to reflect actual intent of ↵Steven Jenkins2009-09-041-1/+1
| | | | Puppet::Node::Facts::Rest
* Fixes #2581. Use new 10.6 global launchd overrides file for service ↵Nigel Kersten2009-09-031-10/+82
| | | | status/enabled
* Fixed Naginator linkJames Turnbull2009-09-031-1/+1
|
* Fixing #2582 - / no longer autorequires /Luke Kanies2009-09-011-3/+3
| | | | | | This was obviously resulting in a dep cycle. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2577 - clarifying and demoting the deprecation noticeLuke Kanies2009-09-012-10/+18
| | | | | | | It's now just notice instead of a warning, and it clarifies that 0.24 clients can't be present. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2574 - autoloading finds plugins in modulesLuke Kanies2009-09-011-4/+5
| | | | | | | | We had some stupid errors that were preventing this from happening; this fixes them and adds an integration test. Signed-off-by: Luke Kanies <luke@madstop.com>
* The first regex node now matches firstLuke Kanies2009-09-011-8/+15
| | | | | | | Before it was undefined, but now we always match the first defined node. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2563 - multiple regex nodes now work togetherLuke Kanies2009-09-011-2/+12
| | | | | | | | | | The problem was that we were needing to convert one of the regexes to a string, which wasn't working well. This adds specific rules for how regexes vs. strings get compared. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #724 - false is equivalent to 'ruby -W1'Marc Fournier2009-09-011-1/+1
| | | | Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
* Fix parser error outputTodd Zullinger2009-08-241-1/+1
| | | | | | The 'value' passed to on_error in Puppet::Parser::Parser is a hash, and we only want to print the 'value' key, rather than a flattened string of the hash.
* Fixing #2551 - fixing content changed logsLuke Kanies2009-08-231-0/+15
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2549 - autoloading of top-level classes works againLuke Kanies2009-08-241-7/+14
| | | | | | | | This was broken in the recent refactor around autoloading, which didn't special-case classes that specified that they were top-level. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2460 - puppetmasterd can now read the cert and keyLuke Kanies2009-08-241-4/+25
| | | | | | | | | | | | This follows on to the previous commits which made Puppet resilient to the service user being absent. This just changes the default owner of all of the cert-related files to now be the service user, which means that on the server all of these files will be owned by that user and on the client, at least when the service user does not exist, they will be owned by root. Signed-off-by: Luke Kanies <luke@madstop.com>
* Not using the service user in settings when it's unavailableLuke Kanies2009-08-242-1/+15
| | | | | | | | | This gets us most of the way toward fixing #2460 - we can now have the certificate information owned by the service user when it's available, thus making it so that puppetmasterd (not running as root) can read it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Explicitly loading all facts in the directory service providerLuke Kanies2009-08-241-0/+3
| | | | | | | | We otherwise have load-order issues, where this provider tries to use the facts but they aren't currently autoloaded by default in Facter. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding an 'exists?' delegator from user type to providerLuke Kanies2009-08-241-0/+5
| | | | | | | We need this knowledge from the Settings class, and it makes more sense to delegate than to use direct access to the provider. Signed-off-by: Luke Kanies <luke@madstop.com>
* Switching the owner/group settings to use symbolic valuesLuke Kanies2009-08-242-49/+62
| | | | | | | | | | | | | | We previously allowed the owner and group to be set to arbitrary values but we never actually used it -- we always just set them to '$user' or '$group'. This commit changes the model to allow 'root' or 'service', where 'service' is converted to the actual service user/group. This has the potential to have backward compatibility concerns, because users could have changed the owner/group in puppet.conf, but the chances of that are fantastically small. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the yamldir group to be a group instead of userLuke Kanies2009-08-241-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving Setting classes into separate filesLuke Kanies2009-08-245-279/+286
| | | | | | | | This isn't really a refactor, just moving code around. I did some simple method renaming, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing chuser on darwin restrictionLuke Kanies2009-08-241-4/+0
| | | | | | | | | | | For too long we have refused to change users on Darwin because a long time ago the ruby they shipped with was really, really broken. It's been fixed for a while, so this just removes the restriction. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2558 - propagating recent fileserving changesLuke Kanies2009-08-245-18/+18
| | | | | | | | | | | | | | | | | | I'd made changes to the internals of the fileserving system to fix #2544 (mostly switched from passing the node around and then calculating the environment to just passing the environment around), but those changes weren't consistent throughout the fileserving code. In the process of making them consistent, I realized that the plain file server actually needs the node name rather than the environment, so I switched to passing the request around, because it has both pieces of information. Also added further integration tests which will hopefully keep this from cropping up again. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2550 Handles case where metadata is nilMarkus Roberts2009-08-231-7/+6
| | | | | | | | | | | | | The checksum function assumed that if the source was present the metadata (including checksum) was also, and thus that the type of the checksum could be extracated with a simple RegExp match. When metadata is nil it returns nil for the source checksum and the modified function passes this on. Alternatives would be to default to :md5 or to pass on to checking the :checksum parameter as if there were no source. Signed-off-by: Markus Roberts <Markus@reality.com>
* Ticket 2559 -- parseonly ignored specified fileMarkus Roberts2009-08-221-0/+6
| | | | | | | | In the command-line option parsing refactor from 0.24.x the manifest specification was lost for --parseonly, so site.pp was always used. This patch adds the parsing back in. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixed #2562 - Recognize the usecacheonfailure option againJohn A. Barbuto2009-08-211-0/+5
| | | | Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
* Refactoring the Module/Environment co-interfaceLuke Kanies2009-08-182-28/+15
| | | | | | | This simplifies who owns what code in these two classes, and the result should be much cleaner and simpler. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1544 - plugins in modules now works againLuke Kanies2009-08-185-17/+12
| | | | | | | | | | | | We had to fix the fileserving plumbing to use the request environment instead of trying to use the node environment. This was apparently never fixed after we added the environment to the URI in REST calls. There's still a bit of refactoring left to clean up the APIs used in some of this code. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2513. debian service provider now uses invoke-rc.d to determine ↵Nigel Kersten2009-08-181-11/+19
| | | | enabled? status
* Fixing fact-missing problem when puppet.conf is reparsedLuke Kanies2009-08-181-0/+6
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix for #2531; adds tests to confirm problem and related cases,Markus Roberts2009-08-181-1/+3
| | | | | | | notes fixes specific issue by eliminating the specal case for opaque strings which caused them to be strings when everything else was arrays; adds nots and pending tests where FQDN support could be added but stops short of a full refactor.
* Fixed #2530 - Fixed status setting in the SMF providerJames Turnbull2009-08-151-1/+1
|
* Fixes #2493Markus Roberts2009-08-141-0/+2
| | | | | | | | | | | | Added downcasing into find_or_load (which replaced fqfind) to get back the old behaviour. Adjusted tests so that they would catch the problem & confirmed that they fail without the downcasing. Added tests to confirm the existance of #2493; improved existing autoload tests (removed inter-test interactions) and noted (with a TODO) that there was dead code in the feature loading test; added analogus case sensitivity tests where apropriate.
* Fix #2517 - Stack overflow when CA cert missingMarkus Roberts2009-08-131-7/+3
| | | | | | | | | | | | | | This was a "There's A Hole In The Bucket" problem caused when trying to establish a connection to get a certificate before there was a certificate with which to establish the connection, ad infinitum. The solution was to test for the presence of the CA cert as well as the host cert before attempting to use them. This patch modifies existing tests to pass with the new code (by stubbing out the additional FileTests) and adds a new test which catches the original problem. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix #2516 - Fix format detection when content-type contains charsetBrice Figureau2009-08-133-3/+8
| | | | | | | | | | | | | | | | | | Even though Puppet never transmist a charset information in its response/request content-type, some proxy (especially Apache with the infamous AddDefaultCharset configuration) may add this "incorrect" information. This patch makes sure that only the mime-type is used when looking for the format associated with a response or a request. The patch also provides a better error message when the client or server code is fed with a request whose mime-type can not be mapped to a known format. It also fixes a typo noticed by the original reporter. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2507 - Exported resources were not correctly collected.Brice Figureau2009-08-136-11/+22
| | | | | | | | | | | | | | | | | | | | | | #2507 contains two issues: * a crash when we filters-out an unwanted resource which had edges pointing to it. * resources are losing their virtuality when they are transformed from Puppet::Parser::Resource to Puppet::Resource. This means we weren't able to distinguish anymore between an exported resource collected in the same node as it was exported and an exported resource collected in another node. The net result is that we can't apply exported resources that are collected in the same node because they are filtered out by the catalog filter (see the commits for #2391 for more information). The fix is to keep the virtuality of the resources so that we can differentiate those two types of exported resources. We keep this until the catalog is ready to be sent, where we filter out the virtual resouces only, the other still exported ones needs to be sent to the client. To be real sure, the transaction also skips virtual resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixes #2503Markus Roberts2009-08-131-2/+8
| | | | | | | | | | | Added a random suffex to the temporary file name and verify that the name is not in use (retry on collison). No additional tests added as the lifetime of the temporary file is bound by the routine, making spec driven tests impraticable. Includes logic to account for dead-end symlinks as well, as per Luke. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixes #2360 - Removed annoying log messageAndrew Shafer2009-08-131-3/+3
| | | | | | This change will effect all the properties implemented with list.rb (groups, roles, auths, profiles). The change will match [] values for should as insync when none exist. (so no more log message)
* Fixed #2525 - Wrong method being overridden in Red Hat servicesJames Turnbull2009-08-111-1/+1
|
* Fixing #2489 - queue integration tests are skipped w/out jsonLuke Kanies2009-08-101-1/+0
| | | | | | | | | All of the tests were failing because we had a call outside of any of the tests, just to autoload the constant. Removed that call and stubbed things so the tests don't run without json. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2508 - removing mention of ActiveRecord 2.3Luke Kanies2009-08-101-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2541 - file cache is more resilient to failureLuke Kanies2009-08-101-8/+12
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>