See inline comments.

Diff comments:

> diff --git a/vm-tools/uvt b/vm-tools/uvt
> index 233ee46..c06b93a 100755
> --- a/vm-tools/uvt
> +++ b/vm-tools/uvt
> @@ -1410,6 +1410,8 @@ def vm_run_command(vm_name, command, root=False, 
> start=False,
>          return False
>  
>      ssh_command = ['ssh']
> +    ssh_command += ['-i', uvt_conf['vm_ssh_key'].rsplit('.', 1)[0]]

This assumes that the ssh private key associated with the ssh public key is 
present o the host running uvt; that breaks someone like myself who primarily 
does package builds and vm tests on a separate beefier machine than my laptop, 
and use ssh-agent forwarding to that machine. My vm_ssh_key entry in uvt.conf 
is my authorized_keys file on that host.

Adding an "IdentityFile" entry into ssh_config for your sec-* host configs 
would be the way I'd approach solving this for you.

> +
>      if verbose:
>          ssh_command += ['-vvv']
>      if root:
> @@ -2832,6 +2834,12 @@ def download_release_iso(release, release_num, arch, 
> iso_type):
>      latest_release = find_latest_release(release_num, iso_type)
>  
>      release_iso="ubuntu-%s-%s-%s.iso" % (latest_release, iso_type, arch)
> +    latest_release = latest_release.split('-')[0]
> +
> +    if latest_release == "16.04.7" and arch == "i386":
> +        print("WARNING: iso not available for i386 on 16.04.7.")
> +        print("Falling back to 16.04.6.\n")
> +        release_iso="ubuntu-%s-%s-%s.iso" % ("16.04.6", iso_type, arch)

The exception for the xenial/i386 iso looks okay, I'll cherry-pick that from 
your branch.

Given that there's also an exception for the 20.04.2 server iso, it feels like 
the exceptions ought to be pulled out into a seperate function to encapsulate 
them in one place going forward.

>  
>      if iso_type in ['mini', 'mini-desktop']:
>          
> url="http://archive.ubuntu.com/ubuntu/dists/%s/main/installer-%s/current/images/netboot/mini.iso";
>  % (release, arch)
> @@ -2908,12 +2916,19 @@ def find_latest_release(release_num, iso_type):
>  
>      text = re.compile(r'<[^>]+>').sub('', html).split('\n')
>      matches = []
> +    beta = False;
>      for line in text:
>          if line.startswith(' ' + release_num):
> -            matches.append(line[0:].split('/')[0][1:])
> +            matches.append(re.search(r'\d+\.\d+(\.\d+)? ', 
> line).group().strip())
> +            if 'Beta' in line:
> +                beta = True;
>  
>      if len(matches) > 0:
>          latest_release = sorted(matches)[-1]
> +
> +        if beta:
> +            latest_release +='-beta'
> +

Truthfully, the beta release isos are of limited use, in that they only show up 
5+ months into the 6 month development cycle. For the development release, you 
can find the daily built iso images at https://cdimages.ubuntu.com; e.g. 
https://cdimages.ubuntu.com/daily-live/current/ to get the current development 
iso image.

The ubuntu-qa-tools tree does include a script for pulling isos from cdimages, 
the dl-ubuntu-test-iso/dl-ubuntu-test-iso script. It's mildly bitrotted 
(patches welcome!), but with ISOROOT=/srv/isos/ in ~/.dl-ubuntu-test-iso, the 
following will download the latest desktop and server isos into 
/srv/isos/ubuntu:

  $ dl-ubuntu-test-iso --release impish --exclude-variant dvd --arch amd64 
--flavor ubuntu --flavor ubuntu-server

Under the hood it uses zsync and rsync for use within cronjobs to keep the 
transfers down to what's changed on the images (zsync is preferred because it 
reduces the load on the server side). Pointing my uvt.conf at /srv/isos/ubuntu 
will then cause it to pick up the isos from that directory (I do have to 
swizzle things around in uvt.conf for older releases because I don't keep my 
release isos in that directory - a unified picture of where isos get stored and 
automating mirroring would be nice).

If nothing else, I'd want to make sure we don't break using the daily isos, 
which does work now.

>          print("Found release %s" % latest_release)
>          return latest_release
>  


-- 
https://code.launchpad.net/~sespiros/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/409517
Your team Ubuntu Bug Control is subscribed to branch ubuntu-qa-tools:master.


_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-bugcontrol
Post to     : ubuntu-bugcontrol@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-bugcontrol
More help   : https://help.launchpad.net/ListHelp

Reply via email to