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

Conversation

@jtimberman
Copy link
Member

commented Dec 18, 2015

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

This comment has been minimized.

Copy link

commented Dec 18, 2015

👍

1 similar comment
@tduffield

This comment has been minimized.

Copy link

commented Dec 18, 2015

👍

jtimberman added a commit that referenced this pull request Dec 18, 2015
Fix regression with `gpg` attribute
@jtimberman jtimberman merged commit af6c250 into master Dec 18, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jtimberman jtimberman deleted the jtimberman/gpg-attr-logic branch Dec 18, 2015
@jtimberman jtimberman referenced this pull request Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.