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

Fix regression with gpg attribute #8

Merged
merged 2 commits into from
Dec 18, 2015
Merged

Conversation

jtimberman
Copy link
Contributor

Fixes #6, #7

In commit 50f5fa4, we fixed the recipes to use the right attribute,
gpg instead of key. However, the logic in the attributes file looks
for /opt/opscode/embedded/keys/packages-chef-io-public.key and sets
the key attribute to that file path. This causes the apt_repository
provider logic to try and use a cookbook_file resource to retrieve
that, which cannot be found. The fix is to set the value to nil if the
key file exists from a Chef Server package, because we know we'll have
the key from a previous installation.

This only manifested when using a recipe with chef_ingredient "chef-server", and could not be reproduced on a clean kitchen test.

In commit 50f5fa4, we fixed the recipes to use the right attribute,
gpg instead of key.  However, the logic in the attributes file looks
for /opt/opscode/embedded/keys/packages-chef-io-public.key and sets
the key attribute to that file path. This causes the apt_repository
provider logic to try and use a cookbook_file resource to retrieve
that, which cannot be found. The fix is to set the value to nil if the
key file exists from a Chef Server package, because we know we'll have
the key from a previous installation.

This only manifested when using a recipe with `chef_ingredient
"chef-server"`, and could not be reproduced on a clean `kitchen test`.
@andrewjamesbrown
Copy link

👍

1 similar comment
@tduffield
Copy link

👍

jtimberman added a commit that referenced this pull request Dec 18, 2015
@jtimberman jtimberman merged commit af6c250 into master Dec 18, 2015
@jtimberman jtimberman deleted the jtimberman/gpg-attr-logic branch December 18, 2015 18:43
@jtimberman jtimberman mentioned this pull request Dec 18, 2015
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

Successfully merging this pull request may close these issues.

Error executing action create on resource 'cookbook_file[/var/chef/cache/packages-chef-io-public.key]'
3 participants