summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Fixed #1852 - Correct behaviour when no SELinux bindingsJames Turnbull2009-01-271-0/+8
|
* Updated to version 0.24.7Luke Kanies2008-12-161-1/+1
|
* Not using a temporary file when locking files for writing.Luke Kanies2008-12-151-9/+6
| | | | | | | | | | The temporary file was not actually useful, because we could never really get atomic renames, for annoying, complicated reasons. This hopefully finally fixes #1812. Signed-off-by: Luke Kanies <luke@madstop.com>
* Issue 1804 VDev with the same devices should be in syncAndrew Shafer2008-12-152-13/+50
| | | | | Added VDev and MultiVDev properties to the ZPool type to handle logic Vdevs with the same devices are now in sync even if the order changes
* Documentation fixesJames Turnbull2008-12-1324-130/+181
|
* Fixing #1812 (hopefully) - adding read and write locks to yaml.Luke Kanies2008-12-121-3/+12
| | | | | | | | It's obviously not really possible to test that this fixes it, but I'm confident that the locks work, and now we're using them, so it *should*. Signed-off-by: Luke Kanies <luke@madstop.com>
* Preparing to fix #1812 - Moving locking code to a moduleLuke Kanies2008-12-123-36/+53
| | | | | | | This moves the locking code out of Puppet::Util into a separate module, to make the code cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #1815 - puppetdoc --all crash on resource overrideBrice Figureau2008-12-101-1/+1
|
* Add a unique name to objects so we can determine uniqueness when read back inJohn Ferlito2008-12-092-1/+5
| | | | | | | | | | | | | | | | | The nagios object definitions have been updated to correlate with Nagios 3.0.6. In Nagios it is possible to have multiple service checks with the same service_description. eg I could have an check with a service_description of 'SSH' for multiple hosts. So in puppet we can't use it as a unique name for the resource. This patch modifies the code to use $name as the unique name. For some types eg command_name $name ends up in the config and thus we can tell which puppet resources match to which nagios ones. For other types like service there is no direct mapping from $name to a nagios attibute. So we use a custom attribute called _naginator_name. Signed-off-by: John Ferlito <johnf@inodes.org>
* Fix the spec tests to work on other platforms, do the confine around OS X ↵Nigel Kersten2008-12-092-5/+9
| | | | versions more sanely
* remove unnecessary mk_resource_methods callNigel Kersten2008-12-091-2/+0
|
* Add a unique name to objects so we can determine uniqueness when read back inJohn Ferlito2008-12-092-74/+113
| | | | | | | | | | | | | | | | | The nagios object definitions have been updated to correlate with Nagios 3.0.6. In Nagios it is possible to have multiple service checks with the same service_description. eg I could have an check with a service_description of 'SSH' for multiple hosts. So in puppet we can't use it as a unique name for the resource. This patch modifies the code to use $name as the unique name. For some types eg command_name $name ends up in the config and thus we can tell which puppet resources match to which nagios ones. For other types like service there is no direct mapping from $name to a nagios attibute. So we use a custom attribute called _naginator_name. Signed-off-by: John Ferlito <johnf@inodes.org>
* Bug #1803 Zfs should auto require the ancestor file systemsAndrew Shafer2008-12-081-0/+6
|
* Refactor #1802 Use 'zfs get -H -o value' instead of parsing output for valueAndrew Shafer2008-12-081-12/+1
| | | | just simplifying code
* Fixing #1800 - tidy now correctly ignores missing files and directoriesLuke Kanies2008-12-081-1/+8
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1794 - returning sync when it is already initializedLuke Kanies2008-12-081-0/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1750 again - All of the properties and now :ensure check replace?Luke Kanies2008-12-081-0/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* spec tests for type and provider and some code cleanup to adhere to DRYNigel Kersten2008-12-062-160/+183
|
* Finished work on rules creation and deletionNigel Kersten2008-12-062-89/+129
|
* new better way of doing stdinNigel Kersten2008-12-061-2/+3
|
* finished rights flush, working on rulesNigel Kersten2008-12-061-7/+37
|
* macauthorization typeNigel Kersten2008-12-062-83/+46
|
* reset macauthorization tree. Initial checkin of new type/providerNigel Kersten2008-12-063-0/+396
|
* add NetInfo deprecation notice to user and group providers, make the ↵Nigel Kersten2008-12-063-6/+15
| | | | directoryservice user provider the default, remove default for darwin from NetInfo providers
* Warn that the NetInfo nameservice provider is deprecated. Use ↵Nigel Kersten2008-12-061-2/+7
| | | | directoryservice instead
* add some more sanity checks around stdinNigel Kersten2008-12-061-3/+9
|
* add support for stdin to Puppet::Util.executeNigel Kersten2008-12-061-2/+2
|
* Updated mcx type and provider with comprehensive spec tests.Jeffrey McCune2008-12-021-2/+2
| | | | | | | | Signed-off-by: Jeffrey McCune <mccune.jeff@gmail.com> Fixed default provider error with mcx type spec. Signed-off-by: Jeffrey McCune <mccune.jeff@gmail.com>
* Fixing splaytime testsLuke Kanies2008-12-011-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing debugging from the "resources" typeLuke Kanies2008-12-011-1/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Relicense under GPLv2+Bryan Kearney2008-12-022-8/+8
|
* Hopefully fixing #1703 - using a mutex around the sending of the tagmailsLuke Kanies2008-12-021-6/+14
| | | | | | | It's not really possible to test that this fixes the problem, and I can't even reproduce it, but hopefully this will work. Signed-off-by: Luke Kanies <luke@madstop.com>
* Ticket 1780 - Solaris RBAC roles should be autorequiredAndrew Shafer2008-12-011-0/+11
| | | | Autorequire the roles that belong to the user so they will be created first
* Feature 1696 Add support for branded zonesAndrew Shafer2008-12-012-4/+15
| | | | Applied the patch from the ticket and wrote tests with the changes
* Bug #1778 - Solaris RBAC profiles should maintain orderAndrew Shafer2008-12-013-3/+31
| | | | | | Created OrderedList property Added to profile property small refactor in List to make inheriting easier
* Bug # 1680 Now you can set the hashed passwords on solarisAndrew Shafer2008-12-011-11/+18
| | | | Straight /etc/shadow hackery
* Feature #1783 - Add ZFS supportAndrew Shafer2008-12-014-0/+273
| | | | Types and providers to manage zfs and zpool