Merge lp:~blake-rouse/maas/fix-1506991 into lp:~maas-committers/maas/trunk

Proposed by Blake Rouse
Status: Merged
Approved by: Blake Rouse
Approved revision: no longer in the source branch.
Merged at revision: 4382
Proposed branch: lp:~blake-rouse/maas/fix-1506991
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 26 lines (+5/-0)
2 files modified
src/maasserver/compose_preseed.py (+4/-0)
src/maasserver/tests/test_compose_preseed.py (+1/-0)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-1506991
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+274772@code.launchpad.net

Commit message

Prevent a node from contacting MAAS on every reboot.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (989.2 KiB)

The attempt to merge lp:~blake-rouse/maas/fix-1506991 into lp:maas failed. Below is the output from the failed tests.

Get:1 http://security.ubuntu.com trusty-security InRelease [64.4 kB]
Get:2 http://security.ubuntu.com trusty-security/main Sources [97.6 kB]
Get:3 http://security.ubuntu.com trusty-security/universe Sources [31.0 kB]
Get:4 http://security.ubuntu.com trusty-security/main amd64 Packages [351 kB]
Get:5 http://security.ubuntu.com trusty-security/universe amd64 Packages [117 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:6 http://nova.clouds.archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:7 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [239 kB]
Get:8 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [140 kB]
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [631 kB]
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [323 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,059 kB in 4s (505 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm pep8 phantomjs postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-pyparsing python-seamicroclient python-simplejson python-simplestreams python-sphinx python-subunit python-tempita python-testresources python-testscenarios python-te...

Revision history for this message
Christian Reis (kiko) wrote :

But.. doesn't this prevent us later from doing stuff like changing e-n-i
information?

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Kiko,

That I would assume would be a different cloud-init option to provide a webhook to check with MAAS on updating e-n-i. This is different and only a pre-2.0 cloud-init thing. When cloud-init grows that support we will handle that accordingly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/compose_preseed.py'
2--- src/maasserver/compose_preseed.py 2015-09-24 16:22:12 +0000
3+++ src/maasserver/compose_preseed.py 2015-10-16 19:56:17 +0000
4@@ -55,6 +55,10 @@
5 "manage_etc_hosts": False,
6 "apt_preserve_sources_list": True,
7 "apt_proxy": get_apt_proxy_for_node(node),
8+ # Prevent the node from requesting cloud-init data on every reboot.
9+ # This is done so a machine does not need to contact MAAS every time
10+ # it reboots.
11+ "manual_cache_clean": True,
12 # This is used as preseed for a node that's been installed.
13 # This will allow cloud-init to be configured with reporting for
14 # a node that has already been installed.
15
16=== modified file 'src/maasserver/tests/test_compose_preseed.py'
17--- src/maasserver/tests/test_compose_preseed.py 2015-09-24 16:22:12 +0000
18+++ src/maasserver/tests/test_compose_preseed.py 2015-10-16 19:56:17 +0000
19@@ -141,6 +141,7 @@
20 self.assertIn("apt_preserve_sources_list", data)
21 self.assertTrue(data["apt_preserve_sources_list"])
22 self.assertEqual(apt_proxy, data["apt_proxy"])
23+ self.assertTrue(data["manual_cache_clean"])
24
25 def test_compose_preseed_with_curtin_installer(self):
26 node = factory.make_Node(