summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
Commit message (Collapse)AuthorAgeFilesLines
* Replacing workmarks with distro constantsMarc Chamberland2019-04-191-7/+8
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* another chefspec fixLamont Granquist2019-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix for chefspecLamont Granquist2019-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* make the run_context a proper instance variableLamont Granquist2019-03-151-1/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add some backcompat for chefspecLamont Granquist2019-03-151-2/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Early alloction of the Chef::RunContextLamont Granquist2019-03-141-25/+30
| | | | | | | | | Allow for allocation of the Chef::RunContext without its arguments and use that to allocate it early. The APIs are kept backcompatible since otherwise this has a decent chance of blowing up something like chefspec. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove more converge_exceptionLamont Granquist2019-03-121-3/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* resimplify + fix specsauditLamont Granquist2019-03-121-23/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* unnecessary conditionalLamont Granquist2019-03-111-8/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* revert back to properly catching errorsLamont Granquist2019-03-111-3/+14
| | | | | | pretty sure audit mode broke this ages ago Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* more bizarre cruft removal in Chef::ClientLamont Granquist2019-03-111-20/+7
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove register_reportersLamont Granquist2019-03-111-12/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-111-98/+9
| | | | | | | | This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Extract Action Collection from Data CollectorLamont Granquist2019-03-111-34/+9
| | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Don't system exit on ohai CriticalPluginFailure (#8098)Joshua Miller2019-01-091-3/+0
| | | Signed-off-by: Joshua Miller <joshmiller@fb.com>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-031-1/+1
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* minimal_ohai: Add init_package plugin as a required plugininit_package_pluginTim Smith2018-11-221-1/+1
| | | | | | | This is a pretty critical bit of data and we're using it for decisions in the timezone resource now. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update script resource deprecation waringscript_resourceTim Smith2018-09-171-1/+1
| | | | | | Also update todos to be YARD. Signed-off-by: Tim Smith <tsmith@chef.io>
* First pass on an implementation for https://github.com/chef/chef-rfc/pull/305Noah Kantrowitz2018-06-051-0/+3
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Merge pull request #7016 from chef/tm/chef_guidThom May2018-03-211-0/+23
|\ | | | | Save the node's UUID as an attribute
| * Save the node's UUID as an attributetm/chef_guidThom May2018-03-211-0/+23
| | | | | | | | | | | | | | We generate the UUID as part of the data collector report, but we didn't make that available to the node or the chef server otherwise. Signed-off-by: Thom May <thom@chef.io>
* | Add the ability to inject log objectstm/inject_logThom May2018-03-191-29/+32
|/ | | | | | meaning that we can have inheritable metadata Signed-off-by: Thom May <thom@chef.io>
* prepping for rubocop 0.52.1lcg/rubocop-0.52.1Lamont Granquist2018-01-171-11/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Makes life easier for hook authors switching from the older report handler ↵Noah Kantrowitz2017-11-271-2/+2
| | | | | | syntax. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Add ohai_time to minimal_ohai filterbtm/minimal_ohai_timeBryan McLellan2017-11-141-1/+1
| | | | | | | We need ohai_time to get the 'Last Check-In' time on the Chef Server. There is really no risk to including it. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Support new CriticalOhaiPlugins (#6486)Phil Dibowitz2017-10-091-0/+3
| | | | | We should not stack-trace, we should exit with a clean error Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Clarify log messaging for required recipe featuredanielsdeleo2017-04-101-1/+2
| | | | | | | The previous log message didn't have enough context and could sound "scary" to users unfamiliar with the feature. Signed-off-by: Daniel DeLeo <dan@chef.io>
* chefstyle fixessdelano2017-04-061-27/+24
| | | | Signed-off-by: Stephen Delano <stephen@chef.io>
* server enforced required recipesdelano2017-04-061-0/+47
| | | | | | | | | | | when the chef-server is configured to serve a requried recipe, chef-client shall load the recipe into the run context and execute it as part of the converge phase. if the chef-server is NOT configured, it will return a 404 and chef-client will continue normally. Signed-off-by: Stephen Delano <stephen@chef.io>
* CHEF-13: remove magic from the logger/formatter settingsLamont Granquist2017-04-051-1/+1
| | | | | | closes #2514 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: Remove deprecated Chef::Client attrsLamont Granquist2017-03-211-10/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-0/+1
| | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* Creation of the new DataCollector reporterAdam Leff2016-06-021-0/+8
| | | | | | | | | | | | | | | | | The DataCollector reporter is a new method for exporting data about your Chef run. The details of this new feature can be found in [RFC 077](https://github.com/chef/chef-rfc/blob/master/rfc077-mode-agnostic-data-collection.md). Using the existing `EventDispatch` mechanics, the DataCollector reporter collects data about a Chef run (when it starts, when it ends, what resources were modified, etc.) and then POSTs them to a Data Collector server URL that can be specified in your Chef configuration. While similar functionality exists using the `ResourceReporter` and Chef Reporting, a new implementation was done to decouple the reporting of this data from requiring the use of a Chef Server (in the case of Chef Reporting), opening the door to users being able to implement their own webhook-style receiver to receive these messages and analyze them accordingly.
* Ensure that solo specific code is run at the proper timeThom May2016-05-161-3/+3
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* Log platform along with client version and pid.Chris Doherty2016-03-171-0/+1
|
* fix some UselessAssignment caseslcg/useless-assignmentLamont Granquist2016-03-141-2/+0
|
* autofixing whitespace copsLamont Granquist2016-02-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-4/+4
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* fix typo in commentLamont Granquist2016-01-271-1/+1
|
* suppress reporter failures by using validate_utf8=falselcg/suppress-reporter-failuresLamont Granquist2016-01-261-2/+22
| | | | | | | - doesn't turn off the utf8 validation in the rest of the rest API - has to use a different rest object because we have to pass options in the constructor - the handling of Chef::Config in Chef::Client is just awful
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-1/+1
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-141-40/+40
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-1/+1
| | | | chefstyle -a fixed 1044 occurrances
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-4/+4
|
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-4/+5
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* Use signing protocol 1.1 by defaultjdm/default-auth-1.1Jay Mundrawala2015-12-101-12/+0
| | | | | | | | | | | All supported Chef servers support the 1.1 signing protocol. There is no reason to continue using 1.0, and removing it as the default allows us to remove a bunch of code that tries to upgrade 1.0 to 1.1 when the node name is too long. If the user specifies 1.0 as the auth protocol version from this point on, they will have to guarantee that the node name is not too long.
* Use why-run vs. why_run or whyrunTim Smith2015-10-181-1/+1
|
* fix PR feedbacklcg/ruby-profilingLamont Granquist2015-10-131-5/+3
|
* lazy load ruby-profLamont Granquist2015-10-061-6/+3
|