New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `make_child_entry' in knife upload #4070

Closed
glenjamin opened this Issue Oct 19, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@glenjamin

glenjamin commented Oct 19, 2015

Since updating to chefdk 0.9.0 we've been seeing this error intermittently when running knife upload.

I'm trying to pin down the exact steps to reproduce, but wanted to get something recorded for now.

The error occurs when a cookbook has some changes to upload, and can be fixed by deleting it from the server, or uploading with --force.

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system/base_fs_object.rb:100:in `child': undefined method `make_child_entry' for #<Chef::ChefFS::FileSystem::CookbookSubdir:0x007f88858eef08> (NoMethodError)
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:234:in `block in child_pairs'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `child_pairs'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:145:in `diff_entries'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:146:in `block in diff_entries'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `call'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `process_input'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:257:in `process_one'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:195:in `each_with_exceptions_unordered'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:214:in `each_with_exceptions_ordered'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:68:in `each_with_exceptions'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:50:in `each_with_input'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:37:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb:16:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb:25:in `flatten'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb:17:in `block in each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:38:in `block in each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:58:in `block in each_with_input'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:218:in `block in each_with_exceptions_ordered'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:188:in `each_with_exceptions_unordered'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:214:in `each_with_exceptions_ordered'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:68:in `each_with_exceptions'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:50:in `each_with_input'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:37:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb:16:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system/cookbook_dir.rb:159:in `compare_to'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:243:in `compare'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:343:in `copy_entries'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:360:in `block in copy_entries'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `call'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `process_input'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:257:in `process_one'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `call'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `worker_loop'
@goacid

This comment has been minimized.

Show comment
Hide comment
@goacid

goacid Oct 20, 2015

+1
Thanks for --force

goacid commented Oct 20, 2015

+1
Thanks for --force

@glenjamin

This comment has been minimized.

Show comment
Hide comment
@glenjamin

glenjamin Oct 20, 2015

I've also found that knife cookbook upload is able to workaround the error.

glenjamin commented Oct 20, 2015

I've also found that knife cookbook upload is able to workaround the error.

@jfbibeau

This comment has been minimized.

Show comment
Hide comment
@jfbibeau

jfbibeau Oct 26, 2015

Same issue with Chef 12.5.1, when trying to do knife upload <cookbook>:

/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system/base_fs_object.rb:99:in `child': undefined method `make_child_entry' for #<Chef::ChefFS::FileSystem::CookbookSubdir:0x007fd339289600> (NoMethodError)
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:234:in `block in child_pairs'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `each'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `child_pairs'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:145:in `diff_entries'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:146:in `block in diff_entries'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `call'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `process_input'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:257:in `process_one'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `call'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `worker_loop'

Workaround of doing knife cookbook upload <name> worked fine.

jfbibeau commented Oct 26, 2015

Same issue with Chef 12.5.1, when trying to do knife upload <cookbook>:

/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system/base_fs_object.rb:99:in `child': undefined method `make_child_entry' for #<Chef::ChefFS::FileSystem::CookbookSubdir:0x007fd339289600> (NoMethodError)
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:234:in `block in child_pairs'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `each'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/file_system.rb:232:in `child_pairs'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:145:in `diff_entries'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/command_line.rb:146:in `block in diff_entries'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `call'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `process_input'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:257:in `process_one'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `call'
    from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/chef_fs/parallelizer.rb:93:in `worker_loop'

Workaround of doing knife cookbook upload <name> worked fine.

@abrooke

This comment has been minimized.

Show comment
Hide comment
@abrooke

abrooke Oct 27, 2015

Confirmed breaking in ChefDK 0.9.0 and Chef 12.5.1.

abrooke commented Oct 27, 2015

Confirmed breaking in ChefDK 0.9.0 and Chef 12.5.1.

@btm btm closed this in bda78d0 Nov 25, 2015

btm added a commit that referenced this issue Dec 7, 2015

lukebrowning added a commit to ibmsoe/Autoport that referenced this issue Mar 11, 2016

Workaround knife upload failure by specifying --force
chef/chef#4070

Resstore old version of data on failure

Change-Id: I01765a6e54e5e0d9a9c61abc3ba6737cc91ead02

@chef chef locked and limited conversation to collaborators Nov 16, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.