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

More resilient gpg getting #92

Merged
merged 1 commit into from
Apr 23, 2015
Merged

Conversation

yosifkit
Copy link
Member

  • move to "high-availability" subset.
  • do keys one at a time to ensure every key imports

@tianon
Copy link
Member

tianon commented Apr 22, 2015

👍 LGTM

To add a little more context for why this PR is happening, gpg --recv-keys key1 key2 will only fail (non-zero exit code) if both key1 and key2 failed to fetch, so every now and then we get an intermittent keyserver issue that causes one or two keys to fail but the command succeeds so it's baked into our cache with missing keys and the build fails repeatedly after that. This is the reason for the other part of this where we switch to just high-availability servers and fetch individual keys in a loop. 🤘

@md5
Copy link
Contributor

md5 commented Apr 22, 2015

Is there any reason to have GPG_KEYS in a separate ENV instead of just putting it into the RUN statement?

@tianon
Copy link
Member

tianon commented Apr 22, 2015 via email

@tianon
Copy link
Member

tianon commented Apr 22, 2015 via email

@md5
Copy link
Contributor

md5 commented Apr 22, 2015

Those are good reasons. I didn't scroll all the way down to the update.sh changes 🙈

I guess I'm just still in a scarcity mindset regarding the number of layers in images.

@tianon
Copy link
Member

tianon commented Apr 22, 2015 via email

@yosifkit
Copy link
Member Author

Step 6 : RUN set -xe    && for key in $GPG_KEYS; do         gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key";  done
 ---> Running in b918241a27d6
+ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 33CFC8B3 from hkp server ha.pool.sks-keyservers.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 33CFC8B3: public key "Ferenc Kovacs <tyrael@php.net>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1
gpg: requesting key 90D90EC1 from hkp server ha.pool.sks-keyservers.net
gpg: key 90D90EC1: public key "Julien Pauli <jpauli@php.net>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
 ---> b1cfedd17311

@tianon
Copy link
Member

tianon commented Apr 22, 2015

Pretty, 😍!

ENV GPG_KEYS F38252826ACD957EF380D39F2F7956BC5DA04B5D
RUN set -xe \
&& for key in $GPG_KEYS; do \
gpg --keyserver pool.sks-keyservers.net --recv-keys "$key"; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ha.

@tianon
Copy link
Member

tianon commented Apr 23, 2015

Those missing ha.s are hilariously why the Travis build failed. 👍

+ gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 5DA04B5D from hkp server pool.sks-keyservers.net
gpgkeys: key F38252826ACD957EF380D39F2F7956BC5DA04B5D can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
INFO[0180] The command [/bin/sh -c set -xe  && for key in $GPG_KEYS; do         gpg --keyserver pool.sks-keyservers.net --recv-keys "$key";     done] returned a non-zero code: 2 

@tianon
Copy link
Member

tianon commented Apr 23, 2015

LGTM

tianon added a commit that referenced this pull request Apr 23, 2015
More resilient gpg getting
@tianon tianon merged commit b7d2ab8 into docker-library:master Apr 23, 2015
@tianon tianon deleted the gpg-keys branch April 23, 2015 21:29
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.

3 participants