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

Zdenek Pavlas zpavlas at redhat.com
Thu Jun 28 14:50:06 UTC 2012


> +        cb_obj = (self._mirrorFailureHandler, ({},), {})
>          self._grab = mgclass(self._grabfunc, urls,
> -                             failure_callback=self.mirror_failure_obj)
> +                             failure_callback=cb_obj)

This runs once (for each repo) so the 'data' argument is shared.

> +    def _mirrorFailureHandler(self, cb_obj, data):
> +        tries = data.get(cb_obj.mirror, 0)
> +        if self.retries and tries <= self.retries:
> +            action['remove_master'] = action['remove'] = 0
> +        data[cb_obj.mirror] = tries + 1
> +        return action

You'll retry each mirror configured number of times, but only
for the 1st file requested.  Is that intentional?
Anyway, I like the 'skip-but-retry' idea.


More information about the Yum-devel mailing list