summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
...
| * fix #815: add :main to all use() for :reporting and :metricsDavid Schmitt2007-11-091-1/+1
| |
| * remove obsolete runners variableDavid Schmitt2007-11-091-8/+2
| |
* | Fixed most failing tests, but there are still over thirty failing.Luke Kanies2007-11-181-1/+1
|/ | | | | | At this point, I'm holding the experiment until after the release, so I'm committing this for now and will take it back up after 0.24.0 is out.
* File serving now works. I've tested a couple of ways toLuke Kanies2007-10-191-0/+22
| | | | | | | | | | | | | | | | use it, and added integration tests at the most important hook points. This provides the final class structure for all of these classes, but a lot of the class names are pretty bad, so I'm planning on going through all of them (especially the file_server stuff) and renaming. The functionality is all here for finding files, though (finally). Once the classes are renamed, I'll be adding searching ability (which will enable the recursive file copies) and then adding the link management and enabling ignoring files.
* Adding the first pass at modifying file servingLuke Kanies2007-10-171-0/+37
| | | | | | | | | | | | to work with indirection. I've split the fileserver handler into four pieces: Mount (which so far I've just copied wholesale), Configuration (responsible for reading the configuration file and determining what's allowed), Metadata (retrieves information about the files), and Content (retrieves the actual file content). I haven't added the indirection tests yet, and the configuration tests are still all stubs.
* Somewhat better documentation of the :absent field feature in fileparsing.Marcin Owsiany2007-10-061-1/+3
|
* Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppetLuke Kanies2007-10-041-7/+2
|\
| * Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppetLuke Kanies2007-10-0327-27/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/dsl.rb
| * | I finally tracked down the problem that was causing providersLuke Kanies2007-10-031-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to sometimes suddenly disappear and thus tests to fail -- Kernel.require was not loading the normal ruby path (e.g., 'puppet/type/cron'), so if someone else loaded that then it would replace the in-memory type with a new one, but that new one couldn't load its own providers, because the Kernel would ignore the providers, thinking they were already loaded. This doesn't fix all of the autoloading problems, but at least we won't suddenly break a ton of tests.
* | | Fixing #817, mostly using the patch by DavidS. I couldLuke Kanies2007-10-031-20/+5
| |/ |/| | | | | | | not directly use the patch because I have refactored too much.
* | Removing the Id tags from all of the filesLuke Kanies2007-10-0326-26/+0
| |
* | Fixed #832. Added the '--no-daemonize' option to puppetd and puppetmasterd.Michael V. O'Brien2007-10-031-1/+1
|/ | | | | The default behavior of 'verbose' and 'debug' no longer cause puppetd and puppetmasterd to not daemonize.
* Taking a first stab at moving configuration compilingLuke Kanies2007-09-231-9/+11
| | | | | | | | | | | | | | | into the indirection system. There are still quite a few unanswered questions, the two most notable being embodied in unimplemented tests in the Configuration Code terminus. This also requires changing the behaviour in a few places. In particular, 'puppet' and the 'module_puppet' cfengine module need to store a Node object in memory with the appropriate classes, since that's now the only way to communicate with the compiler. That integration work has not yet been done, partially because the old configuration handler (which the soon-to-be-deprecated master handler now uses) still exists.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-223-6/+6
| | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
* Merge branch 'configurations' into indirectionLuke Kanies2007-09-222-100/+99
|\ | | | | | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/indirector/facts/yaml.rb spec/unit/indirector/indirection.rb spec/unit/indirector/indirector.rb
| * An intermediate commit so I can start working on a differentLuke Kanies2007-09-201-1/+1
| | | | | | | | | | | | | | | | branch. The file recursion code actually works for the first time in a painful while, but there are still some quirks and design issues to resolve, particularly around creating implicit resources that then fail (i.e., the behaviour of the create_implicit_resource method in Configuration).
| * This is basically another intermediate commit. I feel likeLuke Kanies2007-09-172-50/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've gone too far down the rabbit hole to turn back now, but the code is clearly getting more centralized around the Configuration class, which is the goal. Things are currently a bit muddy between recursion, dynamic resource generation, transactions, and the configuration, and I don't expect to be able to clear it up much until we rewrite all of the tests for the Transaction class, since that is when we'll actually be setting its behaviour. At this point, Files (which are currently the only resources that generate other resources) are responsible for adding their edges to the relationship graph. This puts them knowing more than I would like about how the relationship graph works, but it'll have to do for now. There are still failing tests, but files seem to work again. Now to go through the rest of the tests and make them work.
| * The whole system now uses Configuration objects instead ofLuke Kanies2007-09-152-92/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ever converting the Transportable objects into a tree of components and then converting that into a graph. This is a significant step, and drastically simplifies the model of how to use a configuration. The old code might have looked something like this: file = Puppet::Type.create :path => "/whatever", ... comp = Puppet::Type.create :name => :whatever comp.push file transaction = comp.evaluate transaction.evaluate The new code looks like this: file = Puppet::Type.create :path => "/whatever", ... config = Puppet::Node::Configuration.new config.add_resource file config.apply I did not really intend to do this much refactoring, but I found I could not use a Configuration object to do work without refactoring a lot of the system. The primary problem was that the Client::Master and the Config classes determined how the transactions behaved; when I moved to using a Configuration, this distinction was lost, which meant that configurations were often needing to create other configurations, which resulted in a whole lot of infinite recursion (e.g., Config objects that create directories for Puppet use Configuration objects -- yes, I'm s/Config/Settings/g soon -- and these Configuration objects would need to create directories). Not everything is fixed, but it's very close. I am clearly over the hump, though, so I wanted to get a commit in.
* | It looks like the new indirection setup is complete.Luke Kanies2007-09-211-1/+7
|/ | | | I only need to port the node indirection termini over.
* Refactoring the feature support so it loads libraries when a feature is ↵Luke Kanies2007-09-111-22/+31
| | | | asked about, rather than when it is defined.
* Doing an intermediate commit so rick can look at the work I have done so far.Luke Kanies2007-09-111-2/+0
|
* Renaming the instance loader method to "instance_load". It was previously ↵Luke Kanies2007-09-102-2/+2
| | | | autoload, which could class with Kernel.autoload.
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-071-13/+12
| | | | problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
* Fixing #795 -- configuration elements now make sure all file paths are fully ↵Luke Kanies2007-09-061-1/+5
| | | | qualified by prepending the wd to unqualified path names.
* We now have a real configuration object, as a subclass of GRATR::Digraph, ↵Luke Kanies2007-09-041-2/+0
| | | | that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next.
* Making a couple of small bugfixes in the configuration subsystemLuke Kanies2007-08-271-1/+1
|
* Adding support for providing a diff when files are being changed. Currently ↵Luke Kanies2007-08-271-0/+71
| | | | uses a local diff binary, but could easily be changed to use the ruby diff/lcs library. Modified puppet and puppetd to automatically show file diffs when in noop mode, but can otherwise be enabled using --show_diff. This only works when running interactively, because the diffs are printed on stdout.
* Multiple environment support now works, and I have even tested it in real ↵Luke Kanies2007-08-261-14/+31
| | | | life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
* Modules are now tested with spec, and they now can handle ↵Luke Kanies2007-08-251-17/+1
| | | | environment-specific module paths.
* The config class now has support for add an environment to its search path. ↵Luke Kanies2007-08-241-7/+8
| | | | Now I just need to go through the whole system and use the search path in addition to the parameter name itself.
* I have added basic support for a search path, altho not yet with any ability ↵Luke Kanies2007-08-242-131/+149
| | | | to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path.
* Adding some rspec tests for Config.rb, because I am planning on ↵Luke Kanies2007-08-231-39/+82
| | | | significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch.
* Merge branch 'master' of http://northstarlabs.net/git/puppetLuke Kanies2007-08-151-1/+7
|\
| * Added optional per-module lib directory.Jeffrey J McCune2007-08-141-1/+7
| | | | | | | | | | | | | | | | Puppet now looks for a lib directory inside each module bundle, and adds the directory to the list searched by Puppet::Util::Autoload. The intent is to facilitate more sophisticated virtual types and flexibility within modules.
* | Added shortname support to config.rb and refactored addargsMichael V. O'Brien2007-08-142-11/+49
|/
* Changes to lib/ corresponding to test refactoring from r2759, was unaware ↵christian2007-08-091-41/+26
| | | | | | that subversion only commited in the CWD git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2761 980ebf18-57e1-0310-9a29-db15c13687c0
* Fix the ral:providers:host:parsed tests so they run successfully(no author)2007-08-091-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2757 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #749 -- environment settings no longer accumulate. Significantly ↵luke2007-08-061-1/+1
| | | | | | adding to the cron tests at the same time, such that hopefully we will no longer have these recurring bugs. I now do every combinatorial of multi-line cron jobs, including doing them all in one file. There are, unfortunately, still edge cases, but maybe we will have some peace in cron space for a while, anyway. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2750 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #735 -- gen_config now uses a single heading, matching the name of ↵luke2007-08-041-1/+4
| | | | | | the process git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2743 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #734. The problem was that when I switched how the configs were ↵luke2007-08-031-1/+5
| | | | | | parsed, I managed to lose the ability to keep values set on the cli from being overridden by values set in config files. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2738 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the rest of #705, except for the env stuff, which I was not able to ↵luke2007-07-141-2/+6
| | | | | | reproduce. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2697 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the first half of #705 -- matching no longer fails. I think this ↵luke2007-07-121-2/+7
| | | | | | also fixes #648. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2680 980ebf18-57e1-0310-9a29-db15c13687c0
* Having FileType instances automatically back their contents up to a ↵luke2007-07-111-0/+11
| | | | | | filebucket, so it is much harder to lose content. This does not yet back up crontab contents, though. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2679 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding line/file info to parsing errors in ParsedFileluke2007-07-101-1/+9
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2675 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing some of the internals of autoloading so that there is a class-level ↵luke2007-07-101-15/+44
| | | | | | method to query whether a given file has been loaded. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2668 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing the long-obsolete Element base class. The Parameter and Type ↵luke2007-07-042-1/+17
| | | | | | classes no longer have the same base class. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2647 980ebf18-57e1-0310-9a29-db15c13687c0
* Updating trac location for laegluke2007-06-191-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2636 980ebf18-57e1-0310-9a29-db15c13687c0
* Modified the fileserver to cache file information, so thatluke2007-06-191-0/+4
| | | | | | | | | each file isn't being read on every connection. Also, added londo's patch from #678 to avoid reading entire files into memory. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2629 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #643 -- replacing the get_posix_field method with a more degenerate ↵luke2007-06-171-5/+34
| | | | | | version that works even on broken systems git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2598 980ebf18-57e1-0310-9a29-db15c13687c0
* adjusting the rrd color stack as requested by thijsluke2007-06-141-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2584 980ebf18-57e1-0310-9a29-db15c13687c0