summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | 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>
| | * | Cleanup indentation, comment, and unused codeNick Lewis2011-06-102-30/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Great Reindentation of '10 left certain structures indented incorrectly; this addresses some of these instances. The comment about loading all providers incorrectly stated that we're trying to figure out the type, when we're actually trying to figure out the provider. There was an unused variable initialization that was introduced in 2b14f627, which was reverting c19835c, 9290cc8, and ffb4c2d. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | Clean up indentation, whitespace, and commented out codeJacob Helwig2011-06-281-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mis-indented code, extra newlines, and commented out code were noticed while investigating the order dependent test failure fixed in 4365c8ba. Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | Merging up 2.7.1Michael Stahnke2011-06-222-3/+1
| |\ \ \
| | * | | Updating for 2.7.1 release.Michael Stahnke2011-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
| | * | | (#8048) Gem install puppet no longer fails if rdoc enabled.Michael Stahnke2011-06-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rdoc wouldn't parse lib/puppet/interface/options.rb The offending code has been removed. This was causing issues for users wishing to upgrade puppet, via gem or puppet. Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
| * | | | Merge branch 'ticket/2.7.x/7224' into 2.7.xNick Lewis2011-06-142-7/+46
| |\ \ \ \
| | * | | | (#7224) Reword 'hostname was not match' error messageNick Lewis2011-06-141-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error message is grammatically incorrect and unhelpful, so we replace it with a message that explains more correctly what went wrong and what was expected. This message happens when making an authenticated connection to a server where the certificate doesn't match its hostname. This happens in the REST terminuses, so we wrap their HTTP methods with a helper that will catch the appropriate SSLError and re-raise it with the better message stating the hostname used, and the list of hostnames that we were expecting it to be a part of. Unfortunately, because the certificate in question isn't available at error time, we have to use the Net::HTTP#verify_callback to capture it. Paired-With: Jacob Helwig <jacob@puppetlabs.com> Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
| | * | | | (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate namesNick Lewis2011-06-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternate names, if present, are specified in the subjectAltName extension of the certificate. The values are in the form: "DNS:alternate_name1, DNS:alternate_name2" This helper will retrieve the value of the subjectAltName extension and extract the alternate names, returning and empty list if the extension is absent. This will make it easier to access the entire list of possible names for a certificate, rather than just the common name; this is helpful for generating more detailed SSL error messages. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | (#5641) Help text: document that puppet doc takes modulepath, manifestdir, ↵nfagerlund2011-06-131-12/+23
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and environment options Puppet doc didn't have the usual subcommand caveat about configuration settings being valid command line options, nor did it explicitly call out the three settings that it actually cares about. I opted to do the latter, since the number of relevant settings was so small. Note that --environment is currently broken; this is filed as bug #7907.
* | | | | Clean up indentation, whitespace, and commented out codeJacob Helwig2011-06-171-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mis-indented code, extra newlines, and commented out code were noticed while investigating the order dependent test failure fixed in 4365c8ba. Reviewed-by: Max Martin <max@puppetlabs.com>
* | | | | Merge branch '2.7.x'Nick Lewis2011-06-0836-323/+582
|\| | | |
| * | | | Merge branch '2.7rc' into 2.7.xNick Lewis2011-06-0829-303/+533
| |\| | |
| | * | | (#7833) Several help text/template editsnfagerlund2011-06-0811-32/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes the following changes: * Changes wrapping on some "returns" blocks to accomodate the way we prepend "RETURNS: " to the first line in short help. * Overrides description for save on faces where save is invalid. (Since save has an inherited description, the description was contradicting the summary.) * Adds notes on dummy arguments to short_description where applicable, so as to show up in short help. * Adds the termini list to the action short help template. * Removes the authors block from short help for faces. (Save it for the man page.) * Several trivial wording changes. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| | * | | (#7828) Fix whitespace in synopsis generator.Daniel Pittman2011-06-073-42/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accidentally omitted whitespace between multiple options while building the synopsis. This fixes that, by introducing a breakable space in the right location. Additionally, we extract the code that was 99 percent identical from the face and action synopsis generators, push it down into the documentation module, and then invoke it from both places. This eliminates the duplicate code, allowing me to fix that bug once and have it apply to both parts of the code; this is pretty much assured to be true any time we change the synopsis generation. Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
| | * | | (#6873) Add Static Compiler terminus to 2.7.0Luke Kaines2011-06-071-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the static compiler terminus to the release. This wraps the default compiler terminus, and post-processes the catalog to rewrite every file reference using the 'puppet://' URI/protocol into filebucket references that use the MD5 checksum of the file contents. This provides a genuinely static catalog, in terms of content: there are no external dependencies that can change to make the behaviour of applying this catalog change. It also eliminates the describe calls from file checking, as all the metadata is stored locally in the catalog. This can be a substantial performance increase for nodes, especially those that manage large trees of recursive files. To use this set the `catalog_terminus` to `static_compiler`; the resultant catalog will then reference only static content. This does not, however, put the required files into the filebucket on the client. There are some limitations of this code: * Files are all read into memory rather than streamed. This will definitely cause problems with large files, but the filebucket doesn't currently handle streaming. * We think the recursion behavior is equivalent, but can't really guarantee it without a good bit of testing. * You have to populate the client filebucket manually. We don't have any support for doing this automatically, not even through variant access to the catalog downloader. * Behavior on the server is currently undefined if your puppet masters are behind a load balancer and they're configured to do fileserving through that load balancer. It should work, but it probably won't be that fast. You can see https://github.com/lak/puppet-static-compiler for the original prototype this was inherited from, which includes some example code for scanning the downloaded catalog and fetching resources into the filebucket. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| | * | | Merge branch 'bug/2.7rc/7728-resource-failure-leads-to-extra-warnings' into ↵Daniel Pittman2011-06-071-2/+20
| | |\ \ \ | | | | | | | | | | | | | | | | | | 2.7rc
| | | * | | (#7728) Suppress notifications from container whits.Daniel Pittman2011-06-071-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduced changes to our graph to reduce the number of edges when we had container dependencies. As part of this the 'whit' object was created, and used as an intermediate vertex to simplify processing. During that change we introduced additional reporting, based on those whit objects, about containment relationships during resource application failure. Specifically, we would now report that the containing class(es) and stages of any failed resource were failed, point-blank. This was unclear, because the entire class had not failed, but only part of it, but also unhelpful, because it turned a single failure into at least one additional report that contained no additional information. Now, instead, we suppress reporting for the whit resources. We still process them identically; just the report is eliminated. It isn't absolutely clear that this is the correct long term direction for handling these objects, but it is the minimal change for the RC release. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| | * | | | (#7764, 7775, 7778) Revisions to Faces help textnfagerlund2011-06-0723-209/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per UX review of help text, this commit makes several changes over the breadth of the Faces help: * Preface API-only action summaries/descriptions with "API only." (issue #7775) * Provide both CLI and API info in "returns," with the CLI info first. (issue #7778) * Summaries should be sentences. (Add punctuation.) * First sentences of descriptions should reiterate summaries. (Summaries and descriptions should be displayed far enough apart that this isn't a problem.) * Standardize on "subcommand" instead of "face" when talking about the entity you invoke at the command line. (Use "face" when describing API use.) * Fix outdated or clunky text in several faces.
| | * | | | (#7773, 7776, 7764) Several help template tweaksnfagerlund2011-06-074-30/+19
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per UX review of help output, this commit makes several changes to templates and shared help text: * Change "unknown" to "undocumented" * Remove copyright from short help * Point readers to the man pages (issue 7773) * Remove examples from short help (issue 7776) * Remove summary from short help and make it a fallback for description * Edit common option summaries to fit on a single 80-col line
| * | | | Merge branch '2.6.x' into 2.7.xNick Lewis2011-06-087-20/+49
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb lib/puppet/application/apply.rb lib/puppet/configurer.rb lib/puppet/configurer/fact_handler.rb spec/unit/application/apply_spec.rb spec/unit/configurer/fact_handler_spec.rb spec/unit/configurer_spec.rb
| | * | | (#2128) Add WARNING for node_name_{fact,value} descriptionsJeff McCune2011-06-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor change to add a WARNING string as per feedback from UX. Reviewed-by: Randall Hansen <randall@puppetlabs.com>
| | * | | (#2128) Whitespace only reflow commitJeff McCune2011-06-081-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of puppet --genconfig was showing a blank line between the description of the option and the default value line. This is because of the here document being used in the first commit. This change replaces the HERE document with a normal string that does not contain a final newline. In addition, the indentation of one of the default options was using 4 spaces instead of 2 and this has been corrected.
| | * | | (#2128) In-line docs for node_name_{fact,value}Jeff McCune2011-06-081-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change augments the in-line documentation for the node_name_fact and node_name_value configuration settings. These settings will not work effectively without additional changes elsewhere in the system, e.g. to auth.conf. In order to help the end user land softly if they choose to change these settings, a short link URL we control and can redirect has been added to each setting. These currently point to the community Wiki but may be redirected to docs.puppetlabs.com in the future.
| | * | | (#650) Allow symlinks for configuration directoriesNick Lewis2011-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, pointing a setting like 'confdir' at a symlink to a directory would replace the symlink with a directory. This was because files created by settings implicitly managed links, rather than following them. This behavior is now changed so that file settings will follow links. The behavior of these symlinks is the same as any other file resource. That is, if the target of the symlink doesn't exist, Puppet will consider this an error. Similarly, if the target of the symlink is a file, then the symlink will still be replaced with a directory, rather than replacing its target. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
| | * | | Merge branch 'ticket/2.6.x/2128' into 2.6.xNick Lewis2011-06-065-19/+37
| | |\ \ \
| | | * | | (#2128) Add support for setting node name based on a factNick Lewis2011-06-063-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the node_name_fact setting, which specifies a fact to use to determine the node name. This allows dynamically determining the node name without having to modify puppet.conf or command line options. Using this setting requires modifying auth.conf to allow nodes to request catalogs not matching their certnames. For example, this would allow any authenticated node to retrieve any catalog: # $confdir/auth.conf path ~ /catalog/.+ allow * The node_name_fact and node_name_value options are mutually exclusive, because it is ambiguous which setting should take precedence. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | (#2128) Get facts before retrieving catalogNick Lewis2011-06-061-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retrieving a catalog and getting the facts to submit with the catalog request are distinct operations, and should be done separately. This is also to prepare for adding the ability to determine the node name based on a fact, in which case the node name needs to be determined before it is used for either the catalog or the report. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | (#2128) Add the ability to specify a node nameNick Lewis2011-06-065-8/+9
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting node_name_value may now be used for 'puppet apply' or 'puppet agent' to specify the name for the node. This will not affect the certificate used by the node, and the node will still be authenticated based on its certname. The default value for node_name_value is the certname. This is useful for eg. EC2 nodes whose random hostnames cannot be easily used to classify them. Paired-With: Jacob Helwig
| | * | | Merge branch ↵Ben Hughes2011-06-031-1/+1
| | |\ \ \ | | | |/ / | | |/| | | | | | | 'ticket/2.6.x/6885-puppet-agent-fingerprint-requires---verbose-to-return-a-value' into 2.6.x
| | | * | (#6885) puppet agent fingerprint requires --verbose to return a value.Ben Hughes2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always output the fingerprint to STDOUT, no matter what loglevel is used, as that's the whole purpose of the comment. Having to specify --verbose in addition to --fingerprint to get the finger is nonsensical. Update the spec test to stub @puppet puts, instead of the Puppet.logging facilities. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | | | Merge branch '2.7.x'Matt Robinson2011-06-064-37/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (#7624) Manually fetch all properties in instances. (#7193) Fix path issues with acceptance tests that call old shell tests (#7632) Make secret_agent application compatible with secret_agent face (#7624) Auditing should not be enabled by default for purged resources. maint: Confine augeas specs to require the augeas feature (#2728) Add diff output for changes made by Augeas provider
| * | | | Merge branch '2.7rc' into 2.7.xMatt Robinson2011-06-063-20/+12
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7rc: (#7624) Manually fetch all properties in instances. (#7193) Fix path issues with acceptance tests that call old shell tests (#7632) Make secret_agent application compatible with secret_agent face (#7624) Auditing should not be enabled by default for purged resources.
| | * | | Merge branch 'bug/2.7rc/7624-resource-purging-causes-audit-messages' into 2.7rcDaniel Pittman2011-06-061-1/+9
| | |\ \ \
| | | * | | (#7624) Manually fetch all properties in instances.Luke Kaines2011-06-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we removed the `:audit => :all` flag on creation of an instance from a Puppet type, we stopped fetching all the properties. This had flow-on consequences that were visible from the outside; while some places did their own work to ensure that properties were fetched, others didn't. We now open-code the loop that creates and fetches those properties, to ensure that we have the same data without going through the :audit machinery. This resolves the excessive logging, and also eliminates the behavioural change that we introduced in the previous commit. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| | * | | | (#7632) Make secret_agent application compatible with secret_agent facenfagerlund2011-06-062-19/+3
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running `puppet secret_agent` was failing with an error in validate_args (in interface/action.rb), because the application was trying to pass the certname as an argument to the synchronize action. Also, it was trying to submit the report a second time. Reviewing the code with Nick0, we found that the application wasn't inheriting from FaceBase and was duplicating a lot of work, and were able to resolve the issue by basically deleting the whole thing. This patch makes secret_agent behave like the other Faces apps, and makes synchronize the default action of the secret_agent face. We left the `run_mode :agent` line in the application because of bug #7802. Paired-with: Nick Lewis <nick@puppetlabs.com>
| | * | | (#7624) Auditing should not be enabled by default for purged resources.Dan Bode2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Auditing creates logging messages as of 2.6.5 so it should not be enabled by default. - This patch removes the :audit => :all settting from resources created via self.instances (which is used for purging). Please note that we believe this change to be safe, and *should* not result in user-visible behavioural differences when you use the `instances` method on a type, but we can't give you a perfect assurance of that. If you do have code that depends on the current behaviour, and it misbehaves after this patch, please let us know so we can weep ^W find another solution that works for everyone. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com> Reviewed-By: Nigel Kersten <nigel@puppetlabs.com>
| * | | | (#2728) Add diff output for changes made by Augeas providerMichael Knox2011-06-021-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Utilising Augeas's SAVE_NEWFILE mode (similar to augtool -n) to determine the changes that will be made be made by Augeas. Output a unified diff to info handle non-default root, and multiple files correctly Adding tests for Augeas diff functionality Add test for non-default :root when diff'ing Ensure that multiple files are diffed if changed, not just one Signed-off-by: Josh Cooper <josh@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | Merge branch '2.7.x'Max Martin2011-06-0242-647/+1146
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (40 commits) (#7746) Fix bootstrap issues from #7717 fix. (#7683) Use ronn, when available, to render the output. (#7683) Add a 'man' face and subcommand to Puppet. maint: remove obsolete work-around code from help face. (#7699) Don't duplicate inherited action names on faces. (#7177) Deprecate implicit 'puppet apply' for 2.7.0 (#7717) Layout cleanup for subcommand extraction. #7211: Test unknown options don't shadow unknown actions. #7211: nasty logic error with global Face options taking arguments. #7211: more helpful error messages in various cases. maint: Fix order dependent test failure (#5966) Add support for hostname regular expressions in auth.conf (#7708) Delete extended documentation from configuration reference (#7707) Document signals in puppet agent and puppet master help add puppet master polling step for ticket 7117 (#5318) Always notice changes to manifests when compiling. (#5318) Always notice changes to manifests when compiling. (#7557) Remove Faces Application maint: Fix order dependent spec failure for face indirection (#7690) Don't blow up when listing terminuses available for faces ... Conflicts (resolved manually): acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
| * | | | Merge branch '2.7rc' into 2.7.xMax Martin2011-06-0212-242/+260
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7rc: (24 commits) (#7746) Fix bootstrap issues from #7717 fix. (#7683) Use ronn, when available, to render the output. (#7683) Add a 'man' face and subcommand to Puppet. maint: remove obsolete work-around code from help face. (#7699) Don't duplicate inherited action names on faces. (#7177) Deprecate implicit 'puppet apply' for 2.7.0 (#7717) Layout cleanup for subcommand extraction. #7211: Test unknown options don't shadow unknown actions. #7211: nasty logic error with global Face options taking arguments. #7211: more helpful error messages in various cases. (#7708) Delete extended documentation from configuration reference (#7707) Document signals in puppet agent and puppet master help add puppet master polling step for ticket 7117 (#5318) Always notice changes to manifests when compiling. (#7557) Remove Faces Application maint: Fix order dependent spec failure for face indirection (#7690) Don't blow up when listing terminuses available for faces maint: Dedup the loadpath so we don't have to walk it multiple times Maint: Fix ellipses for short descriptions (#7563) DRY: Remove indirector boilerplate from individual faces ... Conflicts (resolved manually): acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb lib/puppet/application/faces.rb lib/puppet/face/help/man.erb lib/puppet/indirector/face.rb spec/shared_behaviours/documentation_on_faces.rb
| | * | | (#7746) Fix bootstrap issues from #7717 fix.Daniel Pittman2011-06-011-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, turns out the fix in #7717 introduced a failure when starting the Puppet master on some versions of Ruby. Weird stuff. I figured it out, eventually. You see, the process of bootstrapping Puppet is ... complex. This file, like many of our early initialization files, has an incestuous relationship between the order of files loaded, code executed at load time, and code executed in other files at runtime. When we construct this object we have not yet actually loaded the global puppet object, so we can't use any methods in it. That includes all the logging stuff, which is used by the deprecation warning subsystem. On the other hand, we can't just load the logging system, because that depends on the top level Puppet module being bootstrapped. It doesn't actually load the stuff it uses, though, for hysterical raisins. Finally, we can't actually just load the top level Puppet module. This one is precious: it turns out that some of the code loaded in the top level Puppet module has a dependency on the run mode values. Run mode is set correctly *only* when the application is loaded, and if it is wrong when the top level code is brought in we end up with the wrong settings scattered through some of the defaults. Which means that we have a dependency cycle that runs: 1. The binary creates an instance of P::U::CL. 2. That identifies the application to load. 3. It does, then instantiates the application. 4. That sets the run-mode. 5. That then loads the top level Puppet module. 6. Finally, we get to where we can use the top level stuff So, essentially, we see a dependency between runtime code in this file, run-time code in the application, and load-time code in the top level module. Which leads me to our current horrible hack: we stash away the message we wanted to log about deprecation, then send it to our logging system once we have done enough bootstrapping that it will, y'know, actually work. I would have liked to fix this, but that is going to be a whole pile of work digging through and decrufting all the global state from the local state, and working out what depends on what else in the product. Oh, and we use a global because we have *two* instances of a P::U::CL object during the startup sequence. I don't know why. Reviewed-By: Nigel Kersten <nigel@puppetlabs.com> Reviewed-By: Nick Lewis <nick@puppetlabs.com> Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
| | * | | (#7683) Use ronn, when available, to render the output.Daniel Pittman2011-06-011-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now look for ronn(1), and if it is available ask it to generate the *roff output, delegate that to man(1) directly, and show the result to the user in their pager. If ronn(1) isn't available we delegate to $MANPAGER, $PAGER, less, most, or more, in that order, to paginate the raw markdown. Not nearly so nice, but better than doing nothing. Finally, if none of those pagers are available we fall through to the default behaviour of puppet rendering the output, which more or less results in a direct dump to the console. Nice. Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
| | * | | (#7683) Add a 'man' face and subcommand to Puppet.Daniel Pittman2011-06-012-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the minimal wrapper, cloning a good deal of the logic from help, that runs our face through the 'man' template and returns ronn-formatted Markdown. This provides the crudest baseline possible for getting man-style output, but lets us move forward to improve behaviour. Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
| | * | | maint: remove obsolete work-around code from help face.Daniel Pittman2011-06-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application wrapper for help used to disable the inherited 'render' method from FaceBase - specifically, to avoid the behaviour of rendering strings poorly. Now that we have support for good output in the upstream method, this is unnecessary, so we can eliminate the stub method entirely and use the default behaviour. (This also enables rendering the help into JSON or YAML, against the odds that someone actually cares about that. ;)
| | * | | (#7699) Don't duplicate inherited action names on faces.Daniel Pittman2011-06-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We earlier moved to duplicating Action objects in the Faces subsystem to ensure they had the correct binding context during execution and introspection. This was correct, but introduced a bug where we would report both the parent and child binding as separate entries with duplicate names, in the list of actions. This flowed on to the help output, where it would cause every inherited action to be listed twice: once on the parent, once on the child. (This was actually worse if the inheritance was deeper: we would duplicate once for every level between the instance and the origin of the action.)
| | * | | (#7177) Deprecate implicit 'puppet apply' for 2.7.0Daniel Pittman2011-06-011-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in prehistory (eg: 0.25 era), 'puppet' was the name for the agent, and could be used directly to apply a manifest as well as to communicate with the puppet master process. During the 2.6 series we moved to a single binary, but continued to support older scripts by detecting invocations that looked like the traditional scripting uses and implicitly turning those into a call to 'puppet apply'. Now, with the 2.7.0 release, we are moving to deprecate that behaviour. We still do the same detection, and still run the old manifests, but we now emit a deprecation warning directing people to use 'puppet apply' directly. We intend to remove the behaviour entirely in the 2.8 release, which also paves the way to nicer handling of the command line. Reviewed-By: Randall Hansen <randall@puppetlabs.com> Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
| | * | | (#7717) Layout cleanup for subcommand extraction.Daniel Pittman2011-06-011-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This transforms the layout of the code, to make it easier to work with, but makes no functional changes. Done separately to make clearer the functional changes vs the non-functional changes.
| | * | | #7211: nasty logic error with global Face options taking arguments.Daniel Pittman2011-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A logic error meant that global Face options that took arguments were mishandled: we never consumed the argument, so we read this: puppet facts --render-as json find $(hostname) ...as meaning "invoke the 'json' action on the 'facts' face"... This fixes that problem, so we now correctly handle both optional and non-optional arguments to global Face options.