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

jenkins repo key installation failure #8

Closed
ahamid opened this issue Jul 5, 2012 · 1 comment
Closed

jenkins repo key installation failure #8

ahamid opened this issue Jul 5, 2012 · 1 comment

Comments

@ahamid
Copy link

ahamid commented Jul 5, 2012

Fails after installing repo key:

[Wed, 04 Jul 2012 22:55:04 -0400] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[Wed, 04 Jul 2012 22:55:04 -0400] FATAL: Chef::Exceptions::ShellCommandFailed: execute[rpm --import /etc/pki/rpm-gpg/jenkins] (/tmp/chef-solo/cookbooks/yum/providers/key.rb line 31) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '1'

It thinks the key is not installed and tries to re-import which leads to failure. Why does it think the key is not installed? There is some mismatch between the detection script and what RPM says is installed:

[root@somewhere ~]# cat /etc/issue
CentOS Linux release 6.0 (Final)
Kernel \r on an \m
[root@somewhere ~]# rpm -qa "gpg-pubkey*"
gpg-pubkey-f345be74-4c1b3be8
gpg-pubkey-0608b895-4bd22942
gpg-pubkey-d50582e6-4a3feef6
gpg-pubkey-c105b9de-4e0fd3a3
[root@somewhere ~]# rpm -e gpg-pubkey-d50582e6-4a3feef6
[root@somewhere ~]# gpg --with-fingerprint --with-colons --fixed-list-mode /etc/pki/rpm-gpg/jenkins
pub:-:1024:17:9B7D32F2D50582E6:1233469549:::-:Kohsuke Kawaguchi <[email protected]>:
fpr:::::::::150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6:
uid:::::::::Kohsuke Kawaguchi <[email protected]>:
uat:::::::::1 3723:
sub:-:2048:16:73A99ACA10AF40FE:1233469549::::
[root@somewhere ~]# gpg --with-fingerprint --with-colons --fixed-list-mode /etc/pki/rpm-gpg/jenkins | gawk -F: '/^pub/ { print tolower(sprintf("gpg-pubkey-%s-%x\\n", substr($5, length($5)-8+1), $6)) }'
gpg-pubkey-d50582e6-4985406d\n
[root@somewhere ~]# # OK, the jenkins key package should be shown as 'gpg-pubkey-d50582e6-4985406d' 4985406d is the hex representation of the release (1233469549)
[root@somewhere ~]# rpm --import /etc/pki/rpm-gpg/jenkins
[root@somewhere ~]# rpm -qa "gpg-pubkey*"
gpg-pubkey-f345be74-4c1b3be8
gpg-pubkey-0608b895-4bd22942
gpg-pubkey-c105b9de-4e0fd3a3
gpg-pubkey-d50582e6-4a3feef6 <======== *fail* :(

[root@somewhere ~]# rpm -qi gpg-pubkey-d50582e6-4a3feef6 | head -10
Name        : gpg-pubkey                   Relocations: (not relocatable)
Version     : d50582e6                          Vendor: (none)
Release     : 4a3feef6                      Build Date: Wed 04 Jul 2012 11:31:43 PM EDT
Install Date: Wed 04 Jul 2012 11:31:43 PM EDT      Build Host: localhost
Group       : Public Keys                   Source RPM: (none)
Size        : 0                                License: pubkey
Signature   : (none)
Summary     : gpg(Kohsuke Kawaguchi <[email protected]>)
Description :
-----BEGIN PGP PUBLIC KEY BLOCK-----

0x4a3feef6 is 1245703926

what is going on?? :s

@fujin fujin closed this as completed Feb 28, 2013
@patcon
Copy link
Contributor

patcon commented Mar 1, 2013

See #23 :)

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