On Fri, Jul 20, 2018 at 9:37 AM, Miro Hrončok <mhroncok@redhat.com> wrote:
On 20.7.2018 06:25, Michal Novotny wrote:
Hello,

I am occasionally experiencing the following error in my day-to-day dnf use:

     Failed to synchronize cache for repo 'fedora'

or

     Failed to synchronize cache for repo 'updates'

I've had that happened even in local mock builds.

Do you also experience this error upon dnf operations like `dnf install` or `dnf refresh` or in local mock builds?


Happened to me yesterday. And immediate rerun "fixed" it. Maybe we can add some retrying to mock?

We see this quite frequently in Taskotron, because we execute thousands jobs a day. I had to add "retry" keyword to all ansible tasks that use the dnf module. The reason is that MirrorManager sometimes returns an HTTP 5xx error (but when you try again, it works fine).

It would help if DNF retried failed network requests (5xx codes), that's the best place to fix this for everybody. Anybody cares enough to file a bug and link it here?