summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
...
* | Move puppetca to the Application Controller paradigmBrice Figureau2009-02-161-0/+74
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Introducing the Application ControllerBrice Figureau2009-02-162-0/+320
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fixing some tests that somehow broke in the merge to masterLuke Kanies2009-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | I expect these failed in master but not 0.24.x because I'm better about stubbing calls to Facter in master. I stubbed these enough that they should continue to work. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2009-02-147-56/+152
|\| | | | | | | | | Conflicts: test/ral/manager/type.rb
| * Fix #1972 - ActiveRecord fixes resulted in broken testsBrice Figureau2009-02-151-3/+4
| | | | | | | | | | | | | | Fix #1930 was not complete, with some typos and misuse of unused code paths in the regular puppetmaster use case. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fixing password validation to support symbols.Luke Kanies2009-02-141-1/+1
| | | | | | | | | | | | | | My fix for #1920 broke when you set :absent or :present. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Only backing up within parsedfile when managing filesLuke Kanies2009-02-142-5/+7
| | | | | | | | | | | | | | | | | | | | | | I was getting failing tests because I was using non-files for testing and they didn't back up the same, not surprisingly. This moves the 'backup' method to the :flat filetype and then only backs up if the filetype supports it. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing a syntax error in the up2date providerLuke Kanies2009-02-141-1/+1
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Cleaned up variable names to be more sane, clarified error messages and ↵James Turnbull2009-02-141-6/+6
| | | | | | | | fixed incorrect use of 'value' variable rather than 'member'.
| * Provide dscl -url output support for OS X 10.4 clients using the ↵Nigel Kersten2009-02-141-36/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directoryservice provider. We refactored the directoryservice provider in puppet 0.24.7 to use the -plist option so that output could be parsed more easily to resolve a bug with values with spaces in the name. We missed that 10.4 does not support this flag, so this patch adds -url output support back in for OS X 10.4 clients only as well as a new -url output parser that copes with spaces. 10.5 clients continue to use the -plist method. Also includes some miscellaneous cleanup of methods and removal of extraneous comments. Signed-off-by: Nigel Kersten <nigelk@google.com> Don't use sw_vers to determine OS X versions, use the Facter value instead. This relies upon another patch to ralsh to ensure that facts are loaded.
| * Fix launchd service provider so it is backwards compatible with OS X 10.4 as ↵Nigel Kersten2009-02-141-4/+13
| | | | | | | | | | | | well Clean up fix to launchd service provider to be more concise
* | Failure to find node facts is now a failure.Luke Kanies2009-02-141-4/+8
| | | | | | | | | | | | | | | | It was previously just a warning, but the node is essentially non-functional without the facts, so it makes more sense for it to be a warning. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1527 - Failing Facter does not hurt PuppetLuke Kanies2009-02-142-2/+13
| | | | | | | | | | | | | | | | At this point, the server's behaviour is a bit undefined if it tries to compile the catalog with no facts locally. The next commits will fix that. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing some unused codeLuke Kanies2009-02-141-11/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Using Puppet::Type.new instead of createLuke Kanies2009-02-141-1/+1
| | | | | | | | | | | | | | create() got deprecated and I apparently missed changing this. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Actualling syncing facts and pluginsLuke Kanies2009-02-143-2/+6
| | | | | | | | | | | | | | | | Also fixing the argument order while downloading either of them. I had my Downloader.new calls using the wrong argument order. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #1933 - Inconsistent resource evaluation order in subsequent evaluation runsBrice Figureau2009-02-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | While evaluating the AST, catalog vertices are not always ordered the same way on different run, leading to some tags (which should have been applied in evaluation order) to not be associated with some underlying resources. This changeset change all accesses to resources inside the compiler to always use an ordered (in evaluation order) list of added resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch '0.24.x'Luke Kanies2009-02-1314-180/+310
|\| | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/indirector/facts/facter.rb lib/puppet/provider/augeas/augeas.rb lib/puppet/util/filetype.rb spec/unit/indirector/facts/facter.rb spec/unit/provider/augeas/augeas.rb test/util/filetype.rb
| * Updated Augeas type codeJames Turnbull2009-02-141-3/+5
| |
| * Fixed #1831 - Added sprintf functionJames Turnbull2009-02-141-0/+17
| |
| * Fixed #1830 - Added regsubst functionJames Turnbull2009-02-141-0/+93
| |
| * Bug 1948: Add logic and testing for the command parsing logicBryan Kearney2009-02-141-5/+6
| |
| * Updated up2date and service confines to add support for Oracle EL and VMJames Turnbull2009-02-132-3/+5
| |
| * Fixing #1964 - Facts get loaded from pluginsLuke Kanies2009-02-121-2/+6
| | | | | | | | | | | | | | | | Applying slightly modified patch. Also added tests. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Adding a post-processor for Nagios names.Luke Kanies2009-02-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is a brutal hack until Puppet correctly supports multiple primary keys. It basically just comments out _naginator_name before writing to disk, and uncomments it when reading. This allows Puppet to use it while Nagios ignores it. Yes, a stupid hack, but it appears to work. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Revert "Refixing #1420 - _naginator_name is only used for services"Luke Kanies2009-02-131-10/+15
| | | | | | | | | | | | | | | | This reverts commit efb5cc50c42bc27aec9409e723e3a717ed58c0a8. Conflicts: CHANGELOG
| * Fixing #1541 - ParsedFile only backs up files once per transactionLuke Kanies2009-02-132-1/+14
| | | | | | | | | | | | | | | | This moves responsibility for backups from the filetype to the consumer of the filetype, but only ParsedFile actually uses filetypes. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Removing the apparently obsolete netinfo filetype.Luke Kanies2009-02-131-88/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Migrated FileType tests to spec, and fleshed them out a bit.Luke Kanies2009-02-131-3/+3
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Bug #1948: Added patch by jab to support the correct ins syntax. Updated the ↵Bryan Kearney2009-02-131-6/+26
| | | | | | | | test cases as well
| * Fixing #961 - closing the http connection after every xmlrpc callLuke Kanies2009-02-121-1/+3
| | | | | | | | | | | | | | | | There were apparently some circumstances that resulted in the connection not being closed; this just closes it every time if it's still open after the rpc call is complete. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Refactoring the XMLRPC::Client error-handlingLuke Kanies2009-02-121-53/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I split it all into smaller, manageable chunks, and used methods for each step, instead of having one huge call. Note that I made all of the tests first, then refactored the code, so I'm confident there's no behavior change. I don't know that this is actually a lot cleaner, but it seems that way to me. I'm open to skipping this, but I think it makes the whole thing a lot cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixed #1959 - Added column protection for environment schema migrationJames Turnbull2009-02-121-2/+6
| |
| * Fixing #1869 - autoloaded files should never leak exceptionsLuke Kanies2009-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Ruby's exception hierarchy is a bit strange, in that only exceptions that sub RuntimeError are caught by default. This patch explicitly catches the base class, Exception, which means that LoadError, SyntaxError, and any RuntimeErrors will all be caught. This is done for both load() and loadall(); load() uses Kernel.load, but loadall() uses Kernel.require. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2009-02-1115-131/+136
|\| | | | | | | | | | | Conflicts: CHANGELOG spec/unit/type/file/selinux.rb
| * Fixing #1543 - Nagios parse errors no longer kill PuppetLuke Kanies2009-02-113-65/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem wasn't actually transactions, it was how exceptions were raised in Naginator. Well, parse errors actually resulted in an 'exit', rather than an exception, and the exceptions that Naginator was raising were not caught by a normal begin block (SyntaxError, rather than RuntimeError). This commit raises a RuntimeError-derived error rather than exiting. It also adds some context to the error when Puppet catches it. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Refixing #1420 - _naginator_name is only used for servicesLuke Kanies2009-02-111-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to: http://nagios.sourceforge.net/docs/3_0/customobjectvars.html the special underscore parameters are only supported on hosts, contacts, and services. This commit reverts most of the changes that set Nagios types to use such a parameter as the namevar. The original commit should have been broken into two commits: one to reorganize the file, and the other to make these changes. As it was, the revert was much harder than it should have been. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixed #1884 - exported defines are collected by the exporting hostLuke Kanies2009-02-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was caused by the fix to #1472. That fix unexported any resources collected from the local catalog. The crux of this fix is that it separates 'exported' and 'virtual' a bit more. It also removes no-longer-needed functionality where resources copied their virtual or exported bits from the enclosing define or class. This is now obsolete because we don't evaluate virtual defined resources. The crux of this commit is that defined resources can stay exported even though they're evaluated, and that exported state won't inherit to contained resources such that those then don't get evaluated. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Cleaning up the AST::Resource code a bitLuke Kanies2009-02-101-20/+21
| | | | | | | | | | | | | | | | | | | | | | Mostly renaming 'obj' to 'resource', since the whole 'obj' thing is a holdover from before we had the term 'resource'. Also pulling a bit of code out of a loop, since it didn't need to be there. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fix #1691 - Realize fails with array of Resource ReferencesBrice Figureau2009-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following snippet: realize( File["/tmp/a","/tmp/b"] ) is parsed into: AST::Function @name=realize @arguments= AST::ASTArray @children = [ AST::ResourceReference @title= AST::ASTArray @children = [ String(/tmp/a), String(/tmp/b) ] ] When evaluated: ResourceReference gives -> [ File[/tmp/a], File[/tmp/b] ] which means the function arguments are: [[File[/tmp/a], File[/tmp/b]] after evaluating the @arguments ASTArray of AST::Functions. Then the collector complains that it can't find the resource because it is not supposed to work on non-flattened resource array. The fix is to flatten in the realize function (although it can be done more generally in the AST::Function evaluation) before the resources are given to the Collector. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix #1682 - Resource titles are not flattened as they shouldBrice Figureau2009-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following manifest: $groups = ["foo", "bar"] $type_groups = ["baz", "quux"] $user_groups = [$groups, $type_groups] notify{ $user_groups: } which outputs: notice: foo notice: //Notify[foobar]/message: defined 'message' as 'foo' notice: baz notice: //Notify[bazquux]/message: defined 'message' as 'baz' is not equivalent to $user_groups = [ ["foo", "bar"], ["baz", "quux"] ] notify{ $user_groups: } which outputs: notice: foo notice: //Notify[foo]/message: defined 'message' as 'foo' notice: baz notice: //Notify[baz]/message: defined 'message' as 'baz' notice: bar notice: //Notify[bar]/message: defined 'message' as 'bar' notice: quux notice: //Notify[quux]/message: defined 'message' as 'quux' Obviously the second one manages to flatten the arrays and not the first one. This changeset adds flattening to the resource titles evaluations in order to be consitent in all cases. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix #1922 - Functions squash all arguments into a single hashBrice Figureau2009-02-111-1/+2
| | | | | | | | | | | | | | | | Revert "Fix #1682 - ASTArray should flatten product of evaluation of its children" This reverts commit c7ccc4ba7c42d56595564491ae578a1604c628d1. Bug #1824 and #1922 proved the fix for #1682 and #1691 was wrong. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fixed #1538 - Yumrepo sets permissions wrongly on files in /etc/yum.repos.dJames Turnbull2009-02-112-1/+5
| |
| * Prefetching, and thus purging, Nagios resources now worksLuke Kanies2009-02-112-22/+35
| | | | | | | | | | | | | | | | | | | | | | *only* if you use the default configuration file locations. In the end, this was a relatively minor change; most of the actual diff centers around making the code more readable so I could think my way into the fix, and adding tests for cases that were either untested or refactored slightly. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Removing a redundant instance prefect call.Luke Kanies2009-02-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | For some reason, Puppet::Type#evaluate was calling 'prefetch' on instances that support it, but prefetching is only a class-level functionality, normally -- in fact, it makes no sense unless done at the class level. This patch just removes the code. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #1912 - gid still works with no 'should' value.Luke Kanies2009-02-111-0/+2
| | | | | | | | | | | | This makes 'ralsh' work again with users. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #1920 - user passwords no longer allow ':'Luke Kanies2009-02-111-0/+4
| | | | | | | | | | | | | | | | | | I wanted to include a snide remark in the error, but... Now you just get an exception when creating the user if the password includes this character. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Change the way the tags and params are handled in railsBrice Figureau2009-02-064-41/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | The rationale behind this patch is that it takes a lots of time to let rails unserialize the ParamValue and ResourceTag object on each compilation, just to throw them away the second after. The idea is to fetch directly (and batched host per host) the parameters and tags from the database and then returns them as hash. This allows the no-modification case to takes at least 2 times less than before. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Add methods to return hash instead of objects to params and tagsBrice Figureau2009-02-062-12/+49
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Rails serialization module to help serialize/unserialize some Puppet ObjectsBrice Figureau2009-02-061-0/+18
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>