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

Cookbook fails to install on Chef 14 #543

Open
royaldark opened this issue May 2, 2018 · 1 comment
Open

Cookbook fails to install on Chef 14 #543

royaldark opened this issue May 2, 2018 · 1 comment
Milestone

Comments

@royaldark
Copy link

royaldark commented May 2, 2018

Following the datadog Chef installation instructions on Chef 14 results in the following error:

$ knife cookbook site install datadog

[...unrelated output cut for brevity...]

Installing chef_handler to /home/joe/chef/cookbooks
Checking out the master branch.
Pristine copy branch (chef-vendor-chef_handler) exists, switching to it.
WARNING: DEPRECATION: This cookbook has been deprecated. No replacement has been defined.
WARNING: Use --force to force download deprecated cookbook.
Removing pre-existing version.
Uncompressing chef_handler version 3.0.3.
ERROR: Errno::ENOENT: No such file or directory @ rb_sysopen - /home/joe/chef/cookbooks/chef_handler.tar.gz

I believe this is because the chef_handler cookbook is pre-installed on Chef 14, and thus does not need to be listed as a dependency. Possibly the depends constraint in metadata.rb could be put behind a Chef version check?

As a temporary workaround, running knife cookbook site install datadog -D avoids dependency installation.

@olivielpeau olivielpeau added this to the 2.17.0 milestone Oct 29, 2018
@olivielpeau
Copy link
Member

Thanks for reporting this issue @royaldark (and sorry for the very late reply...)

Unfortunately I don't think there's a way in metadata.rb to put the depends constraint behind a chef version check. metadata.rb has fairly limited semantics.

So, this Chef 14 change is a significant breaking change for this cookbook. Unless I'm missing something I think we'll have to maintain a major branch of the cookbook for Chef 14+, and a lower major branch for Chef < 14.

This is a breaking change we'll probably want to make in the 4.x major release. Until then I'll make sure this workaround is documented. Let me know what your thoughts are.

@olivielpeau olivielpeau modified the milestones: 2.17.0, 4.0 Oct 31, 2018
@remeh remeh modified the milestones: 4.0, 3.0 Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants