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

Can't install cookbook, IOError with metadata.rb #1

Closed
amaltson opened this issue Jan 4, 2012 · 10 comments
Closed

Can't install cookbook, IOError with metadata.rb #1

amaltson opened this issue Jan 4, 2012 · 10 comments

Comments

@amaltson
Copy link

@amaltson amaltson commented Jan 4, 2012

Hello, I'm trying to install this cookbook using knife cookbook site install cube but I'm getting this:

Installing cube to /home/arthur/chef-repo/cookbooks
Checking out the master branch.
Pristine copy branch (chef-vendor-cube) exists, switching to it.
Downloading cube from the cookbooks site at version 0.4.0 to /home/arthur/chef-repo/cookbooks/cube.tar.gz
Cookbook saved: /home/arthur/chef-repo/cookbooks/cube.tar.gz
Removing pre-existing version.
Uncompressing cube version /home/arthur/chef-repo/cookbooks.
removing downloaded tarball
No changes made to cube
Checking out the master branch.
ERROR: IOError: Cannot open or read /home/arthur/chef-repo/cookbooks/cube/metadata.rb!

Which is strange because there is a metadata.rb file and it looks valid. This is a pretty vanilla install of Chef.

@dje dje closed this Jan 9, 2012
@dje
Copy link
Contributor

@dje dje commented Jan 9, 2012

I did a local install and wasn't able to reproduce the problem. My best guess is that the local repository is in an inconsistent state somehow.

@amaltson
Copy link
Author

@amaltson amaltson commented Jan 9, 2012

Hmm, I tried again and it still doesn't work. I'm able to install mongodb, nodejs, ufw, etc using site install. Is there any way that I can debug this? I'm not able to get any more info on it.

I was able to get the cookbook to install by knife cookbook site download cube and install it locally.

@dje
Copy link
Contributor

@dje dje commented Jan 9, 2012

Sorry. I'm not able to imagine what's happened otherwise.

@amaltson
Copy link
Author

@amaltson amaltson commented Jan 10, 2012

So you're definitely able to install it using knife cookbook site install cube?

@dje
Copy link
Contributor

@dje dje commented Jan 11, 2012

correct

@sporkd
Copy link

@sporkd sporkd commented Mar 23, 2012

I ran into this as well but with another cookbook. Not sure why it happens, but you can fix with:

$ git branch -D chef-vendor-cube

@andruby
Copy link

@andruby andruby commented Mar 27, 2012

thank you sporkd, i had the same issue and git branch -D fixed it (for cookbooks openssl and build-essential)

@drewww
Copy link

@drewww drewww commented Oct 29, 2012

Had this same issue on another cookbook (cassandra) and your branch deletion trick fixed that too. Thanks @sporkd!

@ianha
Copy link

@ianha ianha commented Nov 1, 2012

Note of caution here. We had the same issue and you have to remove all dependent branches, not just the vendor branch for the cookbook in question.

When you site install a cookbook, it creates branches for that cookbook and any other cookbook it depends on. So you have to remove those branches as well. This is what fixed it for us.

But probably best to nuke all branches to be safe. As a consequence, that probably screws up the chef workflow because it sounds like chef keeps those branches around to pull down diffs to merge back into master when you upgrade a cookbook.

@jeremykoerber
Copy link

@jeremykoerber jeremykoerber commented Apr 26, 2013

Had the same issue with the windows cookbook. git branch -D chef-vendor-windows fixed it. Nice find! I'm not too git savvy so this was a relief to find..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.