VVV icon indicating copy to clipboard operation
VVV copied to clipboard

Apt Mirrors

Open tomjn opened this issue 5 years ago • 16 comments

Sometimes when provisioning, apt fails to retrieve packages due to network issues. This seems to have happened in #1991 but if there had been a backup to fall back to this might have been avoided.

For MariaDB at least we can add mirrors, and there are quite a few to choose from listed here:

https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-ams

We might be able to make provisioning a little more robust, maybe even speed it up for some locations

tomjn avatar Nov 05 '19 11:11 tomjn

So we need to check for all the repositories we use if there are mirrors. Also in the utilities

Mte90 avatar Nov 05 '19 15:11 Mte90

Ref for mariadb: https://github.com/Varying-Vagrant-Vagrants/VVV/pull/1996

Mte90 avatar Nov 05 '19 16:11 Mte90

The idea is to add multiple debian repositories because automatically APT will use the one works. And this require to add also the gpg key for them.

Mte90 avatar Nov 05 '19 16:11 Mte90

Right now I have those errors:

default: Err:14 https://ppa.launchpad.net/ondrej/php/ubuntu bionic Release
    default:   Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected.  Could not handshake: Error in the certificate verification. [IP: 91.189.95.83 443]
    default: Hit:15 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
    default: Err:17 https://ppa.launchpad.net/varying-vagrant-vagrants/php/ubuntu bionic Release
    default:   Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected.  Could not handshake: Error in the certificate verification. [IP: 91.189.95.83 443]

Mte90 avatar Nov 05 '19 16:11 Mte90

~do we need to update keys?~ seems I get the same issues in the browser visiting ppa.launchpad.net

tomjn avatar Nov 05 '19 16:11 tomjn

This problem is fixed #2000, launchpad doesn't support https...

Mte90 avatar Nov 06 '19 11:11 Mte90

Just did a flawless install of the develop branch. Thanks for the fix, guys!

Lepelaar avatar Nov 06 '19 13:11 Lepelaar

Awesome, thanks for being patient!

tomjn avatar Nov 06 '19 14:11 tomjn

Actually, reopening this as the original goal was to add redundant MariaDB Apt mirrors, which we haven't done

tomjn avatar Nov 06 '19 14:11 tomjn

I was checking this ticket, now Mariadb stable version is 10.4 and not anymore 10.3 https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/config/apt-source-append.list#L18 So we need a bump for that for sure, about the mirror to choose I have no idea because there are too many mirrors to pick.

GitHub
An open source Vagrant configuration for developing with WordPress - Varying-Vagrant-Vagrants/VVV

Mte90 avatar Jan 03 '20 12:01 Mte90

Neither do I but I do know the correct answer is multiple

On Fri, 3 Jan 2020 at 12:37, Daniele Scasciafratte [email protected] wrote:

I was checking this ticket, now Mariadb stable version is 10.4 and not anymore 10.3 https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/config/apt-source-append.list#L18 So we need a bump for that for sure, about the mirror to choose I have no idea because there are too many mirrors to pick.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1993?email_source=notifications&email_token=AAAOLZ7F7YZNUXLATEIVZILQ34WPPA5CNFSM4JJBUKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIBBEUY#issuecomment-570561107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOLZ7GXDN4KKBW6SBFSWLQ34WPPANCNFSM4JJBUKPA .

tomjn avatar Jan 03 '20 12:01 tomjn

As I can remember apt download using the first repository in the list that has the package, not fastest. Also in that case we need to add multiple keys.

Mte90 avatar Jan 03 '20 12:01 Mte90

I don’t mind adding multiple keys, I was thinking more for reliability than for speed as sometimes mirrors are unreachable

On Fri, 3 Jan 2020 at 12:45, Daniele Scasciafratte [email protected] wrote:

As I can remember apt download using the first repository in the list that has the package, not fastest. Also in that case we need to add multiple keys.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1993?email_source=notifications&email_token=AAAOLZ65RUGMIAA3JMTBWULQ34XM5A5CNFSM4JJBUKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIBBQ4Q#issuecomment-570562674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOLZ2YXMKKI6JBWCDOJXTQ34XM5ANCNFSM4JJBUKPA .

tomjn avatar Jan 03 '20 12:01 tomjn

Assigning to @msaggiorato as he said he was interested in this on slack, let me know if you need someone to bounce ideas off :)

tomjn avatar May 03 '20 19:05 tomjn

I'd need to come up with a solution for all of this. Because right now just adding mirrors work as fallback. Eg : one fails, try the next. That doesn't necessarily means that you'll get the fastest to you.

What I'd do is run a speed test of sorts to all the mirrors and sort them in the apt sources based on this.

There's tools I've seen that do precisely this, but they're mostly abandoned. So I thought maybe there's a bash way of doing this properly.

msaggiorato avatar May 03 '20 19:05 msaggiorato