Merge lp:~hopem/maas-deployer/lp1490978 into lp:~maas-deployers/maas-deployer/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 28
Proposed branch: lp:~hopem/maas-deployer/lp1490978
Merge into: lp:~maas-deployers/maas-deployer/next
Diff against target: 20 lines (+9/-1)
1 file modified
maas_deployer/vmaas/engine.py (+9/-1)
To merge this branch: bzr merge lp:~hopem/maas-deployer/lp1490978
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Review via email: mp+269756@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Billy Olsen (billy-olsen) wrote :

LGTM. I will note that libvirt still seems to be placing an error on the output, but we don't end up with a big ugly stack and the commissioning can continue, so I'm +1 on this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maas_deployer/vmaas/engine.py'
2--- maas_deployer/vmaas/engine.py 2015-09-01 08:18:16 +0000
3+++ maas_deployer/vmaas/engine.py 2015-09-01 13:49:36 +0000
4@@ -457,7 +457,15 @@
5 virsh_info = maas_config.get('virsh')
6 juju_node = self._get_juju_nodename(nodes)
7 if juju_node is not None and not virsh_info:
8- util.virsh(['start', juju_node])
9+ try:
10+ _, stderr = util.virsh(['start', juju_node])
11+ except CalledProcessError as exc:
12+ # Ignore already started error
13+ msg = 'Domain is already active'
14+ if msg not in exc.output:
15+ raise
16+ else:
17+ log.debug(msg)
18
19 self._wait_for_nodes_to_commission(client)
20 self._claim_sticky_ip_address(client, maas_config)

Subscribers

People subscribed via source and target branches