[Yum-devel] [PATCH] honor retries config option at mirror group level rather than grabber level

Mike McLean mikem.rtp at gmail.com
Fri Jul 13 15:06:45 UTC 2012


On Fri, Jul 13, 2012 at 9:47 AM, Zdenek Pavlas <zpavlas at redhat.com> wrote:
>      def _default_grabopts(self, cache=True):
> -                 'retry': self.retries,
>
> Better leave it there.  It's ignored by MirrorGroup code,
> but we still want metalink.xml download to use it.

ok

>> +        ext_cb = self.mirror_failure_obj
>> +        if ext_cb:
>> +          ..
>
> mirror_failure_obj is set in repos.setMirrorFailureCallback(),
> but there seem to be no users, so it's probably always None.
> But it does not hurt, and there are plugins.. ok.

Yeah, I know yum itself doesn't use it, but didn't want to break the
api. In addition to plugins, external tools might also be affected.

If the callback wrapper is bothersome, we could just make it the
default mirror_failure_obj, but then if anything did set a callback
(e.g. for logging purposes), they'd break retries.

> +        if gr.tries == max(self.retries, len(self.urls)):
>
> I'm tempted to just "gr.tries == self.retries" there.
> That'd literally follow the 'retries'option doc, anyway.
> Do we have to try all mirrors, for some reason?

Just trying to avoid surprising the user, since current behavior is to
try all the mirrors. Fine with me either way.


More information about the Yum-devel mailing list