summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/settings.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Adding a common Settings method for setting valuesLuke Kanies2009-04-221-34/+34
| | | | | | | | We were previously missing some hooks for settings set via the command-line, because different code paths were being used. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with ↵James Turnbull2009-02-261-12/+12
| | | | semicolons
* Fixed #2017 - incorrect requireJames Turnbull2009-02-241-1/+1
|
* Refactoring how the Settings file is parsedLuke Kanies2009-02-191-18/+30
| | | | | | | | | | | | | The goal of this refactor was to use a cached attribute for the LoadedFile instance we use to monitor whether the file needs reparsing. We were getting tests that affected later tests because they were holding on to LoadedFile stubs, somehow. The other main change here is that the Settings#parse method now knows how to look up its own file path. Signed-off-by: Luke Kanies <luke@madstop.com>
* Introducing the Application ControllerBrice Figureau2009-02-161-0/+28
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Creating and using a new Puppet::Daemon classLuke Kanies2009-02-061-14/+5
| | | | | | | | | | | | This replaces the short-lived EventManager class, all of the service- and timer-related code in puppet.rb, and moves code from agent.rb, server.rb, and other places into one class responsible for starting, stopping, pids, and more. The Daemon module is no longer in existence, so it's been removed from the classes that were using it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Canonicalizing Setting section names to symbols.Luke Kanies2008-12-181-14/+14
| | | | | | | | | I thought I was already using symbols everywhere so it didn't matter, but there are a few places (e.g., the process name) where they were strings, and that made things not work so much. Signed-off-by: Luke Kanies <luke@madstop.com>
* Finishing the work to use Puppet::Resource instead of TransObjectLuke Kanies2008-12-181-9/+16
| | | | | | | | | | | | This was a complicated project because TransObject had made its way into too many classes. The usage by Util::Settings was particularly nefarious. Refactoring and fixing this exposed some other issues. The main complication, though, was the extent to which the Puppet::Type class depended on TransObject. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the Settings class to use Puppet::ResourceLuke Kanies2008-12-181-174/+69
| | | | | | | It also now uses the Catalog instead of the recursive TransObject stuff. Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x'Luke Kanies2008-12-021-74/+80
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/puppetca lib/puppet/type/group.rb lib/puppet/type/tidy.rb lib/puppet/util/settings.rb Also edited the following files so tests will pass: lib/puppet/type/component.rb spec/unit/ssl/certificate_request.rb spec/unit/type/computer.rb spec/unit/type/mcx.rb spec/unit/type/resources.rb spec/unit/util/settings.rb spec/unit/util/storage.rb test/ral/type/zone.rb
| * Refactoring the thread-safety in Puppet::Util a bit.Luke Kanies2008-11-261-21/+27
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #1683 - accessing and changing settings is now thread-safe.Luke Kanies2008-11-261-140/+144
| | | | | | | | | | | | Applying patch by Matt Palmer. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-171-3/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | since that method is deprecated. Conflicts: CHANGELOG bin/puppetca lib/puppet/file_serving/fileset.rb lib/puppet/network/xmlrpc/client.rb lib/puppet/type/file/selcontext.rb spec/unit/file_serving/metadata.rb spec/unit/type/file.rb
| * Fixed #1613 - The client environment will be substituted when looking up ↵Luke Kanies2008-10-031-3/+5
| | | | | | | | | | | | | | | | | | | | settings. This won't be perfect, because it still requires that the caller pass in an environment, but for every case that an environment is passed in, that environment will be substituted into settings when possible. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-08-201-4/+0
|\|
| * Removed reference to namespaces from --genconfig documentationJames Turnbull2008-08-211-4/+0
| |
* | Merge branch '0.24.x'Luke Kanies2008-07-041-7/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/util/settings.rb spec/integration/defaults.rb spec/unit/node/catalog.rb spec/unit/type/interface.rb spec/unit/type/ssh_authorized_key.rb
| * Fixed #1231 - Exceptions during startup should now be clear.Luke Kanies2008-07-041-2/+4
| | | | | | | | | | | | | | This will often result in duplicate information, but at least the information will now always be there. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-07-021-0/+58
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: CHANGELOG spec/unit/node/catalog.rb spec/unit/type/package.rb spec/unit/type/schedule.rb spec/unit/type/service.rb spec/unit/util/settings.rb
| * issue 1183Andrew Shafer2008-06-161-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added environment awareness to --configprint Pulled the logic for --configprint --genconfig and --genmanifest out of puppet.rb Put the logic in lib/puppet/util/settings.rb and refactored it a bit Added specs for the behavior Reformated the whole spec file to use nested describe Added the new method to the executables The old behavior should be preserved, except for the env is now used
* | Merge branch '0.24.x'Luke Kanies2008-05-201-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: CHANGELOG spec/integration/defaults.rb spec/integration/node/catalog.rb spec/unit/rails.rb spec/unit/type/mount.rb
| * Fix for ticket #1218 - changed to appropriate variable nameJames Turnbull2008-05-101-1/+1
| |
* | The master and client now successfully speak xmlrpc using the new system.Luke Kanies2008-05-071-3/+9
| | | | | | | | | | | | The server is actually serving REST, but the client can't use it until we resolve the format and security issues that REST hasn't yet tackled.
* | The Settings class now clears the 'used' sections when a value is changed.Luke Kanies2008-05-051-1/+3
| | | | | | | | | | | | | | | | | | This makes is so that if you, for instance, reset the vardir, then the next time an initialization call is made, we reuse any previously used sections, thus (hopefully) correctly creating any newly needed directories. This is mostly helpful during testing.
* | I think I've now got the Webrick SSL support working.Luke Kanies2008-04-281-1/+6
| | | | | | | | | | Now I just need to get xmlrpc working alongside REST in both mongrel and webrick.
* | We have a basically functional CA -- it can signLuke Kanies2008-04-151-1/+1
| | | | | | | | | | | | requests and return certificates. There's still plenty more work to do, but I'm probably not much more than a day away from redoing puppetca to use this code.
* | Fixing tests that were failing as a result of the merge,Luke Kanies2008-04-011-4/+0
| | | | | | | | | | including removing some now-obsolete code and tests from the Settings class.
* | Merge branch '0.24.x'Luke Kanies2008-03-201-23/+26
|\|
| * Refactoring how the catalog creation handles errors.Luke Kanies2008-03-181-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if there were an error creating a resource, the error would propagate leaving any previously created resources still in memory. Now, resources are removed by default when an error happens during instantiation, and the error propagates to the caller so that they can log or whatever. This also allows the Settings class to correctly and separately handle the cases where we can't create the catalog (which should never happen in normal usage but was happening because of this error -- later catalogs couldn't be created because earlier catalogs left resources lying around) from those where we can't apply the catalog.
| * Removing extra debuggingLuke Kanies2008-03-181-1/+0
| |
| * Settings now (again?) do not use a section more thanLuke Kanies2008-03-181-8/+13
| | | | | | | | once, which should make the system a bit more efficient.
| * Hopefully *finally* fixed the "already being managed" problemLuke Kanies2008-03-181-6/+9
| | | | | | | | | | | | (#1036). The problem only cropped up if there was a failure when trying to manage the system -- this would cause the setting-based resources not to get cleaned up.
* | Merge branch '0.24.x'Luke Kanies2008-03-071-47/+49
|\|
| * Changed name of method for clarity per code reviewLuke Kanies2008-03-051-5/+5
| |
| * Ticket #1041Andrew Shafer2008-03-051-47/+49
| | | | | | | | | | | | | | | | | | | | The CA serial file was getting owned by root because it was using a different method to write to file Pulled the readwritelock out of lib/puppet/sslcertificates/ca.rb into lib/puppet/util/settings.rb Refactored write, writesub and readwritelock a bit to reuse code (write and readwritelock both call writesub) Added a mode to :serial in lib/puppet/util/defaults.rb
* | Merge branch '0.24.x'Luke Kanies2008-02-251-1/+1
|\|
| * Somewhat refactored fileserving so that it no longer cachesLuke Kanies2008-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | any objects, nor does it use Puppet's RAL resources. In the process, I fixed #894 (you can now copy links) and refactored other classes as necessary. Mostly it was fixing tests. This is a squashed commit of a temporary branch, fwiw, and it also includes any fixes to the tests that were necessary to get all tests passing again.
* | Merge branch '0.24.x'Luke Kanies2008-02-121-16/+19
|\| | | | | | | | | | | Conflicts: CHANGELOG
| * Applying patch by Jay to fix #989 -- missing crl files areLuke Kanies2008-02-071-1/+1
| | | | | | | | | | correctly ignored, and you now use 'false' instead of 'none' to explicitly ignore them.
| * Fixing the Settings class so that it correctly handlesLuke Kanies2008-02-071-7/+9
| | | | | | | | file values that are false.
| * I think I've finally fixed #959, by having the SettingsLuke Kanies2008-01-201-12/+13
| | | | | | | | class skip any resources that are already in memory.
* | Removed remaining elements of old_parse - closing Ticket #990James Turnbull2008-01-191-88/+0
|/
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-111-3/+3
|
* Fixing the rest of #948. My previous work was sufficient,Luke Kanies2007-12-101-1/+6
| | | | | | except that I was not passing the interpolated value in to the hook, which meant the libdir was set to something like $vardir/lib.
* Fixing part of #948 -- per-setting hooks are now calledLuke Kanies2007-12-101-15/+38
| | | | | when the configuration file is parsed. The bug is still there, but I'm getting closer.
* Merge branch 'plugins_mount', fixing #891.Luke Kanies2007-11-241-1/+9
|\ | | | | | | | | | | Conflicts: CHANGELOG
| * Integrating Matt Palmer's patch to provide a 'plugins'Luke Kanies2007-11-241-1/+9
| | | | | | | | | | | | | | | | | | | | mount, fixing #891. The patch was ported to the current code by David Schmitt, I applied the rest of Matt's patches, and I then fixed all of the code so that the tests passed. The primary change I had to make to the patch was reenabling host expansion in paths -- his patch had disabled it.
* | Applying patch ↵Luke Kanies2007-11-231-1/+1
|/ | | | 20070913004017-6856b-cdbbba99de0b33b64874205a27833b5114fcc6b9.patch by womble -- Allow empty config settings
* remove obsolete runners variableDavid Schmitt2007-11-091-8/+2
|