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

Yum repodata becomes stale pretty quickly #2816

Closed
BrandonIngalls opened this issue Feb 8, 2017 · 3 comments
Closed

Yum repodata becomes stale pretty quickly #2816

BrandonIngalls opened this issue Feb 8, 2017 · 3 comments

Comments

@BrandonIngalls
Copy link

Keybase frequently causes my workstation to fail updating as the package your repo says is available seems to disappear whenever a newer version is pushed out.

[~]$ sudo dnf update
...
[MIRROR] keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm: Status code: 404 for http://prerelease.keybase.io/rpm/x86_64/keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm                 
[FAILED] keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
...
Error: Error downloading packages:
  Cannot download keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm: All mirrors were tried

Attempting to download the file that is in my computers cached data about the keybase repo.

[~]$ curl http://prerelease.keybase.io/rpm/x86_64/keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>rpm/x86_64/keybase-1.0.18.20170206170059.4931777-1.x86_64.rpm</Key><RequestId>7CD3F489E2BE123D</RequestId><HostId>8ZThI+/2X/MacEIEa3rgN8tMPolbGXPTufnb9P/DVZGRYu6se/LrTUzh1fWhIvbevRQ59ROnJlM=</HostId></Error>

Two possible solutions:

  1. Add an explicit metadata expire time to keybase's repodata file
    [~]$ cat /etc/yum.repos.d/keybase.repo 
    [keybase]
    name=keybase
    baseurl=http://prerelease.keybase.io/rpm/x86_64
    enabled=1
    gpgcheck=1
    metadata_expire=60
    gpgkey=https://keybase.io/docs/server_security/code_signing_key.asc
    
  2. Keep the files you advertise out to the world for a little longer

I understand wanting people to have the latest version, but that shouldn't come with the risk of breaking automated system events -- even if you are only breaking them for hours / days.

@maxtaco
Copy link
Contributor

maxtaco commented Feb 9, 2017

Thanks @BrandonIngalls. Cc: @oconnor663

@oconnor663
Copy link

Wow, thanks for the detailed fixes. If all we need to do is avoid deleting the old package files from S3, I think this should be a trivial change to our push script. I'll set aside some time to test it and make sure nothing breaks.

oconnor663 added a commit to keybase/client that referenced this issue Feb 15, 2017
Clients with cached repo data might try to fetch older binaries, and we
prefer to let them do that rather than giving them nasty errors. They
should eventually get the latest stuff when they run the equivalent of
`apt-get update`.

Fixes keybase/keybase-issues#2816.
oconnor663 added a commit to keybase/client that referenced this issue Feb 16, 2017
oconnor663 added a commit to keybase/client that referenced this issue Feb 16, 2017
@oconnor663
Copy link

This change should go out with tomorrow's build, though it won't automatically apply to your machine unless you delete /etc/default/keybase (or change the repo_add_once param in there to "true").

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