summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | (#7699) Help command should only list options onceDan Bode2011-07-135-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was caused by the fact that the options method returns a list of options that treated the aliases as seperate options. The fix is to only maintain a list of options and not add all aliases to the options list.
| | * | | | | | Merge branch 'ticket/2.7.x/8401-docs-detailed-exitcodes' into 2.7.xnfagerlund2011-07-153-11/+12
| | |\ \ \ \ \ \
| | | * | | | | | (#8401) Document that --detailed-exitcodes is a bitmasknfagerlund2011-07-153-11/+12
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The agent/apply/device man pages mentioned the 2 and 4 exit codes, but didn't mention that they can combine to make 6 if there are both changes and failures. This commit adds the missing information to all three man pages. Reviewed-by: Matt Robinson <matt@puppetlabs.com>
| | * | | | | | Merge branch '2.6.x' into 2.7.xMatt Robinson2011-07-1420-50/+83
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (maint) Cleanup and strengthen acceptance tests (#7144) Update Settings#writesub to convert mode to Fixnum (maint) Fix platform dection for RHEL Manually Resolved Conflicts: acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb spec/unit/util/settings_spec.rb
| | | * | | | | Merge branch 'maint/2.6.x/replace_regex_with_asserts' into 2.6.xDominic Maraglia2011-07-1415-45/+68
| | | |\ \ \ \ \
| | | | * | | | | (maint) Cleanup and strengthen acceptance testsDominic Maraglia2011-07-1415-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converted plain regex checks to use Test::Unit::Accertions. Adding more verbose output in the case of failure to speeed debugging.
| | | * | | | | | Merge branch 'ticket/2.6.x/7144-private-keys' into 2.6.xMatt Robinson2011-07-143-2/+12
| | | |\ \ \ \ \ \ | | | | |/ / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.x/7144-private-keys: (#7144) Update Settings#writesub to convert mode to Fixnum
| | | | * | | | | (#7144) Update Settings#writesub to convert mode to FixnumMax Martin2011-07-143-2/+12
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Settings#writesub was not checking the type of the mode value passed in from the defaults, causing it to pass a string for mode to File.open, leading to failures. This commit resolves that issue. Paired-with: Matt Robinson <matt@puppetlabs.com>
| | | * | | | | Merge branch 'maint/2.6.x/fix_plaform_detection' into 2.6.xDominic Maraglia2011-07-122-3/+2
| | | |\ \ \ \ \
| | | | * | | | | (maint) Fix platform dection for RHELDominic Maraglia2011-07-122-3/+2
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detecting supported platform used incorrect string for RHEL. Changed string from 'redhat' to 'rhel'
| | * | | | | | Merge branch 'ticket/2.7.x/maint-fix_doc_link' into 2.7.xMatt Robinson2011-07-141-1/+1
| | |\ \ \ \ \ \ | | | |_|/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/maint-fix_doc_link: maint: Fix documentation link for fileserver configuration
| | | * | | | | maint: Fix documentation link for fileserver configurationMatt Robinson2011-07-141-1/+1
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link to the filesever configuration page linked to the wiki, which links back to the docs site. Short circuiting that do just link to where you want to go. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | Merge branch 'ticket/2.7.x/4142-metadata_json' into 2.7.xMatt Robinson2011-07-122-10/+42
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/4142-metadata_json: (#4142) Fix module check not to fail when empty metadata.json
| | | * | | | | (#4142) Fix module check not to fail when empty metadata.jsonMatt Robinson2011-07-122-10/+42
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the puppet module tool was fixed to generate the required metadata attributes when it packages modules, it still creates an empty metadata.json file that gets checked into everybody's module repos. This causes the module to be unusable straight from a git clone since puppet was requiring all the required metadata attributes just with the presence of that file, and resulting in the error: No source module metadata provided for mcollective at This change makes it so that if you have an empty metadata.json (like the moduletool generates), puppet doesn't consider it to have metadata. If you have ANY metadata attributes in that file, it will still check to make sure all the required attributes are present. The work around up to this point has just been to delete the metadata.json file in git cloned modules. This also fixed the tests around this to actually run, since previously the tests depended on the a json feature, which we didn't have. We do, however, have a pson feature. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | Revert "Merge branch 'ticket/2.7.x/7699_fix_help_listing_options_twice' into ↵Jeff McCune2011-07-104-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.7.x" This reverts commit b7ee0258ab40478329c20177eda9b250f27ede18, reversing changes made to 8fe2e555ac3d57f5b6503ffe1a5466db8d6e190a.
| | * | | | | Merge branch 'ticket/2.7.x/7699_fix_help_listing_options_twice' into 2.7.xJeff McCune2011-07-104-2/+21
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/7699_fix_help_listing_options_twice: (#7699) - Help should only show options once
| | | * | | | | (#7699) - Help should only show options onceDan Bode2011-07-104-2/+21
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | puppet help was reprinting every option once for every alias that is had. This fix involves only storing the option.name in the @options instance var for both face and actions options. The @options_hash still maintains the list of options and aliases as its keys. Reviewed-by: Daniel Pittman (puppet-dev list)
| | * | | | | Merge branch 'ticket/2.7.x/8032_create_resource_containment' into 2.7.xJeff McCune2011-07-101-5/+6
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/8032_create_resource_containment: (#8032) Add containment to create_resources
| | | * | | | | (#8032) Add containment to create_resourcesJeff McCune2011-07-101-5/+6
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change native resource types declared using the create_resources() function are not contained within the class scope of the function call. As a result, resources were "floating off" in the graph, disconnected from the rest of the relationship edges. With this change, the scope is preserved and native resources are contained by the class the function call is executed from. Reviewed-by: Dan Bode <dan@puppetlabs.com>
| | * | | | | Merge branch 'ticket/2.7.x/8147' into 2.7.xnfagerlund2011-06-292-2/+2
| | |\ \ \ \ \
| | | * | | | | (#8147) Update test for default reporturlnfagerlund2011-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edit test to accomodate the default URL change made in commit f6882d6d5779883e931a6f558c06f631098011c5. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | | | (#8147) Change default reporturl to match newer Dashboard versionsnfagerlund2011-06-291-1/+1
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet's default reporturl setting was http://localhost:3000/reports, which has been deprecated in Puppet Dashboard in favor of http://localhost:3000/reports/upload. As Dashboard is the first-class destination for the http report processor, this commit changes Puppet's default to match what current versions of Dashboard expect. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | Merge branch 'remove-http-pool-keep-alive'Nick Lewis2011-07-197-182/+4
| |\ \ \ \ \ \
| | * | | | | | Remove Puppet::Network::HttpPool keep_alive handlingNick Lewis2011-07-197-182/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep alive has been disabled since 2008, and seems to have caused problems when it was enabled before then. Since there doesn't seem to be any push to get it working again, just remove it to simplify this code. This also allows us to entirely remove the usage of Puppet::Util::Cacher from HttpPool. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | | Merge branch 'feature/master/8268-puppet-agent-windows'Josh Cooper2011-07-191-1/+1
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | * feature/master/8268-puppet-agent-windows: Fix spec test failure on 1.9.2
| | * | | | | | Fix spec test failure on 1.9.2Josh Cooper2011-07-191-1/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous set of windows patches accidentally changed %w{/one} to make_absolute("/one"). This commit changes it back to [make_absolute("/one")]. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | Merge branch 'feature/master/8268-puppet-agent-windows'Josh Cooper2011-07-1996-325/+459
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/master/8268-puppet-agent-windows: Maint: Fix miscellaneous tests Maint: Don't test for extended signals on Windows Maint: Tagged spec tests that are known to fail on Windows Fix tests with "relative" paths on Windows (#8268) Require windows drive letters in absolute file paths (#8489) Consistently use File::PATH_SEPARATOR
| | * | | | | | Maint: Fix miscellaneous testsJosh Cooper2011-07-196-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several tests were broken due to pecularities of Windows and Ruby on Windows: * Ruby on windows does not differentiate between group and other file permissions. * All open file handles must be closed before the file can be deleted * Sometimes the current working directory (Dir.getwd) is reported as C:/foo and other times as C:\\foo, which confuses the spec tests. * Ruby's sprintf formats floating point values differently on Windows vs Unix. The Windows exponent has an extra leading zero. * Needed to stub execution of security command with the SMF service provider. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | Maint: Don't test for extended signals on WindowsJosh Cooper2011-07-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signals HUP, USR1, and USR2 are not supported on Windows. The Puppet::Daemon code already skipped trapping these on Windows, but the spec test was expecting them to be trapped. This commit just updates the spec test to match the existing daemon code. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | Maint: Tagged spec tests that are known to fail on WindowsJosh Cooper2011-07-1953-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many spec tests fail on Windows because there are no default providers implemented for Windows yet. Several others are failing due to Puppet::Util::Cacher not working correctly, so for now the tests that are known to fail are marked with :fails_on_windows => true. To skip these tests, you can run: rspec --tag ~fails_on_windows spec Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | Fix tests with "relative" paths on WindowsJosh Cooper2011-07-1941-233/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows, which breaks many test cases. This commit adds a method to PuppetSpec::Files.make_absolute that makes the path absolute in test cases. On Unix (Puppet.features.posix?) it is a no-op. On Windows, (Puppet.features.microsoft_windows?) the drive from the current working directory is prepended. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | (#8268) Require windows drive letters in absolute file pathsJosh Cooper2011-07-194-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing whether a file path is absolute, the regexp was only handling POSIX style file paths. This commit requires Windows style file paths to start with a drive letter. A future commit will refacter the various places we do path validation to support both Windows drive letters and UNC paths. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | (#8489) Consistently use File::PATH_SEPARATORJosh Cooper2011-07-195-9/+11
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet uses both colon and File::PATH_SEPARATOR in various places, which does not work on Windows, where File::PATH_SEPARATOR is a semi-colon. This commit changes the code and tests to consistently use File::PATH_SEPARATOR. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | Merge branch 'refactor/master/8232-array_indexers_on_scope'Luke Kanies2011-07-1527-313/+436
| |\ \ \ \ \ \
| | * | | | | | Scope[] now returns nil for undefined variablesLuke Kanies2011-07-156-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that we have the 'include?' method, this feature is unnecessary, and it makes sense to convert to more ruby-like behavior. Any code that previously checked whether lookupvar (or the new []) returned :undefined should now check whether 'scope.include?(var)'. Thus, you can have the same behavior, but it takes a bit different code to get it. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Fixing a failing test because of mismatched error stringLuke Kanies2011-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Removing an unnecessary stub in the Scope testsLuke Kanies2011-07-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Making the Functions module more resilientLuke Kanies2011-07-152-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were previously storing the module name with the environment instances as the key, which meant if the environment instances were removed, we could never get those modules again. Given that the functions weren't reloaded, this meant the functions were gone if we ever reloaded the environment. This makes the Functions environment module resilient across environment reloads, and it also makes the method work correctly when handed either an environment or a string. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Cleaning up indentation in versoncmp functionLuke Kanies2011-07-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Fixing default parameter value assignmentLuke Kanies2011-07-152-30/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method for adding class resources to the catalog was only working in cases where the default values weren't AST objects. This commit fixes this, along with the tests that were failing and drew out the problem. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Cleanup up a small amount of whitespaceLuke Kanies2011-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Improving an error messageLuke Kanies2011-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Adding Scope#each methodLuke Kanies2011-07-152-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability was already there via to_hash, and Enumerable was already included, but this method was missing. Given the kind of hacking RI is doing, this seemed appropriate. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Adding Scope#include? methodLuke Kanies2011-07-152-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is primarily for Hiera/DataLibrary support, but is a decent idea regardless. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Resource type defaults cleanupLuke Kanies2011-07-156-46/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is again done to make support for hiera easier. The way we were handling lookup of resource defaults was over-complicated. This does a decent bit of cleanup overall, but primarily focused on resource type defaults and how they get set during compilation. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Adding default environment to ScopeLuke Kanies2011-07-152-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were previously not defaulting to an environment, which is silly given that there's always a default. It just made setup code harder. We now default to the default environment. This makes further testing involving scopes much easier. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | | Adding []/[]= support to ScopeLuke Kanies2011-07-1521-204/+178
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface to scope is much clearer this way anyway, but this is needed to integrate Puppet with Hiera[1]. It just provides hash-like behavior to Scope, which Hiera and others can now easily rely on. I also went through all of the code that used Scope#lookupvar and Scope#setvar and changed it if possible, and at the same time cleaned up a lot of tests that were unnecessarily stubbing (and thus making it difficult to tell if I had actually broken anything). 1 - https://github.com/ripienaar/hiera Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| * | | | | | Merge branch 'tickets/master/7080-serializable_indirector_requests'Luke Kanies2011-07-156-8/+276
| |\ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | |
| | * | | | | (#7080) Registering PSON document typesLuke Kanies2011-07-154-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were originally using the actual constant for both Indirector Requests and Nodes, and this registers their document types as symbolic names. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | Switching to use of json matchersLuke Kanies2011-07-152-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only in the Node and Indirection::Request code. It makes the tests much simpler. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>