Skip to content
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

nrpe-1.4.2 on Supermarket has .DS_Store files in it, berks up failing #16

Closed
jrwesolo opened this issue Aug 25, 2014 · 8 comments
Closed

Comments

@jrwesolo
Copy link

Problem

The latest release of nrpe (1.4.2) has .DS_Store files in it. This is causing a cookbook that depends on it to fail when doing a berks up.

curl -Lo nrpe-1.4.2.tgz https://supermarket.getchef.com/cookbooks/nrpe/versions/1.4.2/download
tar -zxf nrpe-1.4.2.tgz
find ./nrpe -name '.DS_Store' -type f

This would output:

./nrpe/.DS_Store
./nrpe/templates/.DS_Store
./nrpe/templates/default/.DS_Store

When doing a berks up I get the following error:

E, [2014-08-25T10:56:15.858649 #29635] ERROR -- : Ridley::Errors::HTTPBadRequest: {"error":["Invalid element in array value of 'templates'."]}
E, [2014-08-25T10:56:15.859677 #29635] ERROR -- : /Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/middleware/chef_response.rb:24:in `on_complete'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/response.rb:9:in `block in call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/response.rb:57:in `on_complete'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/middleware/chef_auth.rb:74:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/request/retry.rb:87:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/connection.rb:104:in `run_request'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/faraday-0.9.0/lib/faraday/connection.rb:177:in `put'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `public_send'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:63:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:60:in `block in invoke'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:71:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/actor.rb:357:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks.rb:57:in `block in initialize'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/thread_handle.rb:13:in `block in initialize'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/actor_system.rb:32:in `block in get_thread'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/internal_pool.rb:130:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/internal_pool.rb:130:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:92:in `value'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/pool_manager.rb:41:in `_send_'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/pool_manager.rb:140:in `method_missing'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `public_send'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:63:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:60:in `block in invoke'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:71:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/actor.rb:357:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks.rb:57:in `block in initialize'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:92:in `value'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/resource.rb:132:in `raw_request'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/resource.rb:123:in `request'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/resources/cookbook_resource.rb:160:in `update'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/resources/cookbook_resource.rb:228:in `upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `public_send'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:26:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:63:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:60:in `block in invoke'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/cell.rb:71:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/actor.rb:357:in `block in task'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks.rb:57:in `block in initialize'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/tasks/task_thread.rb:21:in `block in create'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/thread_handle.rb:13:in `block in initialize'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/actor_system.rb:32:in `block in get_thread'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/internal_pool.rb:130:in `call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/internal_pool.rb:130:in `block in create'
(celluloid):0:in `remote procedure call'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/calls.rb:92:in `value'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/celluloid-0.16.0.pre3/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/uploader.rb:54:in `block (2 levels) in upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/uploader.rb:50:in `each'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/uploader.rb:50:in `block in upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley/client.rb:36:in `open'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/ridley-4.0.0/lib/ridley.rb:51:in `open'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf.rb:157:in `ridley_connection'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/uploader.rb:49:in `upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/uploader.rb:36:in `run'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/berksfile.rb:542:in `upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/cli.rb:208:in `upload'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/cli.rb:52:in `dispatch'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/lib/berkshelf/cli.rb:27:in `execute!'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/gems/berkshelf-3.1.5/bin/berks:5:in `<top (required)>'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/bin/berks:23:in `load'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/bin/berks:23:in `<main>'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/jrwesolo/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Manual fix

berks up works after running:

find ~/.berkshelf/cookbooks/nrpe-1.4.2 -name '.DS_Store' -type f | xargs -n1 -p rm

Useful links

Research pointing to this being the issue:
berkshelf/berkshelf#706
berkshelf/berkshelf#894

@tas50
Copy link
Contributor

tas50 commented Aug 25, 2014

I can certainly release a new version with the ds_store files nuked, but it seems like Berkshelf really needs to fix this. Anyone releasing cookbooks from an OS X host is going to have these files lingering around.

@jrwesolo
Copy link
Author

Agreed. It's not an ideal fix, but I am not sure if the fix needs to be in Berkshelf. Berkshelf can add error handling and account for this, but those files still exist in Supermarket (when they shouldn't). Adding a chefignore file to the root of the chef-nrpe repo would fix the issue when doing an upload to Supermarket. Here is an example:
https://gist.github.com/jrwesolo/f0e4917f3d222d2d33db

I can submit a pull request if you would like.

@tas50
Copy link
Contributor

tas50 commented Aug 27, 2014

I nuked the ds_store files in the latest release and added the chefignore file

@tas50 tas50 closed this as completed Aug 27, 2014
@jrwesolo
Copy link
Author

Thanks @tas50!

@electrawn
Copy link

This issue is reoccurring in 1.4.6

@natefaerber
Copy link

FWIW, We had the issue due to an empty file named "README" in our files and templates directory.

@tas50
Copy link
Contributor

tas50 commented Jan 27, 2015

I've added cleaning up ds_store files as part of my workflow, but this really needs to get fixed in berkshelf. It's a super annoying bug that causes a lot of people issues.

@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants