summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | Merge branch 'tickets/2.7.x/5777' into 2.7.xJacob Helwig2011-07-268-17/+193
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/2.7.x/5777: Deprecate RestAuthConfig#allowed? in favor of #check_authorization Fix #6026 - security file should support inline comments Fix #5010 - Allow leading whitespace in auth.conf Fix #5777 - rule interpolation broke auth.conf CIDR rules
| | | * | | | Deprecate RestAuthConfig#allowed? in favor of #check_authorizationBrice Figureau2011-07-264-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #allowed? was a poorly named method since it isn't actually a predicate method. Instead of returning a boolean, this methods throws an exception when the access is denied (in order to keep the full context of what ACE triggered the deny). Given that #allowed? was overriding the behavior from AuthConfig, we leave a version of #allowed? in place that will issue a deprecation warning before delegating to #check_authorization. Once support for XML-RPC agents is removed from the master, we will be able to remove this delegation, since there should no longer be a reason for a distinction between AuthConfig and RestAuthConfig. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | | Fix #6026 - security file should support inline commentsBrice Figureau2011-07-265-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auth.conf, namespaceauth.conf and fileserver.conf were not supporting trailing inlined comments. Also this commit fixes some indentation and error management. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | | * | | | Fix #5010 - Allow leading whitespace in auth.confBrice Figureau2011-07-263-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regex used to detect ACE is too lax and would allow trailing spaces to sneak in, which in turn would confuse the ACE parser. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | | * | | | Fix #5777 - rule interpolation broke auth.conf CIDR rulesBrice Figureau2011-07-261-0/+147
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the interpolation performed to support regex back-references, various type of rules (mainly IP CIDR notations and wildcard hosts) were not working anymore. This patch adds an auth.conf integration test that covers most of the various rules types. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | | | | Merge branch 'master' of github.com:puppetlabs/puppetJosh Cooper2011-07-264-38/+62
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of github.com:puppetlabs/puppet: maint: Suggest where to start troubleshooting SSL error message maint: Fix cert app to print help and exit if no subcommand
| | * | | | | Merge branch '2.7.x'Matt Robinson2011-07-264-38/+62
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: maint: Suggest where to start troubleshooting SSL error message maint: Fix cert app to print help and exit if no subcommand
| | | * | | | Merge branch 'ticket/2.7.x/maint-show_help_for_cert_without_subcommand' into ↵Matt Robinson2011-07-262-1/+12
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.7.x * ticket/2.7.x/maint-show_help_for_cert_without_subcommand: maint: Fix cert app to print help and exit if no subcommand
| | | | * | | | maint: Fix cert app to print help and exit if no subcommandMatt Robinson2011-07-252-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2.6.x this was the behavior, but the changes to the way options parsing worked in 2.7.x to support faces changed the behavior of how help was called. This resulted in the follow unhelpful error message when you just called `puppet cert`: /Users/matthewrobinson/work/puppet/lib/puppet/ssl/certificate_authority/interface.rb:85:in `method=' Invalid method to apply Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | Merge branch 'ticket/2.7.x/maint-improve_ssl_error' into 2.7.xMatt Robinson2011-07-262-37/+50
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/maint-improve_ssl_error: maint: Suggest where to start troubleshooting SSL error message
| | | | * | | | | maint: Suggest where to start troubleshooting SSL error messageMatt Robinson2011-07-262-37/+50
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much like the infamous "hostname was not match" error message, there's another SSL error that people run into that isn't clear how to troubleshoot. err: Could not send report: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed. As far as I can tell this only ever happens when the clock is off on the master or client. People seem to think it will happen other times, but I haven't been able to reproduce it other ways - missing private key, revoked cert, offline CA all have their own errors. I googled around and the only thing I've seen for this error in relation to puppet is the time sync problem. So the error message text just has some additional info to suggest you check your clocks. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| * | | | | | | Merge branch 'feature/master/8268-puppet-agent-windows'Josh Cooper2011-07-2622-75/+81
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | / / / | | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | * feature/master/8268-puppet-agent-windows: Fix issue with forward and backslashes in Windows paths Disable spec tests for unsupported functionality on Windows Update certificate spec tests for Windows
| | * | | | | Fix issue with forward and backslashes in Windows pathsJosh Cooper2011-07-265-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The environment validates its modulepath and manifestdir settings, but it uses Dir.getwd to convert a relative path into an absolute path. The problem is that on Windows, Dir.getwd returns a path with backslashes. (Interestingly this only happens when puppet is loaded, not in irb for example.) And since we do not yet support backslashes in Windows paths or UNC paths, the directory is not included in the environment. For the time being, I am using File.expand_path to normalize the path. It has the side-effect of converting backslashes to forward slashes. This is sufficient to work around backslashes in Dir.getwd. In the near future, I will be refactoring how paths are split, validated, tested, etc, and I have a REMIND in place to fix the environment. But as a result of this change it exposed a bug in our rdoc parser dealing with the finding the root of a path. The parser assumed that the root was '/', but caused an infinite loop when passed a Windows path. I added a test for this case, which is only run on Windows, because on Unix File.dirname("C:/") == '.'. After all of that, I had to disable one of the rdoc spec tests, because it attempted to reproduce a specific bug, which caused rdoc to try to create a directory of the form: C:/.../files/C:/.... Of course, this fails because ':' is not a valid filename character on Windows. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | Disable spec tests for unsupported functionality on WindowsJosh Cooper2011-07-2610-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby does not support creating symlinks on Windows (though Windows does support them), and since the tidy spec test is designed to reproduce a specific bug (as opposed to testing symlink functionality on Windows) it has been disabled. Ruby on Windows also does not support File.chmod, so the inspect spec test has been disabled. The general issue of File.chmod on Windows is something I know needs to be investigated. Also disabled the cron spec test as this functionality will not be supported on Windows (instead there will be task manager support). Re-enable the autoload spec tests as those now pass on Windows (this is probably due to the cacher changes recently made). The inventory ssl spec is not supported on Windows and so is disabled. However, while researching the failure, it was due to Time.now.strftime("%Z") returning "Pacific Daylight Time" on Windows, instead of "PDT" like it does on other platforms. As a result, the split method was sometimes splitting in the wrong place. As far as I can tell, the inventory code is only called from the CA (to keep track of serial numbers for certs that it has issued). But it's something to watch out for on Windows when calling strftime. Webrick, fileserver and CA functionality are not supported on Windows so these spec tests are disabled. Also fix path issue with catalog spec. Also several spec tests were creating tempfiles manually and calling system("rm -rf ..."), these have been replaced with PuppetSpec::Files.tmpdir. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | Update certificate spec tests for WindowsJosh Cooper2011-07-267-44/+42
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable CA related spec tests on Windows, since that functionality is not supported. Some cert spec tests are still marked as fails_on_windows because settings attempts to create and apply a catalog corresponding to ssl/cert related directories. This fails because on Windows Puppet.features.root? always returns true (which is a separate bug), and as a result attempts to set the owner and group, which fails because the provider is not implemented yet on Windows. Also many of these tests were using Tempfile.new and trying to system("rm -rf ...") later. I changed these to use PuppetSpec::Files.tmpdir instead, which automatically cleans up temporary directories after the tests have run. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | Merge branch '2.7.x'Nick Lewis2011-07-2528-158/+405
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/type/file/source.rb spec/unit/resource/catalog_spec.rb
| | * | | | Merge branch '2.6.x' into 2.7.xNick Lewis2011-07-257-18/+80
| | |\ \ \ \ | | | |/ / / | | |/| | / | | | | |/ | | | |/|
| | | * | Merge branch 'ticket/2.6.x/8596' into 2.6.xNick Lewis2011-07-252-10/+60
| | | |\ \
| | | | * | (#8596) Detect resource alias conflicts when titles do not matchNick Lewis2011-07-252-10/+60
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of composite namevars caused the resource title used in resource aliases to be set as an array, even when the resource only had one namevar. This would fail to conflict with non-alias entries in the resource table, which used a string for the title, even though the single element array contained the same string. Now, we flatten the key used in the resource table, so that single element arrays are represented as strings, and will properly conflict with resource titles. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | | * | Merge branch 'ticket/2.6.x/8418-inspect_respect_run_mode' into 2.6.xMatt Robinson2011-07-255-8/+20
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.x/8418-inspect_respect_run_mode: (#8418) Fix inspect app to have the correct run_mode maint: Adding logging to include environment when source fails maint: Add debug logging when the master receives a report
| | | | * | (#8418) Fix inspect app to have the correct run_modeMatt Robinson2011-07-252-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requiring puppet before the run_mode has been set by the application causes the default run_mode of 'user' to be set instead of what the application wants. This leads to the incorrect default settings to be used, which lead to inspect not being able to properly retrieve file metadata from a fileserver. Reviewed-by: Max Martin <max@puppetlabs.com>
| | | | * | maint: Adding logging to include environment when source failsMatt Robinson2011-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Max Martin <max@puppetlabs.com>
| | | | * | maint: Add debug logging when the master receives a reportMatt Robinson2011-07-252-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's always bothered me that when running puppet inspect (or any application that produces a report really) the master gives no indication that anything happened when it processes the report. Reviewed-by: Max Martin <max@puppetlabs.com>
| | * | | | Merge branch 'tickets/2.7.x/7293' into 2.7.xPieter van de Bruggen2011-07-253-20/+16
| | |\ \ \ \
| | | * | | | (#7293) Set default format for SSL-related faces.Pieter van de Bruggen2011-07-253-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, the SSL-related faces should all render a strings, not with `Object#inspect`. Reviewed-By: Daniel Pittman
| | | * | | | (Maint.) Unquoting HEREDOCs.Pieter van de Bruggen2011-07-252-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The additional quotation marks frustrate certain syntax highlighters, and are completely unnecessary for their use. Reviewed-By: Daniel Pittman
| | * | | | | Merge branch '2.7rc' into 2.7.xMichael Stahnke2011-07-2511-35/+604
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | / | | | | |_|/ | | | |/| |
| | | * | | Updated CHANGELOG for 2.7.2rc2Michael Stahnke2011-07-251-0/+5
| | | | | |
| | | * | | Merge branch 'ticket/master/8301-redhat-spec-cleanup' into 2.7rcJacob Helwig2011-07-141-7/+40
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/master/8301-redhat-spec-cleanup: (#8301) Red Hat spec file for 2.7.2rc1 won't work
| | | | * | | (#8301) Red Hat spec file for 2.7.2rc1 won't workMichael Stahnke2011-07-141-7/+40
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated Red Hat spec file included in ext. Now reduces the number of rpmlint complaints. Fixed license tag to be compliant with Fedora guidelines. Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
| | | * | | (#5108) Update service type docs for new hasstatus defaultnfagerlund2011-07-141-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit #7d35a479 changed the default value of the service type's hasstatus attribute. This was never documented. This commit documents the changed behavior, which will end up in the type references (and puppet describe) for version 2.7.2 and greater. (I intend to manually change the cached references for versions 2.7.[01].)
| | * | | | Merge branch 'tickets/2.7.x/7266' into 2.7.xPieter van de Bruggen2011-07-253-18/+29
| | |\ \ \ \
| | | * | | | (#7266) Move Certificate option validation into face.Pieter van de Bruggen2011-07-253-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The validation for the ca_location option on the certificate application continued to hang around on the application long after the face realized its potential to take responsibility for itself. This change moves (and adds) validation code as appropriate into the Face. Reviewed-By: Matt Robinson
| | * | | | | maint: Fix Face testing bug 1.9.2 revealed.Daniel Pittman2011-07-252-4/+2
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.8.7 is fairly lax about various bits of introspection, including that we can't tell much about what arguments a block takes. Ruby 1.9.2 makes it possible to do this, though. Meanwhile, the Faces system uses this to make sure that scripts and actions take the right set of arguments, to avoid surprises: failing early and explicitly is better than failing at runtime. Which, in final turn, exposes that I forgot to accept the right arguments in a couple of my testing actions for Faces, but didn't notice because 1.8.7 doesn't check that, and I didn't test on 1.9.2.
| | * | | | Merge branch 'refactor/2.7.x/8561-and-7290-improved-option-handling' into 2.7.xDaniel Pittman2011-07-224-51/+109
| | |\ \ \ \
| | | * | | | (#7290) Update indirected Faces to avoid unknown options.Daniel Pittman2011-07-222-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we enforce that options must be declared, the model we exposed in the Ruby API (but not the CLI facade) was that you could pass additional arguments to the indirection method by passing them as unknown options doesn't work. Instead, explicitly declare an option, `extra`, that accepts the final argument to be passed direct to the indirection. This makes things work smoothly, as well as making it possible (once you can input a hash on the command line) to invoke extra arguments from the facade too... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | maint: don't print inside action implementations.Daniel Pittman2011-07-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than printing directly, we should return the data from the Action and allow the facade to route that to the user directly. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#8561, #7290) Implement the option contract fully.Daniel Pittman2011-07-222-40/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the process of validating and updating the options to fully reflect the contract - we fail if there are unknown options passed, report nicely errors of duplicate names, pass only the canonical names to the action code, and generally enforce nicely. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#8561) Unify validation and modification of action arguments.Daniel Pittman2011-07-222-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than having multiple, separate operations that modify and validate the arguments to an action, a single pass makes sense. This also means less walks across the set of data, and a few less expensive method calls in Ruby. Additionally, we work on a duplicate of the arguments hash rather than directly modifying the original. Because everything we do is at the top level key/value mapping, this is sufficient to isolate the original. While mostly theoretical, we now don't mutilate the hash passed in, so the user won't get nastily surprised by the fact that we could have done so. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#7290) Fail on unknown options.Daniel Pittman2011-07-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the "social contract" of Faces, Actions and Options is that the metadata we collect is authoritative: it covers everything that is possible. In the initial release we didn't enforce that around options. If you passed an unknown option in the hash, we just silently ignored it in validation and made it available down in the action. Now, instead, we enforce that rule. If you pass an unknown option we raise an error and complain; anything that gets to the action will be listed in the set of inspectable options. Cases that depended on this behaviour to pass arbitrary content in the hash should be rewritten to move that content down a level: take a hash value for one option, and use that for your free content. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#8561) Use canonical names for options to actions.Daniel Pittman2011-07-221-6/+20
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we invoke an action, we parse a set of options. These have a canonical name, and optionally a set of aliases. For example, :bar might have :b as an alias to allow a short name to be given. Previously we would just pass this on as received; if you passed :bar you got :bar, and if you passed :b you got :b. This works, but means that every action has to write the same code to extract the appropriate version of an option from whatever set of aliases might be passed. Now, instead, we centralize that and always pass options as their canonical name to the action code. This makes it simpler to work with. (This happens before any validation, or other user-supplied, code to simplify everything that handles options.) Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | * | | | Merge branch 'feature/2.7.x/7184-better-action-loading' into 2.7.xDaniel Pittman2011-07-2210-19/+108
| | |\ \ \ \
| | | * | | | (#7184) Load the core of obsolete versions of Faces.Daniel Pittman2011-07-225-18/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we define an action on an older version of a Face, we must be sure to directly load the core of that version, not just define it with the external Action(s) that it had. Otherwise we break our contract, which is that any core Actions for a specific version will be available to your external Action for as long as we support that core version. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#7184) Find actions bound to other versions of Faces.Daniel Pittman2011-07-223-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we first touch a Face, we load all the available Actions from disk. Given they define themselves against a specific version of a Face, they are automatically available tied to the correct version; this makes it trivially possible to locate those on demand and return them. Now, we have the ability to find and, consequently, invoke Actions on older versions of Faces. We don't load enough context, though: the older face will only have external Actions defined, not anything core. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | (#7184) Centralize "find action for face" into Puppet::FaceDaniel Pittman2011-07-224-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving to load actions first, and their associated face, when invoked from the command line, it makes sense to push the logic for finding the action and face down into the Puppet::Face implementation. This means that we can change the logic there without needing to update the public part of the CLI implementation, and that any further facades can use the same, correct, logic to locate the action for the face. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | maint: better error reporting when test failsDaniel Pittman2011-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test ensures, among other things, that we get a log message. If that fails, we were trying to call a random method on nil; making that an assertion means that we get a nice message rather than a failure that needs decoding. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| * | | | | | Merge branch 'feature/master/8272-windows_service_support'Cameron Thomas2011-07-226-2/+261
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/master/8272-windows_service_support: Add basic service provider for Windows Regexp escape substituted commands in Windows wrapper script
| | * | | | | | Add basic service provider for WindowsCameron Thomas2011-07-225-1/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provider allows us to query the system state through "puppet resource", and manage the ensure, and enabled properties of services on Windows. This also adds support for a new enabled value of 'manual' on Windows only. With this we support the three major start types for services on Windows, with the following mapping of enabled to start type: true => Automatic false => Disabled manual => Manual (Demand) We use the win32-service gem to provide access to the Windows APIs for our operations. This does add a new gem requirement for running Puppet on Windows, but we were already requiring some gems from the same suite that win32-service is a part of. When referring to a service, the simple service name must be used, instead of the display name. For example, "snmptrap", instead of "SNMP Trap". All system services are reported in 'puppet resource service', including those started prior to run level 3 (system, device drivers, etc.). These services should probably not be managed, without careful thought and planning. This currently does not support being able to move a service from {enabled => false, ensure => stopped} to {enabled => true, ensure => running} (or enabled => manual) in a single Puppet run, since Puppet currently always tries to sync ensure before any other property. Because of this, the puppet run will fail every time, and the service must first be managed as {ensure => stopped, enabled => true} (or enabled => manual), before it can be managed as running and automatic start or manual start. Reviewed by: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | | | Regexp escape substituted commands in Windows wrapper scriptCameron Thomas2011-07-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because Windows file paths can (and do) contain '\', they can end up being interpreted as back-references on the substitution side of gsub. Since this is not at all what is intended, we use Regexp.escape to quote them. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | | Merge branch '2.7.x'Jacob Helwig2011-07-221-3/+13
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | * 2.7.x: Confine password disclosure acceptance test to hosts with required libraries