Merge lp:~smoser/utah/trunk.xenial-cleanups into lp:utah

Proposed by Scott Moser
Status: Merged
Approved by: Max Brustkern
Approved revision: 1073
Merged at revision: 1071
Proposed branch: lp:~smoser/utah/trunk.xenial-cleanups
Merge into: lp:utah
Diff against target: 51 lines (+10/-2)
3 files modified
conf/utah/default-vm.xml (+1/-1)
utah/process.py (+8/-1)
utah/provisioning/vm.py (+1/-0)
To merge this branch: bzr merge lp:~smoser/utah/trunk.xenial-cleanups
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Review via email: mp+285091@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'conf/utah/default-vm.xml'
2--- conf/utah/default-vm.xml 2012-07-11 18:01:21 +0000
3+++ conf/utah/default-vm.xml 2016-02-04 16:30:14 +0000
4@@ -35,7 +35,7 @@
5 <clock offset='utc'/>
6 <on_poweroff>destroy</on_poweroff>
7 <on_reboot>restart</on_reboot>
8- <on_crash>restart</on_crash>
9+ <on_crash>destroy</on_crash><!-- this could also be 'preserve' -->
10 <devices>
11 <disk type='file' device='cdrom'>
12 <driver name='qemu' type='raw'/>
13
14=== modified file 'utah/process.py'
15--- utah/process.py 2014-07-10 14:58:45 +0000
16+++ utah/process.py 2016-02-04 16:30:14 +0000
17@@ -30,6 +30,13 @@
18
19 from utah import logger
20
21+def get_pid_list():
22+ try:
23+ # psutil versions > 2
24+ return psutil.pids()
25+ except AttributeError:
26+ return psutil.get_pid_list()
27+
28
29 def pid_in_use(pid, arg_patterns=None):
30 """Test if the given pid is running.
31@@ -80,7 +87,7 @@
32 :rtype: bool
33
34 """
35- pids = psutil.get_pid_list()
36+ pids = get_pid_list()
37 cmdlines = []
38 for pid in pids:
39 try:
40
41=== modified file 'utah/provisioning/vm.py'
42--- utah/provisioning/vm.py 2015-09-22 22:03:50 +0000
43+++ utah/provisioning/vm.py 2016-02-04 16:30:14 +0000
44@@ -387,6 +387,7 @@
45 source = ElementTree.Element('source')
46 source.set('path', self.syslog)
47 serial.append(source)
48+ serial.append('append', 'on')
49 target = ElementTree.Element('target')
50 target.set('port', '0')
51 serial.append(target)

Subscribers

People subscribed via source and target branches