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
1=== modified file 'vm-tools/uvt'
2--- vm-tools/uvt 2016-02-04 13:12:50 +0000
3+++ vm-tools/uvt 2016-02-29 23:26:23 +0000
4@@ -161,6 +161,7 @@
5 arch,
6 opt.bridge,
7 release,
8+ release_num,
9 opt.vnc,
10 opt.loader,
11 ovmf_uefi=opt.ovmf_uefi,
12@@ -1555,7 +1556,7 @@
13 print("ERROR: Something went wrong with qemu-img check!", file=sys.stderr)
14 sys.exit(1)
15
16-def create_vm(release_iso, vm_name, arch, bridge, release, vnc, loader, ovmf_uefi=False, verbose=False):
17+def create_vm(release_iso, vm_name, arch, bridge, release, release_num, vnc, loader, ovmf_uefi=False, verbose=False):
18 '''Creates a new vm with virt-install'''
19
20 if arch == "amd64":
21@@ -1590,7 +1591,6 @@
22 preseed_iso_path = os.path.join(uvt_conf['vm_dir_iso'], release_iso)
23
24 args = [ 'virt-install',
25- '--quiet',
26 '--connect=qemu:///system',
27 '--name=' + vm_name,
28 '--arch=' + virtinst_arch,
29@@ -1606,12 +1606,15 @@
30 '--hvm',
31 '--cdrom=' + preseed_iso_path,
32 '--os-type=linux',
33- '--os-variant=generic26',
34+ '--os-variant=ubuntu%s' % release_num,
35 '--graphics=vnc',
36 '--network=' + network_type + ',model=' + vm_net,
37 '--video=' + vm_video,
38 '--noreboot' ]
39
40+ if not verbose:
41+ args.append('--quiet')
42+
43 if vnc == False or 'DISPLAY' not in os.environ:
44 args.append('--noautoconsole')
45