| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
to_hash on a lot of these objects should go away, but even eliminating
all our calls to to_hash on these objects internally is difficult.
(e.g. converting the knife ui code to call #to_h means we wind up
calling nil#to_h which "helpfully" becomes '{}' which is hilarious and
i don't know why someone thought that was a good idea).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
|
|
|
| |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
|
|
|
| |
This reverts commit 85653e8f25c19273fde0d8d512db29ef13c2a579.
|
|
|
|
| |
This reverts commit 79c8782bbc9ca07898bda6ff9a3a7cdcc39bcdcf.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a perf bug introduced by #6471 where we were taking O(n^2)
with the number of cookbook versions in the cookbook synch phase.
This is a minimum viable fix that changes the algorithm so that
it does the old, fast method of looking up the CBV first. Only
if it doesn't find it does it then go searching for cookbooks
that are in a differently named directory but which match by
the name in the metadata.
There may be edge conditions here if people mix-and-match and
have cookbooks which have both named-directory and
name-in-metadata versions. Please try not to do that. Don't
cross the streams.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
|
|
| |
some cops got a little stricter.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Bump to ruby 2.5.0
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|/
|
|
|
|
| |
More Rubymine warnings
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
| |
Signed-off-by: SAWANOBORI Yukihiko <sawanoboriyu@higanworks.com>
|
|\
| |
| | |
Fix to use cookbook name in local mode or chef-zero
|
| |\ |
|
| | |
| | |
| | |
| | | |
Signed-off-by: dmitrys <dmitrys@northernlight.com>
|
|\ \ \
| | | |
| | | | |
invites_sort_fail: Clean the invites array before sorting it
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Sort threw an error trying to compare nil with a string while running
knife ec backup. This change deletes the nil entries before sorting.
Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\ \ \
| | | |
| | | | |
fix for data bag names partially matching search reserved words
|
| | |/
| |/|
| | |
| | | |
Signed-off-by: Sandra Tiffin <sandi.tiffin@gmail.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Josh Hudson <jhudson@chef.io>
|
|/
|
|
|
|
|
|
| |
via 'knife upload'.
(Fixes the ChefFS code path for data bag creation, for https://github.com/chef/chef/issues/3058).
Signed-off-by: Sandra Tiffin <sandi.tiffin@gmail.com>
|
|\
| |
| | |
Add real support for rb files (at least roles) in knife-serve
|
| |
| |
| |
| |
| | |
Change-Id: I4788cac16864c7eb5a876890e9fe41485af80d46
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| | |
Change-Id: I1076b918e9153f21b4c49d77054899111106eb74
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements RFC 67, which removes cookbook segments, and moves to a
single list of all the files contained in a cookbook. This allows us to
move forward with better audit modes and also proper shipping of ohai
plugins.
Signed-off-by: Thom May <thom@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
|/
|
|
| |
Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
|
|
|
|
|
| |
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
| |
(#5781)
Signed-off-by: Tom Duffield <tom@chef.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`Chef::ReservedNames::Win32::Security::SID.current_user` throws an error when `chef-solo` is being
run as a `SYSTEM` user:
```
================================================================================
Chef encountered an error attempting to load the node data for "WIN-00P0BGAA4IV"
================================================================================
Unknown Server Error:
---------------------
The server had a fatal error attempting to load the node data.
Server Response:
----------------
Exception raised! #<Chef::Exceptions::Win32APIError: No mapping between account names and security IDs was done.
---- Begin Win32 API output ----
System Error Code: 1332
System Error Message: No mapping between account names and security IDs was done.
---- End Win32 API output ----
>
c:/opscode/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/win32/error.rb:81:in `raise!'
c:/opscode/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/win32/security.rb:383:in `lookup_account_name'
c:/opscode/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/win32/security/sid.rb:44:in `from_account'
c:/opscode/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/win32/security/sid.rb:241:in `current_user'
c:/opscode/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/nodes_dir.rb:41:in `create_child'
```
This commit modfies these calls to use `SID.default_security_object_owner` instead which will return
`SID.Administrators` for users such as `SYSTEM` and then returns `SID.current_user` for everyone else.
Signed-off-by: Scott Christopherson <scott@chef.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this code determined if an object existed by doing the
following:
parent.children.any? { |child| child.api_child_name == api_child_name }
For organizations and object types with a small number of total objects,
this wasn't problematic; however, it has very bad worst-case behavior.
For example, if a user was attempting to restore an organization with
30k client records to an empty organization, each client upload would do
the following:
1. Run GET /clients
2. Iterate the list returned in (1) normalizing the clients names along
the way.
3. Upload the client via POST when exist? returned false.
When the clients don't exist, this means step (2) will always iterate
over every member returned in step (1). By the time you get into the
1000s of clients, this iteration dominates the running time of the
process. For instance, consider the following ruby profile data:
Measure Mode: wall_time
Thread ID: 16939380
Fiber ID: 22163920
Total: 109.860468
Sort by: self_time
%self total self wait child calls name
26.83 29.475 29.475 0.000 0.000 500 <Class::IO>#select
8.60 38.876 9.446 0.000 29.430 464125 <Class::Chef::ChefFS::PathUtils>#join
7.02 12.226 7.717 0.000 4.509 928750 Chef::ChefFS::FileSystem::ChefServer::RestListEntry#api_child_name
6.79 7.459 7.459 0.000 0.000 930250 String#gsub
5.31 5.834 5.834 0.000 0.000 2320625 <Class::Chef::ChefFS::PathUtils>#regexp_path_separator
3.33 3.654 3.654 0.000 0.000 500 OpenSSL::X509::Store#set_default_paths
3.28 42.482 3.606 0.000 38.876 464125 Chef::ChefFS::FileSystem::BaseFSObject#initialize
2.95 3.244 3.244 0.000 0.000 930250 <Class::File>#extname
2.29 48.421 2.513 0.000 45.908 483375 *Class#new
38 wall clock seconds spent in PathUtils.join (part of the name
normalization during the list walk)
Note, an alternative might be to skip the exist? check completely,
opting to blindly POST and then rescuing the 409 and retry with a PUT.
Experimentation shows that PathUtils.join can also be improved
substantially; however, I'll leave those for a follow-up PR.
Signed-off-by: Steven Danna <steve@chef.io>
|
|\
| |
| | |
Chefstyle updates
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|/
|
|
|
|
|
| |
This commit ensures that the `nodes` dir and the node files within
it are created with the correct permissions by chef-solo.
Signed-off-by: Scott Christopherson <scott@chef.io>
|
|
|
|
|
|
| |
files each time the command was fired.
Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|