summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | Merge remote-tracking branch ↵Jacob Helwig2011-07-211-0/+8
| | |\ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 'barn/tickets/2.6.x/6857-password-disclosure-when-changing-a-users-password' into 2.6.x * barn/tickets/2.6.x/6857-password-disclosure-when-changing-a-users-password: (#6857) Password disclosure when changing a user's password
| | | * | | (#6857) Password disclosure when changing a user's passwordBen Hughes2011-06-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the should_to_s and is_to_s functions to return a form of 'redacted'. Rather than send the password hash to system logs in cases of failure or running in --noop mode, just state whether it's the new or old hash. We're already doing this with password changes that work, so this just brings it inline with those, albeit via a slightly different pair of methods.
| * | | | | (#7123) Make `find` the default action...Daniel Pittman2011-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the progress toward getting the `puppet status` invocation working nicely is that it should default to invoking the `find` operation. This implements that, using the new runtime default action facility. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| * | | | | (#7123) Support runtime setting of 'default' on actions.Daniel Pittman2011-07-201-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the inheritance model for actions, we are sometimes going to need to set them to 'default' at runtime, rather than during their static declaration. Add tests to verify that this works correctly, and update the code to ensure that happens. This gives up caching of the default action, but this should be an extremely rare operation - pretty much only CLI invocation, really. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| * | | | | (#6787) Add `default_to` for options.Daniel Pittman2011-07-203-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implement support for options with default values, allowing faces to set those values when not invoked. This can eliminate substantial duplicate code from actions, especially when there are face-level options in use. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* | | | | | Merge branch '2.7.x'Nick Lewis2011-07-2015-64/+271
|\| | | | |
| * | | | | (#6789) Port SSL::CertificateAuthority::Interface to a FaceDaniel Pittman2011-07-202-0/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Puppet::SSL::CertificateAuthority::Interface class was an early prototype heading toward building out a system like Faces. Now that we have done that, this changeset ports the early code to a new face. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| * | | | | maint: SSL::Inventory.serial should report missing names.Daniel Pittman2011-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our SSL inventory was able to find the serial number of a certificate by name, but was incapable of living up to the contract it offered, that it would actually report when a certificate was missing. Now it returns `nil`, which is the same case as "no inventory", if the certificate was not found, rather than accidentally returning the entire inventory data as raw strings. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| * | | | | (#7204) Consolidate Semantic Versioning code.Pieter van de Bruggen2011-07-192-46/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a class representing a semantic version, and implementing a few of the most common uses of them: validation, comparison, and finding the greatest available version matching a range. This refactoring also allows us to easily expand our matching of version ranges in the future, which is a big plus. Reviewed-By: Daniel Pittman
| * | | | | Merge branch 'issue/2.7.x/7699' into 2.7.xDan Bode2011-07-152-2/+4
| |\ \ \ \ \
| | * | | | | (#7699) Help command should only list options onceDan Bode2011-07-132-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | (#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-142-2/+1
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | * | | | | (#7144) Update Settings#writesub to convert mode to FixnumMax Martin2011-07-142-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | 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>
| * | | | | (#4142) Fix module check not to fail when empty metadata.jsonMatt Robinson2011-07-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.7.x" This reverts commit b7ee0258ab40478329c20177eda9b250f27ede18, reversing changes made to 8fe2e555ac3d57f5b6503ffe1a5466db8d6e190a.
| * | | | | (#7699) - Help should only show options onceDan Bode2011-07-102-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | | (#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>
| * | | | | (#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>
* | | | | | Remove Puppet::Network::HttpPool keep_alive handlingNick Lewis2011-07-193-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | (#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-192-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Scope[] now returns nil for undefined variablesLuke Kanies2011-07-154-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Making the Functions module more resilientLuke Kanies2011-07-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | 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-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-153-23/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-158-45/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | (#7080) Registering PSON document typesLuke Kanies2011-07-152-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Making Fact json handling more resilientLuke Kanies2011-07-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-2/+49
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | (#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>
* | | | | (#8356) Color defaults to false on WindowsJosh Cooper2011-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Disable the master on Windows instead of blowing up with failed resourcesJacob Helwig2011-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch '2.7.x'Jacob Helwig2011-06-2811-139/+172
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (23 commits) Clean up indentation, whitespace, and commented out code Remove order dependency from functions integration spec (#7956) Porting cron tests (#7956) Port resource acceptance tests (#8048) Gem install puppet no longer fails if rdoc enabled. Updating for 2.7.1 release. (#8048) Gem install puppet no longer fails if rdoc enabled. Readying for release of 2.6.9 Updating CHANGELOG for 2.7.0 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7224) Reword 'hostname was not match' error message (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate names (#7506) Organize READMEs; specify supported Ruby versions in README.md (#7506) Specify supported Ruby versions in README.md (#5641) Help text: document that puppet doc takes modulepath, manifestdir, and environment options (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction ...
| * | | Merge branch '2.6.x' into 2.7.xJacob Helwig2011-06-287-118/+103
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (#7956) Porting cron tests (#7956) Port resource acceptance tests Readying for release of 2.6.9 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7506) Organize READMEs; specify supported Ruby versions in README.md (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction (#4416) Ensure types are providified after reloading (#4416) Always remove old provider before recreating it Cleanup indentation, comment, and unused code Conflicts: CHANGELOG README.md conf/redhat/puppet.spec lib/puppet.rb lib/puppet/transaction.rb spec/unit/configurer_spec.rb spec/unit/transaction_spec.rb
| | * | (#7127) Stop puppet if a prerun command failsJosh Cooper2011-06-105-75/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change there were several problems with pre and post run commands, logging, and sending of reports. 1. If a prerun command failed, puppet would attempt to apply the catalog. Now puppet will not apply the catalog, but it will run the postrun command and send the report (as it did before). 2. If a postrun command failed, puppet would not send the report. Sending the report is now in an outer ensure block from the postrun command, so postrun failures won't prevent the report from being sent. 3. Errors, e.g. Puppet.err, occuring during the prepare step, which which includes plugin/fact download and prerun commands were not appended to the report. Now the report log destination is registered as early as possible, and unregistered as late as possible to ensure Configurer errors that occur in the run method are included in the report. 4. The transaction was closing the Configurer's report destination out from underneath it. As a result, postrun errors were not included in the report. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | Do not needlessly create multiple reports when creating a transactionJosh Cooper2011-06-102-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the transaction would always create a report, which would some times be overridden with a new report. Now, the transaction optionally takes a report at initialization time, and only creates a report of its own if none was provided. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | (#4416) Ensure types are providified after reloadingNick Lewis2011-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the 'provider' parameter for a type was only added when creating a provider for that type. This would cause a type to forget about its 'provider' parameter when only the type was reloaded. This was manifesting itself in pluginsync, when a provider plugin would be loaded before its type, causing the type to be autoloaded. The type plugin would then be loaded again by the plugin handler. Because the type => provider information is stored separately from the type, the providers don't need to be reloaded, and thus don't recreate the type's 'provider' parameter. Now we always "providify" the type (add its 'provider' parameter) upon creation, after trying to load its providers, if any providers are present. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| | * | (#4416) Always remove old provider before recreating itNick Lewis2011-06-101-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where provider class evaluation failed midway, the provider class would be created but not registered. Thus, when checking whether it should be removed, it wasn't found, and wasn't removed. This caused it to then fail to be recreated, because it collided with the existing class. Now we don't bother checking whether the provider is registered before we remove it, since rmclass has the appropriate checks to do the unregistration, and class removal safely. Removing a provider class that has been created but not registered should not be a problem since the only time this can happen is when the class is unusable because of parsing or other fatal errors in the provider itself. Paired-with: Jacob Helwig <jacob@puppetlabs.com>