-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Apt can't authenticate package #929
Comments
Seems similar to this issue (though of course different key): Not sure if anyone can think of a clean way to update the key without resorting to the hackery in the examples in the links above. |
Is there a reason that you are just not using the ppa? |
Not sure what that is; you're welcome to contribute a pull request if you'd like, and someone can review it. Keep in mind, though, that we're moving towards making the non-vendor repository non-default very shortly I don't think that will address the issue when signing keys expire though, will it? |
I'm seeing the same as OP, but the key doesn't seem to be outdated. Even when importing the nginx_signing.key manually, apt still refuses to authenticate them:
The key has clearly not expired, yet debian apt refuses to authenticate them: puppet agent -t output:
|
OK, here's what interesting: I'm using voxpupuli/puppet-php too, which sets up the dotdeb repository. I suspect apt was trying to authenticate the dotdeb packages with the nginx key, or the other way around. Here's the output of apt-cache policy for nginx:
Related to this: When nginx gets installed from dotdeb instead of nginx, the nginx user will not get created. Not sure how to handle this, by pinning the repos? Maybe the pinning process could become part of using { class ::nginx: } if manage_repo is set to true, so the following was done kind of automatically?
|
I think that your analysis is right on. By default, the module will enable the repo (though we're considering changing this default in a future version), and ensure that nginx is present, but it won't explicitly ensure that it comes from a particular source. I think both yum and apt can support this with plugins, but the puppet providers themself cannot, other than ensuring a specific version. In your version of Debian, looks like the official Nginx repo has a version that's older than the version from the dotdeb repo configured outside of the module, so that's why it's preferring that one. You should be able to pin the version (and in that sense, also influence which repo is used) by using ps - I don't think this is the OP's problem though. FWIW, it looks like Puppet's apt provider, at least in recent versions, will try to update an expired key. |
Current version will not allow new installs... Submitted a PR #967 to move to using the PPA for this for debian. |
@micah-uber: can you post the error you're getting? As noted in #967, I don't think PPA will work for Debian. |
I had the same issue as the OP. Inspecting the key list from apt I was seeing:
The key had gone expired in Aug/2016. Manually ran wget | apt-key add, now markes the updated key:
Seems to me like the issue arises because the code on https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/package/debian.pp#L39 is setting the GPG key, but since this key has been updated / expiry date extended while keeping the same hash (???? is that even possible?) therefore the module will not update / re-add the key (for it already exists) even if expired. This leads to the scenario where the |
@kali-brandwatch From what I was able to glean, the apt provider is supposed to be smart about things like this, at least in recent versions (https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/provider/apt_key/apt_key.rb#L47-L49), though I don't think there's equivalent functionality in the Yum provider. But the general problem of a key getting updated when the user-id changes is not specific to this module or even to Puppet; see, for example, So far, the main problems that seem to exist are:
Neither of these are super easy to deal with directly in the module; for the first case, I don't think the module should try to handle it directly, however, updates to the apt / yum providers that it relies on might be appropriate. In the second case, I don't know if there's an easy fix other than either pinning the package version using |
@kali-brandwatch ps - what Puppet version are you using? |
@wyardley we are using puppet 4.3.1, and the apt module we are importing is I indeed believe the issue should be probably handled on apt module side, and probably not on puppet-nginx side (or on our own wrappers, for what it's worth) |
For reference, I have checked the apt module and it seems that he code you referred to wasn't different in the tag 2.1.x which is the code we're using. |
@kali-brandwatch Thanks for the details. I spoke with someone, and sounds like puppetlabs-apt is a stand-alone module which is separate from the apt provider, so you might need to install this module as well to get the behavior I linked to [edit: though sounds like you might already have it anyway?]. I don't know whether Puppet will be interested in improving the behavior within the apt / yum providers directly, or what the exact category should be, but FWIW, I opened https://tickets.puppetlabs.com/browse/PUP-7005 -- feel free to put in more details or follow the ticket. |
How to reproduce (e.g Puppet code you use)
include nginx
What are you seeing
I'm receiving daily emails from my cron with the following content:
If I run
apt-get update
I get:What behaviour did you expect instead
Nginx packages should be correctly authenticated using GPG key provided by nginx.org
Any additional information you'd like to impart
If I download the key and add to the servers manually I stop to get the errors.
The text was updated successfully, but these errors were encountered: