Merge lp:~brian-murray/ubuntu-qa-tools/uvt-verbosity into lp:ubuntu-qa-tools

Proposed by Brian Murray
Status: Rejected
Rejected by: Marc Deslauriers
Proposed branch: lp:~brian-murray/ubuntu-qa-tools/uvt-verbosity
Merge into: lp:ubuntu-qa-tools
Diff against target: 44 lines (+6/-3)
1 file modified
vm-tools/uvt (+6/-3)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-qa-tools/uvt-verbosity
Reviewer Review Type Date Requested Status
Marc Deslauriers Disapprove
Review via email: mp+287550@code.launchpad.net

Description of the change

The --quiet option should only be used with virt-install if we are not using verbose mode.

Using os-variant=generic26 was failing for me. Running 'osinfo-query os' I didn't see any generic options at all, so switched to ubuntu$release_num.

ubuntu14.04 | Ubuntu 14.04 LTS | 14.04 | http://ubuntu.com/ubuntu/14.04
 ubuntu14.10 | Ubuntu 14.10 | 14.10 | http://ubuntu.com/ubuntu/14.10
 ubuntu15.04 | Ubuntu 15.04 | 15.04 | http://ubuntu.com/ubuntu/15.04
 ubuntu15.10 | Ubuntu 15.10 | 15.10 | http://ubuntu.com/ubuntu/15.10
 ubuntu16.04 | Ubuntu 16.04 | 16.04 | http://ubuntu.com/ubuntu/16.04

To post a comment you must log in.
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the merge proposal.

I'm going to simply switch to 'generic' instead of 'ubuntu$release_num' as that will prevent us from running on earlier releases, or running newer versions of Ubuntu if they haven't yet been added to libosinfo.

We're overriding the disk and net options in our virt-install command anyway, so specifying the exact ubuntu version doesn't gain us anything.

I'll also add the verbose fix.

Thanks!

review: Disapprove

Unmerged revisions

1113. By Brian Murray

Don't use quiet if verbose. os-variant generic26 went away.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'vm-tools/uvt'
--- vm-tools/uvt 2016-02-04 13:12:50 +0000
+++ vm-tools/uvt 2016-02-29 23:26:23 +0000
@@ -161,6 +161,7 @@
161 arch,161 arch,
162 opt.bridge,162 opt.bridge,
163 release,163 release,
164 release_num,
164 opt.vnc,165 opt.vnc,
165 opt.loader,166 opt.loader,
166 ovmf_uefi=opt.ovmf_uefi,167 ovmf_uefi=opt.ovmf_uefi,
@@ -1555,7 +1556,7 @@
1555 print("ERROR: Something went wrong with qemu-img check!", file=sys.stderr)1556 print("ERROR: Something went wrong with qemu-img check!", file=sys.stderr)
1556 sys.exit(1)1557 sys.exit(1)
15571558
1558def create_vm(release_iso, vm_name, arch, bridge, release, vnc, loader, ovmf_uefi=False, verbose=False):1559def create_vm(release_iso, vm_name, arch, bridge, release, release_num, vnc, loader, ovmf_uefi=False, verbose=False):
1559 '''Creates a new vm with virt-install'''1560 '''Creates a new vm with virt-install'''
15601561
1561 if arch == "amd64":1562 if arch == "amd64":
@@ -1590,7 +1591,6 @@
1590 preseed_iso_path = os.path.join(uvt_conf['vm_dir_iso'], release_iso)1591 preseed_iso_path = os.path.join(uvt_conf['vm_dir_iso'], release_iso)
15911592
1592 args = [ 'virt-install',1593 args = [ 'virt-install',
1593 '--quiet',
1594 '--connect=qemu:///system',1594 '--connect=qemu:///system',
1595 '--name=' + vm_name,1595 '--name=' + vm_name,
1596 '--arch=' + virtinst_arch,1596 '--arch=' + virtinst_arch,
@@ -1606,12 +1606,15 @@
1606 '--hvm',1606 '--hvm',
1607 '--cdrom=' + preseed_iso_path,1607 '--cdrom=' + preseed_iso_path,
1608 '--os-type=linux',1608 '--os-type=linux',
1609 '--os-variant=generic26',1609 '--os-variant=ubuntu%s' % release_num,
1610 '--graphics=vnc',1610 '--graphics=vnc',
1611 '--network=' + network_type + ',model=' + vm_net,1611 '--network=' + network_type + ',model=' + vm_net,
1612 '--video=' + vm_video,1612 '--video=' + vm_video,
1613 '--noreboot' ]1613 '--noreboot' ]
16141614
1615 if not verbose:
1616 args.append('--quiet')
1617
1615 if vnc == False or 'DISPLAY' not in os.environ:1618 if vnc == False or 'DISPLAY' not in os.environ:
1616 args.append('--noautoconsole')1619 args.append('--noautoconsole')
16171620