summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | (#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>
| | * | | | | Making Fact json handling more resilientLuke Kanies2011-07-152-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were failing if any values were nil, and values were often nil, at least in testing. We now only include non-nil values, and we handle nil values just fine. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | Adding json support to Puppet::NodeLuke Kanies2011-07-152-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Daniel Pittman <daniel@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com> Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| | * | | | | (7080) Adding json support to Indirector RequestLuke Kanies2011-07-152-2/+148
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll be using this to do RPC over mcollective. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com> Signed-off-by: Luke Kanies <luke@puppetlabs.com>
| * | | | | Merge branch 'ticket/master/8356-color-setting-on-windows'Jacob Helwig2011-07-131-2/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/master/8356-color-setting-on-windows: (#8356) Specify setting type for color
| | * | | | | (#8356) Specify setting type for colorJacob Helwig2011-07-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we default the color setting to "false" on Microsoft Windows, the heuristics used to detect which type of setting we're using were getting confused, and mis-detected color as being a BooleanSetting rather than just a Setting. By specifying that color is a "Setting", we can skip the auto-detection, and avoid this problem entirely. Reviewed-by: Josh Cooper <josh@puppetlabs.com>
| * | | | | | Merge branch 'feature/master/8268-puppet-agent-windows'Josh Cooper2011-07-121-5/+9
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | * feature/master/8268-puppet-agent-windows: (#8268) Fix resource harness spec tests
| | * | | | | (#8268) Fix resource harness spec testsJosh Cooper2011-07-121-5/+9
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The windows file type requires that the path start with either a drive letter or UNC style path. Also Ruby's File implementation on windows only supports 0644 and 0444 permission bits (it doesn't differentiate between group and other, and it doesn't know about the execute bit). This commit maps the path and permissions used in the test to sensible values when running on windows. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | Merge branch 'ticket/master/8356-default-color-should-be-false-on-windows'Josh Cooper2011-07-112-1/+11
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/master/8356-default-color-should-be-false-on-windows: (#8356) Color defaults to false on Windows
| | * | | | | (#8356) Color defaults to false on WindowsJosh Cooper2011-07-112-1/+11
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows consoles do not support ansi escape sequences for colorizing output. This commit changes the default setting of 'color' to false when the "microsoft_windows" feature is present. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | Merge pull request #15 from ↵Jeff McCune2011-07-091-5/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | jeffmccune/ticket/master/8032_create_resources_containment (#8032) Add containment to create_resources
| | * | | | | (#8032) Add containment to create_resourcesJeff McCune2011-06-211-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 'disable-master-on-windows'Jacob Helwig2011-07-082-1/+8
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * disable-master-on-windows: Disable the master on Windows instead of blowing up with failed resources
| | * | | | | | Disable the master on Windows instead of blowing up with failed resourcesJacob Helwig2011-07-082-1/+8
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the Puppet master on Windows is not supported, so instead of failing with what can be cryptic error messages about failed resources we fail with an explicit error message about the master on Windows not being supported. This way a user isn't mistakenly given the impression that running a master on Windows will work, and they just have something mis-configured. Signed-off-by: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | | Merge branch 'ticket/master/7581-windows-feature-detection-error-message'Jacob Helwig2011-07-081-1/+9
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | * ticket/master/7581-windows-feature-detection-error-message: (#7581) Provide more detailed error message when missing gems on Windows
| | * | | | | (#7581) Provide more detailed error message when missing gems on WindowsJacob Helwig2011-07-081-1/+9
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running Puppet on Windows requires the sys-admin, win32-process & win32-dir gems. If any of these gems were missing, Puppet would fail with the message "Cannot determine basic system flavour". When trying to determine if we are on Windows, we now warn with the message "Cannot run on Microsoft Windows without the sys-admin, win32-process & win32-dir gems: #{err}", where err is the normal ruby load error message stating which gem could not be loaded. We also only warn if the POSIX feature is not present. Signed-off-by: James Turnbull <james@puppetlabs.com> Signed-off-by: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Cameron Thomas <cameron@puppetlabs.com>
| * | | | | Updated CHANGELOG and package building files for 2.7.2rc1Michael Stahnke2011-07-065-6/+132
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
| * | | | | Merge branch 'master' into 2.7rcMichael Stahnke2011-07-065-0/+409
| |\ \ \ \ \ | | |_|/ / / | |/| | | |
| | * | | | Merge branch '2.7.x'Jacob Helwig2011-06-281-2/+2
| | |\ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | * 2.7.x: Update configurer_spec.rb to work with Ruby 1.8.5