← Back to team overview

ubuntu-bugcontrol team mailing list archive

Re: [Merge] ~jslarraz/ubuntu-qa-tools:uvt-snap into ubuntu-qa-tools:master

 


Diff comments:

> diff --git a/vm-tools/uvt b/vm-tools/uvt
> index 0702939..068df2f 100755
> --- a/vm-tools/uvt
> +++ b/vm-tools/uvt
> @@ -1578,7 +1635,9 @@ def vm_start_wait(vm_name, timeout=1800, quiet=False, clone_name=None):
>  
>  def vm_ping(vm_name):
>      '''Attempts to ping a VM'''
> -    rc, out = runcmd(["ping", "-c1", "-w1", vm_name])
> +    rc = 0
> +    if not is_snap():
> +        rc, out = runcmd(["ping", "-c1", "-w1", vm_name])

We may completely remove the ping command here, as if ssh_connect(vm_name) success implicitly proves that the target machine is reachable. Trying to ping may also cause issues if icmp traffic is filtered for some reason

>      if rc == 0 and ssh_connect(vm_name) == True:
>          return vm_name
>      return ""
> @@ -3487,15 +3560,15 @@ def load_uvt_config():
>      if not 'vm_xkboptions' in config:
>          config['vm_xkboptions'] = keyboard.get('XKBOPTIONS', "")
>  
> -    # Set a default image size to 8GB and memory to 1024MB

Maybe those defaults should also be updated for non-snap version, they look very conservative considering resources available computers nowadays and resources required by newer releases. Thoughts?

> +    # Set a default image size to and memory to default values
>      if config.get('vm_image_size', "") == "":
> -        config['vm_image_size'] = "8"
> +        config['vm_image_size'] = "8" if not is_snap() else "20"
>      if config.get('vm_memory', "") == "":
> -        config['vm_memory'] = "1024"
> +        config['vm_memory'] = "1024" if not is_snap() else "4096"
>  
> -    # Set default vcpus to 1
> +    # Set default vcpus
>      if config.get('vm_vcpus', "") == "":
> -        config['vm_vcpus'] = "1"
> +        config['vm_vcpus'] = "1" if not is_snap() else "4"
>  
>      # Set a default username and password
>      if config.get('vm_username', "") == "":


-- 
https://code.launchpad.net/~jslarraz/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/462951
Your team Ubuntu Bug Control is requested to review the proposed merge of ~jslarraz/ubuntu-qa-tools:uvt-snap into ubuntu-qa-tools:master.



References