← Back to team overview

ubuntu-bugcontrol team mailing list archive

Re: [Merge] ~sespiros/ubuntu-qa-tools/+git/ubuntu-qa-tools:uvt-improvements into ubuntu-qa-tools:master

 

Thanks for taking the time to review the changes and the suggestions. I replied inline.

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]]

The rationale behind the change was that I want to remotely provision a standalone building/testing machine (similar to what you're doing) using ansible. Even though I can configure ansible to use ssh-agent forwarding for the setup and then also use forwarding for when I am connecting to that remote host (as you suggested), I opted for the "create a new rsa key" option just for vm usage inside each host (therefore the key should always exist).

It also didn't make a lot of sense to me to have a vm_ssh_key option that is not actually respecting the vm_ssh_key config if you see it as a standalone application.

> +
>      if verbose:
>          ssh_command += ['-vvv']
>      if root:
> @@ -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'
> +

These are 2 separate commits. The regex change actually fixes 2 cases when uvt fails to find available images.

uvt new trusty amd64 test
uvt new xenial i386 test

Regarding devel download, as part of my attempt to automate everything with the ansible project, I needed uvt to be able to download images for devel. Maybe I could also look into how I could have a special case for downloading images and creating vms for devel releases. Thanks a lot for the information on the tools!

>          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.



References