Ticket #1003 (closed defect: fixed)
Exception arises when yum need to install a GPG key
Reported by: | https://www.google.com/accounts/o8/id?id=AItOawlJa6QJcUnwqaUiOAgop4U4wANp_y0hDu4 | Owned by: | jjneely |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.1 Release (Bugfix) |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description (last modified by solj) (diff)
If a GPG key is needed for a repo, YUM tries to install it automatically. However an exception is launched:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6 Importing GPG key 0x217521F6 "Fedora EPEL <[email protected]>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL YUMng.Install() call failed: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/Bcfg2/Client/Frame.py", line 303, in DispatchInstallCalls tool.Install(handled, self.states) File "/usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/YUMng.py", line 799, in Install self._runYumTransaction() File "/usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/YUMng.py", line 654, in _runYumTransaction rpmDisplay=rDisplay) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 3679, in processTransaction self._checkSignatures(pkgs,callback) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 3722, in _checkSignatures self.getKeyForPackage(po, self._askForGPGKeyImport) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 3546, in getKeyForPackage raise Errors.YumBaseError, _("Not installing key") YumBaseError: Not installing key
It seems to happen when YUM try to ask for use confirmation as shown in the following code:
# Try installing/updating GPG key self.logger.critical(_('Importing GPG key 0x%s "%s" from %s') % (info['hexkeyid'], to_unicode(info['userid']), keyurl.replace("file://",""))) rc = False if self.conf.assumeyes: rc = True elif fullaskcb: rc = fullaskcb({"po": po, "userid": info['userid'], "hexkeyid": info['hexkeyid'], "keyurl": keyurl, "fingerprint": info['fingerprint'], "timestamp": info['timestamp']}) elif askcb: rc = askcb(po, info['userid'], info['hexkeyid']) if not rc: raise Errors.YumBaseError, _("Not installing key")
I don't know if it is possible to set the self.conf.assumeyes flag from bcfg2 for disable the user confirmation.
Attachments
Change History
comment:1 follow-up: ↓ 3 Changed 12 years ago by jjneely
- Owner changed from desai to jjneely
- Status changed from new to assigned
comment:2 Changed 12 years ago by solj
- Description modified (diff)
- Milestone set to Bcfg2 1.2.0 Release
comment:3 in reply to: ↑ 1 Changed 12 years ago by solj
Replying to jjneely:
So what should be the ideal behavior here? Yum could just install the gpg-key. But what we are looking at is a configuration item that is not in the specification. Perhaps the error should be translated into something that that affect? Missing gpg-pubkeys in Bcfg2 specification?
Yeah, this seems like the right way to go.
comment:4 Changed 12 years ago by solj
- Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.2.1 Release (Bugfix)
comment:5 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
- Status changed from assigned to closed
- Resolution set to fixed
This exception is now caught and handled elegantly. Bcfg2 can also automatically handle GPG keys in 1.2.0, so I think that has been resolved, albeit a bit circuitously.
So what should be the ideal behavior here? Yum could just install the gpg-key. But what we are looking at is a configuration item that is not in the specification. Perhaps the error should be translated into something that that affect? Missing gpg-pubkeys in Bcfg2 specification?