Red Hat Bugzilla – Bug 447788
yum gives up too easily when it gets a 503 from RHN
Last modified: 2013-12-18 10:32:08 EST
During busy times, rhn (or other repos) can return http 503 codes.
Yum appears to respond by giving up right away, aborting the whole
update process. It would be better if youm were willing to retry
(with some backoff and some iteration limits), so that the update
is more likely to succeed even during RHN busy times.
Does RHN respond with a Retry-After header? If not it seems like it's doing the
James, whom are you asking about retry-after? I don't know whether rhn sends it
or not. Even if it doesn't, the yum/rhn user experience may dictate that this
other code pretend otherwise.
Old issue, but this still seems to be the case. This doesn't seem limited to RHN. I'm seeing it in koji when the file server gets overburdened.
I have a test setup that throws random 503s with a Retry-After of 15. Yum chokes on the first one every time.
Looking at the code, I notice:
1) yum passes its retries setting to urlgrabber, but yum's callback handler effectively nullifies the urlgrabber retry mechanism by raising an exception
2) neither yum nor urlgrabber seem to distinguish 503s or look for a Retry-After header. urlgrabber lumps all HTTP errors under its errno=14
3) even if yum didn't block urlgrabber retries, errno=14 is not on the default retry list. yum could add it, but that would retry on all sorts of errors
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
It's exactly as described in comment #3. Needs fixing in yum, by backporting commit bfb49e7deab1394ff2c799ce345f69bf0a9583bd and few others, but since upstream has probably diverged quite a lot, the effort/gain seems rather low.