[PVE-User] Feedback

paul paul at vldm.com
Wed May 14 20:14:25 CEST 2008


Hi Dietmar,

I think there could be some issues with this approach -

1) The script assumes that the user is connected to a network with internet
access, during the install. This might not be the case, and also a user may
need to configure vlans/multiple network cards,etc before they can access
the internet.
Also, corporate firewalls may block traceroutes.
But I suppose if traceroute fails, you can use a default (e.g. the current
apt sources.list setting)

2) If you use this method, a more reliable approach might be to do a
traceroute with no limit on the number of hops, check each ip address in
turn, to see if it is publicly routable (i.e. not 10.0.0.0/8, 172.16.0.0/12,
192.168.0.0/16), and then use the first public ip that is found.
(obviously you need a public ip address, to work out which country it is
allocated to)

3) Does the apt repository need to be configured during the install anyway?
It is only first used when the user has booted into PVE, and tries to use
apt / aptitude
So, could there be a default apt.sources (set up as it is currently), but
then a drop down list of mirrors within the system configuration section of
the web console.

Could this setting then also change the apt sources.list for all existing
templates, and existing virtual servers as well?
This could be very useful if the mirror you normally use becomes unavailable
for any length of time, or becomes unreliable - you change the setting in
one place, and all the virtual servers are updated :-)

I'm sure you already know this, but for other people reading this, a list of
debian mirrors can be found at http://www.debian.org/mirror/list


Kind Regards,
Paul

----- Original Message ----- 
From: "Dietmar Maurer" <dietmar at proxmox.com>
To: "PVE" <pve-user at pve.proxmox.com>
Sent: Wednesday, May 14, 2008 9:00 AM
Subject: Re: [PVE-User] Feedback


>
>> We don't want to ask users. Instead we need a way to
>> autodetect the best
>> mirror - but currently I don't know how to do it. Any ideas?
>>
>>
>>
>> Maybe look at some way of telling what country the IP is
>> originating from, or just ask the user for their country and
>> pick one from there
>>
>
> Well, I am thinking of something like:
> ---------------------------------------------------------
> #!/usr/bin/perl -w
>
> use strict;
>
>
> open (TMP, "traceroute -q 1 -w 2 -n www.debian.org|");
>
> while (my $line = <TMP>) {
>
>    if ($line =~ m/\s*\d\s+(\d+\.\d+\.\d+\.\d+)\s/) {
>        my $geoip = `geoiplookup $1`;
>        if ($geoip =~ m/GeoIP Country Edition:\s*([A-Z]+),/) {
>            print "Country: $1\n";
>            last;
>        }
>    }
> }
> close (TMP);
> -------------------------------------------------------------
>
> But dont know how reliable that is.
>
> - Dietmar
>
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>




More information about the pve-user mailing list