summaryrefslogtreecommitdiff
path: root/lib/chef/application
Commit message (Collapse)AuthorAgeFilesLines
* [SHACK-290] Unpacking tarball paths suffer from URI errortyler-ball2018-08-031-3/+3
| | | | | | | | | | | | | Original error: https://github.com/chef/chef-apply/pull/9 I thought I fixed this in https://github.com/chef/chef/pull/7223 but it turns out relative or absolute paths continue to match the URI regular expression. This means that Windows continues to fail to unpack policyfile tarballs. Reversing the order of these checks ensures that real paths do not fall prey to the URI error. Signed-off-by: tyler-ball <tball@chef.io>
* Merge pull request #7390 from coderanger/yet-more-credsLamont Granquist2018-07-031-0/+1
|\ | | | | knife config and a bunch of UX improvements
| * Merge branch 'master' into yet-more-credsNoah Kantrowitz2018-07-024-9/+9
| |\ | | | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * \ Merge branch 'master' into yet-more-credsNoah Kantrowitz2018-07-026-469/+468
| |\ \ | | | | | | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * | | Add support for a $CHEF_HOME environment variable and improve support for ↵Noah Kantrowitz2018-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | the existing $KNIFE_HOME. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | | | fix Style/MutableConstantLamont Granquist2018-07-025-8/+8
| |_|/ |/| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | fix Style/PreferredHashMethodsLamont Granquist2018-07-024-9/+9
| |/ |/| | | | | | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Style/UnneededInterpolationLamont Granquist2018-07-023-4/+4
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Layout/IndentHeredocLamont Granquist2018-07-021-6/+6
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Style/HashSyntaxLamont Granquist2018-07-026-459/+458
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* check the path to --recipe-urlwindows-open-uriThom May2018-05-041-3/+7
| | | | | | Provide the user with feedback if it's invalid or missing. Signed-off-by: Thom May <thom@chef.io>
* Trying to use --recipe-url on Windows with local file failstyler-ball2018-05-031-3/+7
| | | | | | | I'm guessing open-uri doesn't handle local file paths well with `open`? Either way this fixes the issue. Signed-off-by: tyler-ball <tyleraball@gmail.com>
* Updating a few logging references to include :tracesp/cli-logging-optionsStuart Preston2018-04-253-3/+3
| | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* mechanical conversion of most debug log statements to traceThom May2018-03-263-16/+16
| | | | Signed-off-by: Thom May <thom@chef.io>
* fix legacy mode and legacy mode testsLamont Granquist2018-02-261-3/+7
| | | | | | | also more broadly applies the integration tests to legacy mode which was the original intent of the chef-solo tests in client_spec.rb here Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Don't use supervisor process for one-shot / command-line runsLamont Granquist2018-02-261-3/+7
| | | | | | | | without --interval we default to --no-fork, with --interval we default to running --fork. --once and --daemonize are handled before this code so they will also DTRT. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Allow tarballs generated by chef export to be usedtm/policyful_tarballsThom May2018-02-201-0/+2
| | | | | | | If we find a config file in the exported tarball, load it up. This way we can use --recipe-url with the direct results of `chef export -a` Signed-off-by: Thom May <thom@chef.io>
* Revert "Fail on interval runs on windows"Lamont Granquist2018-01-232-31/+7
|
* fail on interval runs on windowslcg/windows-intervalLamont Granquist2018-01-222-6/+18
| | | | | | closes #4824 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* This isn't chef-client, probably an old copy-pasta.Noah Kantrowitz2018-01-221-2/+2
|
* Add a warning about using --interval on Windows.Noah Kantrowitz2018-01-222-3/+15
|
* Remove deprecated -r option for Solo modedash_r_soloTim Smith2018-01-011-8/+1
| | | | | | | We claimed we were going to remove this in Chef 13. Let's stop rewriting ARGs now. Signed-off-by: Tim Smith <tsmith@chef.io>
* Specify a profile on the command lineThom May2017-12-181-0/+4
| | | | Signed-off-by: Thom May <thom@chef.io>
* Sleep for another interval after handling SIGHUPGiedrius Rekasius2017-10-091-1/+1
| | | | | | | Signed-off-by: Giedrius Rekasius <giedrius.rekasius@gmail.com> This resolves a bug that caused chef-client service to go into infinite sleep after handling SIGHUP.
* Always run reconfigure between runs, and when HUP'dBryan McLellan2017-05-311-21/+24
| | | | | | | | | | | | | We can't reconfigure in a trap context because we might open files or another activity that could cause a deadlock. Ruby 2.0+ now prevents this by raising a ThreadError. This now runs reconfigure after every daemonized run, but still takes a HUP in case you need to reconfigure while sleeping. Fixes #4578 Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Calling reconfigure outside trap('HUP')nimisha2017-05-311-0/+6
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Change the default listen mode to false.Noah Kantrowitz2017-05-252-2/+2
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Make non-legacy solo use socketless mode.Noah Kantrowitz2017-05-241-0/+1
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Chef-13: restore log_location in client.rbLamont Granquist2017-04-061-1/+16
| | | | | | | | | | This was probably a bit too aggressive. There are people who pass logger objects in client.rb directly into the log_location, and we'd break them, and there's no general solution. We have a couple of the popular configs that can be passed in as symbols, but not the general case. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove logger magic from the windows serviceLamont Granquist2017-04-051-17/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* removing the use of Chef::Exception::DeprecatedExitCodesmurawski/exit_status_defaultSteven Murawski2017-04-042-12/+4
| | | | Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
* use rfc exit codesSteven Murawski2017-04-041-72/+11
| | | | Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
* Remove Chef::RESTtm/remove_chef_restThom May2017-03-161-1/+0
| | | | Signed-off-by: Thom May <thom@chef.io>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-135-48/+43
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix --no-fips on chef-clientbtm/no-fipsBryan McLellan2017-02-021-1/+1
| | | | | | | Somewhat unintuitively, mixlib-cli needs both `boolean => true` as well as `long => "--[no-]option"` for the boolean feature to work. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* fix Style/MultilineIfModifierLamont Granquist2016-12-061-4/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5547 from chef/lcg/unified-integerLamont Granquist2016-11-161-1/+1
|\ | | | | Core: fix Lint/UnifiedInteger cop
| * fix Lint/UnifiedInteger copLamont Granquist2016-11-151-1/+1
| | | | | | | | | | | | believe this becomes necessary for ruby 2.4/3.0 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-2/+2
|/ | | | | | | | 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>
* fixes for rubocop 0.44.1 enginelcg/rubocop-0.44.1Lamont Granquist2016-10-202-3/+3
| | | | | | a few cops we have enabled got a little more accurate/stricter Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Adding support for rfc 62 exit code 213Jeremy J. Miller2016-10-061-0/+9
| | | | Signed-off-by: Jeremy J. Miller <jm@chef.io>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-172-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge branch 'master' into configoptionNoah Kantrowitz2016-08-022-4/+11
|\
| * Use Mixlib::Archive to extract tarballsThom May2016-07-072-4/+4
| | | | | | | | | | | | | | this allows us to be truely cross platform, and also to ignore unsafe paths and permissions. Signed-off-by: Thom May <thom@chef.io>
| * Ensure that chef-solo uses the expected repo dirtm/correct_repo_pathThom May2016-06-241-0/+7
| | | | | | | | | | | | | | | | | | Solo has always defaulted to `/var/chef` but local-mode uses the user's home directory, so we need to ensure that we set the correct path before entering local-mode. Fixes: #5051 Signed-off-by: Thom May <thom@may.lt>
* | First pass on --config-option handling.Noah Kantrowitz2016-06-213-0/+24
|/
* Merge pull request #4957 from chef/tm/solo_fixesThom May2016-05-311-1/+9
|\ | | | | Ensure recipe-url works right in solo
| * Ensure recipe-url works right in solotm/solo_fixesThom May2016-05-201-1/+9
| | | | | | | | Signed-off-by: Thom May <thom@chef.io>
* | * define exit codesSteven Murawski2016-05-235-12/+238
|/ | | | | | | | | | | | * exit code functional specs * audit exit codes * reboot now/reboot failed/reboot pending exit codes * Deal with forked and unforked process and get the right exit code * Reboot Now should really be reboot scheduled * pass exception rather than exit code * updated with sigint and sigterm * support legacy fatal!("", 2) behavior * fixup all fatal! and exit! calls
* move legacy config into a separate functiontm/zoloThom May2016-05-161-26/+29
| | | | | | per review Signed-off-by: Thom May <thom@may.lt>