Merge lp:~rvb/maas-test/install-cluster-first into lp:maas-test

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: 156
Merged at revision: 155
Proposed branch: lp:~rvb/maas-test/install-cluster-first
Merge into: lp:maas-test
Diff against target: 39 lines (+7/-5)
1 file modified
maastest/maasfixture.py (+7/-5)
To merge this branch: bzr merge lp:~rvb/maas-test/install-cluster-first
Reviewer Review Type Date Requested Status
Graham Binns (community) Approve
Review via email: mp+217416@code.launchpad.net

Commit message

Configure the cluster before importing the images. Some of the power types rely on the arp cache being populated so that maas-test finds the IP address of the BMC; Configuring the DHCP server early (i.e. before importing the images which takes a lot of time) will help with that since the BMC will be able to get an IP address using DHCP more quickly.

To post a comment you must log in.
156. By Raphaël Badin

Add logging.

Revision history for this message
Graham Binns (gmb) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maastest/maasfixture.py'
2--- maastest/maasfixture.py 2014-04-25 15:46:59 +0000
3+++ maastest/maasfixture.py 2014-04-28 11:23:55 +0000
4@@ -362,17 +362,17 @@
5 self.addCleanup(self.collect_logs)
6 self.addCleanup(self.dump_data)
7
8- # Now do the rest of the setup: import images, configure the
9- # controllers, and so on.
10+ # Now do the rest of the setup: configure the
11+ # controllers, import images, and so on.
12+ if self.kvm_fixture.direct_ip is not None:
13+ self.check_cluster_connected()
14+ self.configure_cluster()
15 self.import_maas_images(
16 series=self.series, architecture=self.architecture,
17 simplestreams_filter=self.simplestreams_filter,
18 image_stream_url=self.image_stream_url)
19 self.wait_until_boot_images_scanned()
20 self.configure_default_series(self.series)
21- if self.kvm_fixture.direct_ip is not None:
22- self.check_cluster_connected()
23- self.configure_cluster()
24
25 def log_connection_details(self):
26 """Log the details on how to connect to this MAAS server."""
27@@ -433,6 +433,7 @@
28 raise Exception("Master cluster failed to connect.")
29
30 def configure_cluster(self):
31+ logging.info("Configuring cluster...")
32 network = self.kvm_fixture.direct_network
33 first_ip = self.kvm_fixture.direct_first_available_ip()
34 last_ip = "%s" % netaddr.IPAddress(
35@@ -460,3 +461,4 @@
36
37 if response.code != httplib.OK:
38 raise Exception("Error configure the master cluster")
39+ logging.info("Done configuring cluster.")

Subscribers

People subscribed via source and target branches