summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '0.25.x'Markus Roberts2010-02-091-3/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/agent.rb lib/puppet/application/puppet.rb lib/puppet/configurer.rb man/man5/puppet.conf.5 spec/integration/defaults.rb spec/unit/configurer.rb
| * Fixing #2914 - pre/post hooks now work for transactionsLuke Kanies2010-01-181-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was built to be used with etckeeper to version control files in /etc, but can be used for essentially anything. This patch was built to be added to 0.25.4, so it's a least-modify approach. A better approach would be to refactor application/puppet.rb just a bit so it uses Configurer more. This is a simple patch - it just defines 'prerun_command' and 'postrun_command' settings, and runs the appropriate command around each transaction if they're set. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* | Feature #2839 - fingerprint certificateBrice Figureau2010-01-192-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds several things: * certificate fingerprinting in --list mode * a puppetca action called "--fingerprint" to display fingerprints of given certificates (or all including CSR) * a --fingerprint puppetd option to display client certificates * each time a CSR is generated, its fingerprint is displayed in the log It is also possible to use --digest in puppetca and puppetd to specify a specific digest algorithm. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Revert "Feature #2839 - fingerprint certificate"James Turnbull2010-01-191-6/+2
| | | | | | | | | | | | This reverts commit a9fb82b0026e75a670fec553b17de3b0f091c2a5. An older branch was pulled
* | Feature #2839 - fingerprint certificateBrice Figureau2010-01-181-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds two things: * certificate fingerprinting in --list mode * a puppetca action called "--fingerprint" to display fingerprints of given certificates It is also possible to use --digest to specify a specific digest algorithm. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Feature #2395 - revoke when cleaning a certificate with puppetcaBrice Figureau2010-01-181-0/+1
| | | | | | | | | | | | | | | | As the ticket says: "the certificates would still be valid even if cleaned, therefore, it makes more sense revoke them instead." Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch '0.25.x'James Turnbull2010-01-134-41/+16
|\| | | | | | | | | | | Conflicts: lib/puppet/ssl/host.rb spec/spec_helper.rb
| * Fixing failing testsMarkus Roberts2009-12-231-1/+0
| |
| * Fix for #2881 (ralsh doesn't find individual parsed resources)Markus Roberts2009-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than just creating a new featureless resource for cases like: ralsh host localhost.localdomain (and the analogous cases with other parsed resources such as ssh keys, etc), we first check to see if the appropriate provider can find a resource with the requested name. If so, we use it; if not we fall back to the featureless form. There are a number of potential shortcomings with this fix: * It may not be particularly performant if there are many resources to be parsed. * It always (and only) checks the first provider; perhaps it should try all providers of the appropriate type. * It only checks the name property, and not any aliases or host_aliases. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Code smell reductionsMarkus Roberts2009-12-231-23/+8
| | | | | | | | | | | | These are a grab-bag of code simplification changes I made in the process of figuring out what was going on with #2881; they should all be absolutely behavior neutral.
| * Fix for #2943 (Make puppet --apply respect --preferred_serialization_format)Markus Roberts2009-12-211-1/+1
| | | | | | | | Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fix for #2765 (--no-fqdn regression in puppetrun)Markus Roberts2009-12-201-2/+2
| | | | | | | | | | | | | | | | | | This is basically the fix suggested on the ticket, cleaned up and ruby-ized, with tests. The only functional modification is leaving the default on entry2hash as --no-fqdn to preserve 0.25.1 behaviour as the default. Signed- ff-by: Markus Roberts <Markus@reality.com>
| * Closed #2937 - Migrated a number of requires to featuresJames Turnbull2009-12-181-12/+3
| |
| * Fix #2783, take2 - puppetdoc should use environment to get ↵Brice Figureau2009-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | modulepath/manifestdir I was told that setting manifestdir in environment is not supported. Only the manifest setting seems to be supported in environments. This patch changes how puppetdoc handles manifestdir, instead of getting it through the manifestdir variable, we now get the manifest settings and infer the directory from this, exactly as the parser is doing. This allows puppetdoc to handle what user are doing with environments. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch 'merge'Luke Kanies2009-12-212-11/+5
|\ \
| * | Merge branch '0.25.x'Luke Kanies2009-12-212-11/+5
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/agent.rb lib/puppet/application/puppetd.rb lib/puppet/parser/ast/leaf.rb lib/puppet/util/rdoc/parser.rb
| | * Fix for ticket #2700 -- check for @explicit_waitforcert in puppetd --testMarkus Roberts2009-11-201-1/+1
| | |
| | * Possible workaround for #2824 (MRI GC bug)Markus Roberts2009-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a moderately ugly workaround for the MRI garbage collection bug (see the ticket for details). I explored several other potential solutions (notably, monkey patching the routines that trigger the bug) but none of them were satisfactory. Monkey patching sub, gsub, sub!, gsub!, etc., for example, either changes the scoping of $~, $1, etc. in a way that could potentially subtly change the meaning of programs or (if you are clever) faithfully reproduces the behaviour of MRI--including the memory leak. I decided to go with the standardized and somewhat obnoxious never- used optional argument as it was easy to automatically insert and should be even easier to automatically find and remove if a better fix is developed. It also should be obtrusive enough to escape accidental removal in refactoring.
| | * Fix #2783 - Puppetdoc rdoc should use environment to get modulepath/manifestdirBrice Figureau2009-11-151-2/+3
| | | | | | | | | | | | | | | | | | | | | Puppetdoc wasn't using the current environment to find the correct modulepath and manifestdir. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | * Re-fixed #2750 - Stop disabling the CRL or checking for a disabled CRLJohn A. Barbuto2009-10-271-7/+0
| | | | | | | | | | | | | | | | | | This was deprecated in commit 1cfb0215 and was keeping puppetd from starting in listen mode. Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
| | * Fixed #2750 - Set :cacrl to nil instead of 'false' in puppetdJohn A. Barbuto2009-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The latter is deprecated and was keeping puppetd from starting. Also added a test and fixed a typo in another test. Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
* | | Fix for #2959 (calling exit status on a nil report)Markus Roberts2009-12-181-1/+3
|/ / | | | | | | Signed-off-by: Markus Roberts <Markus@reality.com>
* / Fix #1934 - detailed-exitcodes for puppetdDeepak Giridharagopal2009-11-192-6/+17
|/ | | | | | | | | | | | | | | | | | | | | | This option only works when --onetime is specified, as it doesn't make much sense to worry about exit codes in the context of a long-running daemon. This required a refactoring of the existing --detailed-exitcodes code, as "puppetd" wasn't directly creating a transaction object (like "puppet" does). Added Report::exit_status, which did what was previously hard-coded into the "puppet" executable. An Agent's "run" method now returns a value (the result of the individual client class' "run" method) The "puppetd" agent's "run" method now returns a transaction report, as that seems like the logical thing to return as the result of applying a catalog. Signed-off-by: Deepak Giridharagopal <deepak@brownman.org>
* Bundling of pure ruby json lib as "pson"Markus Roberts2009-10-172-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bundeling and renaming the pure ruby json library to addresses a number of cross version serliaization bugs (#2615, et al). This patch adds a subset of the files from the json_pure gem to lib/puppet/external/pson (renamed to avoid conflicts with rails) so that we will always have a known-good erialization format available. The pure ruby json gem as distibuted defers to the compiled version if it is installed. This is problematic in some circumstances so the files that have been brought over have been modified to always and only use the bundled version. It's a large patch, so here's a breakdown of the change categories: The majority of the lines are only marginally interesting: * The json lib itself (in lib/puppet/external/pson) make up the bulk of the lines. * Renaming of json to pson make up the second largest group. Somewhat more interesting are the following, which can be located by searching the diffs for the indicated strings: * Adjusting tests to reflect the changes * Changing the encoding/decoding behavior so that nested structures (e.g. resources) don't serialize as escaped strings. This should make it much easier to process the results with external tools, if needed. Search for "to_pson" and "to_pson_data_hash" * Cleaning up the envelope/metadata * Now provides a document_type (as opposed to a ruby class name) by using a symple registration scheme instead of constant lookup (search for "document_type") * Added an api_version (search for "api_version") * Added a hash for document metadata (search for "metadata") * Removing the yaml monkeypatch and instead disabling yaml serialization on ruby 1.8.1 in favor of pson (search for "yaml") * Cleaning up the json/rails feature interaction (they're now totally independent) (search for "feature")
* Fixed #2702 - Set :outputdir to "doc" if not specifiedJohn A. Barbuto2009-10-101-0/+1
| | | | Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
* Ticket 2559 -- parseonly ignored specified fileMarkus Roberts2009-08-221-0/+6
| | | | | | | | In the command-line option parsing refactor from 0.24.x the manifest specification was lost for --parseonly, so site.pp was always used. This patch adds the parsing back in. Signed-off-by: Markus Roberts <Markus@reality.com>
* Adding #2477 - puppet can apply provided catalogsLuke Kanies2009-08-021-8/+42
| | | | | | | | | | | | This provides the other half of #2440 - you can compile catalogs into json with puppetmasterd, and now you can take those json catalogs and apply them. This allows you to use whatever mechanism you want to ship the catalogs around. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2472. Load Facter facts when ralsh is invoked, plus test.Nigel Kersten2009-08-011-0/+2
|
* Fixing #2440 - catalogs can now be compiled on demandLuke Kanies2009-07-311-1/+27
| | | | | | | | | This uses the locally cached yaml facts and prints the catalog in json. It's meant to be used one-time, but you have to use puppetmasterd since we assume it's the executable correctly configured for compilation. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #2436 - Changed ralsh to use Puppet::Type.new and avoid deprecation noticeJames Turnbull2009-07-231-1/+1
|
* Added Markdown mode to puppetdoc to output Markdown.James Turnbull2009-07-101-3/+27
| | | | Requires the pandoc binary to function (http://johnmacfarlane.net/pandoc/).
* Fixed pi binary so --meta option works and updated documentationDavid Lutterkort2009-06-131-1/+1
| | | | Signed-off-by: James Turnbull <james@lovedthanlost.net>
* Fixed pi testsJames Turnbull2009-06-121-1/+7
|
* Fixed #2222 - Cleanup pi binary options and --help outputJames Turnbull2009-06-121-14/+4
|
* Partial fix for #2329James Turnbull2009-06-061-1/+1
|
* Removed extra whitespace from end of linesIan Taylor2009-06-062-3/+3
|
* Disabling the catalog cache, so puppetqd is compatible with storeconfigsLuke Kanies2009-06-031-0/+6
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2237 - client_yaml dir is always created by puppetdLuke Kanies2009-05-281-0/+2
| | | | | | | This is just a simple call to Puppet.use in the puppetd setup method. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2228 - --logdest works again in puppetd and puppetmasterdLuke Kanies2009-05-272-2/+2
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2248 - --no-client correctly leaves off clientLuke Kanies2009-05-271-1/+1
| | | | | | | All of the settings were there, we just weren't doing anything about them. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2243 - puppetrun works againLuke Kanies2009-05-271-1/+4
| | | | | | | | The problem was that some defaults were nil but had to be 'false', because xmlrpc can't serialize 'nil' as an rpc argument. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #2280 - Detailed exit codes fixJames Turnbull2009-05-271-1/+1
|
* Adding some usability bits to puppetqdLuke Kanies2009-05-181-3/+21
| | | | | | | There's better logging, and it's a bit more exception-friendly. Signed-off-by: Luke Kanies <luke@madstop.com>
* Relying on threads rather than sleeping for puppetqdLuke Kanies2009-05-181-5/+1
| | | | | | | | We previously manually slept, but this uses the queue client to handle keeping the process running, by just joining all running threads. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2273 - CA location is set correctly in puppetcaLuke Kanies2009-05-171-1/+1
| | | | | | It's set to 'only' instead of 'local'. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2200 - puppetqd expects Daemon to be a classLuke Kanies2009-05-041-10/+12
| | | | | | | | | | | I *swear* I wrote tests for the daemon, but I can't find them in any of my branches so I rewrote them. In the course of writing them, I also fixed the usage of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>
* puppetmasterd can now run as a standard Rack application (config.ru-style)Christian Hofstaedtler2009-05-021-5/+17
|
* Fixed puppetqd require and tweaked stomp library error messageJames Turnbull2009-04-261-5/+5
|
* Fixing #2149 - Facts are passed as part of the catalog requestLuke Kanies2009-04-221-1/+0
| | | | | | | | | | | | | | | This removes the requirement of shared fact caching on the servers, since the server responding to the catalog request will receive the facts as part of the request. The facts are serialized as a parameter to the request, rather than each being set as a separate request parameter. This hard-codes yaml as the serialization format for the facts, because I couldn't get marshal to work and it's just not as big a deal for such a small amount of data. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing code that was backported and is now not neededLuke Kanies2009-04-221-49/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>