fedora-infra / mirrormanager2

Rewrite of the MirrorManager application in Flask and SQLAlchemy
https://mirrormanager.fedoraproject.org
GNU General Public License v2.0
65 stars 49 forks source link

Provide option to make a mirror globally available #194

Open adrianreber opened 7 years ago

adrianreber commented 7 years ago

A new option to mark a mirror globally available would help in cases where not many mirrors are available like: https://pagure.io/fedora-infrastructure/issue/5528

If the master mirror would be marked as 'global' with a low priority there would always be a least one mirror which is up to date. Having a low priority local mirrors would be used before contacting the master mirror. Also, in case of important updates at least one mirror with the correct repomd.xml checksum would be available.

This could also help to use mirrors which are based on anycast as we currently have no way to use anycast mirrors with our crawler/continent/country setup.

adrianreber commented 7 years ago

This option should be admin only.

adrianreber commented 7 years ago

There is already support in the mirrorlist server to extent the result with mirrors from the global list if less than 3 mirrors are returned.

I will increase this from 3 to 5 and make it configurable from the command-line if it needs to be changed in the future.

adrianreber commented 7 years ago

PR #199 offers a work around.

An option to add certain mirrors to all mirrorlist/metalink results would still be helpful. This requires changes in the web-frontend, pkl creation and mirrorlist.

mdomsch commented 7 years ago

In the past we've used a low bandwidth value, combined with the 'always_up2date' flag on the mirror category, to make sure the Fedora-owned public-facing servers appeared at the end of the mirrorlist as a mirror of last resort.

adrianreber commented 7 years ago

@mdomsch are you sure? The mirrorlist_server.py code has not change much since you wrote it and I have not found the place where 'always_up2date' mirrors are added to the mirrorlist.

The master mirror is still marked as 'always_up2date' but I only see it on 'country=global' and 'country=us' mirrorlists.

mdomsch commented 7 years ago

always_up2date flag is handled in the pickle creation queries.

On Wed, Feb 1, 2017 at 11:33 AM, Adrian Reber notifications@github.com wrote:

@mdomsch https://github.com/mdomsch are you sure? The mirrorlist_server.py code has not change much since you wrote it and I have not found the place where 'always_up2date' mirrors are added to the mirrorlist.

The master mirror is still marked as 'always_up2date' but I only see it on 'country=global' and 'country=us' mirrorlists.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fedora-infra/mirrormanager2/issues/194#issuecomment-276724487, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqDqnPgVf-yDCHQYySDgTrufr9h-xXmks5rYMICgaJpZM4KaJnX .

adrianreber commented 7 years ago

Thanks. I see it in the old and in the new code but the new code does not include it in the results.

RPM Fusion uses the old backend code (for pkl generation) and the new mirrorlist servers but the always_up2date flag is not used. I could test it there to see how it works.

Anyway, good to know that this is an additional meaning of the 'always_up2date' flag.