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

Comments

Projects
None yet
7 participants
@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

This comment has been minimized.

Show comment
Hide comment
@dje

dje Jan 9, 2012

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@amaltson

amaltson 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.

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

This comment has been minimized.

Show comment
Hide comment
@dje

dje Jan 9, 2012

Contributor

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

Contributor

dje commented Jan 9, 2012

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

@amaltson

This comment has been minimized.

Show comment
Hide comment
@amaltson

amaltson Jan 10, 2012

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

amaltson commented Jan 10, 2012

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

@dje

This comment has been minimized.

Show comment
Hide comment
@dje

dje Jan 11, 2012

Contributor

correct

Contributor

dje commented Jan 11, 2012

correct

@sporkd

This comment has been minimized.

Show comment
Hide comment
@sporkd

sporkd 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

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

This comment has been minimized.

Show comment
Hide comment
@andruby

andruby Mar 27, 2012

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

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

This comment has been minimized.

Show comment
Hide comment
@drewww

drewww Oct 29, 2012

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

drewww commented Oct 29, 2012

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

@ianha

This comment has been minimized.

Show comment
Hide comment
@ianha

ianha 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.

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

This comment has been minimized.

Show comment
Hide comment
@jeremykoerber

jeremykoerber 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..

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