| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Legally incredibly dubious, particularly since we don't follow it
strictly as policy, and we have git history instead, which does it right.
This is just a waste of time and a cargo cult.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
| |
This implements RFC-40 from the old chef rfc repo:
https://github.com/chef-boneyard/chef-rfc/blob/master/rfc040-on-demand-cookbook-libraries.md
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
| |
Lots more in lib, but that's out of scope for this. I'm just trying to
make it easier to debug a failing spec when needed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
|
| |
|
|
|
|
| |
We don't have Appveyor anymore.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8817
Note that if any calling code winds up seeing this error message:
```
NoMethodError: undefined method `set_cookbook_attribute' for nil:NilClass
```
That means that the cookbook_collection was set before the node was
set on the run_context. That wouldn't be a bug in core chef, that must
be fixed in the caller to reverse the order of operations.
Since I only made the positional arguments to the run_context constructor
optional in Chef-15.0 though I don't expect this breaks any existing code
written in the past month or two, but if anything crops up in the future,
consider this a definitive statement that the caller must reverse the
order of their operations and this error being thrown is a feature not
a bug to be fixed.
(The fact that we silently aborted rather than threw a NoMethodError on
NilClass meant that we shipped this defect -- sometimes defensive
programming can be overly defensive and swallow real errors).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
enforce pretzels.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
since we use double quotes, be consistent everywhere.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
| |
Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
|
| |
|
|
| |
Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is for the relicensing effort.
Note that this PR leaves the knife and ohai binstubs still in the
gem(s) while that discussion is still ongoing.
This PR extracts the binstubs to chef-binstubs gem which is not intended
to be redistributed outside of the omnibus chef binaries.
A blank gem for chef-binstubs has been pushed to rubygems.org for
obvious security concerns and so that bundler/rubygems can resolve
the gem
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was not possible. Now you can do this:
```
chef-client -o "" ./foo.rb
```
And it will only run foo.rb and not any of the recipes in your
run_list at all. Node will not be saved at the end.
Useful to one-shot something like keyrotation (which still needs
keys and needs to talk to the chef server API, so this is a
different use case from simple chef-apply).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
this is the result of changes to rules we already previously had
enabled.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
Remove the lazy loading of chef provisioning resources
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
Provide the user with feedback if it's invalid or missing.
Signed-off-by: Thom May <thom@chef.io>
|
| |
|
|
|
|
| |
Our more esoteric unices need some more careful hand holding
Signed-off-by: Thom May <thom@chef.io>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Fixes: #6051
Signed-off-by: Thom May <thom@chef.io>
|
| |
|
|
| |
Signed-off-by: Thom May <thom@may.lt>
|
| |
|
|
|
|
|
|
| |
make sure that we fail if we can see info logs at least (halfway
decent check that we're not getting the logger when we're going
through a pipe / not through a tty)
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
closes #2514
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
This adds a new phase in the compilation of the run context.
Signed-off-by: Thom May <thom@chef.io>
|
| |
|
|
| |
Signed-off-by: Steven Murawski <steven.murawski@gmail.com>
|
| |
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
| |
make sure that if we have a metadata.rb that is not valid to read that
we never parse that and use compiled metadata.json instead.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Wait for the start callback rather than the do block, as it happens
later. This prevents us from getting into many conditions where the
start returns before the server is fully initialized, where if stop()
is called too soon after start returns, it would cause exceptions.
2. Wait for the thread to finish completely
3. Use Thread.current.abort_on_exception` to show the actual listen errors,
so that problems like this can be diagnosed.
4. Use :each to start and stop TinyServer so that race conditions like this
are exposed earlier and more often (this will let us rid ourselves of them
more quickly).
5. Use WEBrick::HTTPServer directly, which gets rid of the need for the
complicated trap workaround (rack is the one that traps).
|
| |
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
its always red on my mac
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
also add back a bunch of other ruby env vars so that our ruby
environment remains sane.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
|
| |
|
| |
Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
|
| |
|
| |
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"
|
| |
|
|
|
|
| |
1. Warn when default values are invalid.
2. Never validate nil (on set or get) if there is no default.
3. Emit "will be invalid in Chef 13" warning when setting an invalid nil value.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
dumps a large call graph into /var/chef/cache/graph_profile.out
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
otherwise the rubyopts passes -rbundler/setup which whacks the gem_path
and then without the env var it can't find internal gems like i18n.
|
| | |
|