Merge lp:~ltrager/maas/xenial_default into lp:~maas-committers/maas/trunk

Proposed by Lee Trager
Status: Merged
Approved by: Lee Trager
Approved revision: no longer in the source branch.
Merged at revision: 4887
Proposed branch: lp:~ltrager/maas/xenial_default
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 338 lines (+47/-31)
19 files modified
README (+1/-1)
docs/_static/versions.js (+1/-1)
docs/about.rst (+3/-3)
docs/bootsources.rst (+1/-1)
docs/index.rst (+1/-1)
docs/sstreams-mirror.rst (+1/-1)
src/maascli/parser.py (+1/-1)
src/maasserver/bootresources.py (+4/-4)
src/maasserver/bootsources.py (+6/-3)
src/maasserver/enum.py (+1/-1)
src/maasserver/forms.py (+1/-1)
src/maasserver/models/tests/test_bootresourceset.py (+1/-1)
src/maasserver/testing/factory.py (+1/-1)
src/maasserver/tests/test_bootresources.py (+1/-1)
src/maasserver/tests/test_bootsources.py (+4/-4)
src/provisioningserver/config.py (+1/-1)
src/provisioningserver/drivers/osystem/tests/test_ubuntu.py (+7/-2)
src/provisioningserver/drivers/osystem/ubuntu.py (+10/-2)
src/provisioningserver/import_images/tests/test_download_resources.py (+1/-1)
To merge this branch: bzr merge lp:~ltrager/maas/xenial_default
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+291210@code.launchpad.net

Commit message

Set Xenial as the default image and commissioing release. Set images.maas.io as the default simplestream.

Description of the change

The default commissioning release and image to deploy are both set by looking at what UbuntuOS.lts() is set to. This is a child class of UbuntuDistroInfo, an external package. Because Xenial isn't released yet its still showing trusty. I modified UbuntuOS to return Xenial for now, once Xenial is released we can remove this work around. The default image was actually hard coded so I modified it to also get its data from UbuntuOS.

I also noticed that the default simplestream was still set to maas.ubuntu.com, which redirects to images.maas.io. I set the default stream to https://images.maas.io. As the docs are still on maas.ubuntu.com I left those URLs alone.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good. Thanks for fixing the import url.

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

The attempt to merge lp:~ltrager/maas/xenial_default into lp:maas failed. Below is the output from the failed tests.

Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main Sources [1,109 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,436 kB]
Fetched 2,792 kB in 0s (3,390 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bash 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 postgresql pxelinux python3-all python3-apt python3-bson python3-convoy python3-coverage python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-mock python3-netaddr python3-netifaces python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu1).
archdetect-deb is already the newest version (1.117ubuntu1).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
bind9 is already the newest version (1:9.10.3.dfsg.P4-5).
bind9utils is already the newest version (1:9.10.3.dfsg.P4-5).
build-essential is already the newest version (12.1ubuntu2).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubuntu3).
dh-apport is already the newest version (2.20.1-0ubuntu1).
dh-systemd is already the newest version (1.29ubuntu1).
distro-info is already the newest version (0.14build1).
dnsutils is already the newest version (1:9.10.3.dfsg.P4-5).
firefox is already the newest version (45.0.1+build1-0ubuntu1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1...

Revision history for this message
Scott Moser (smoser) wrote :

just an fyi, for anyone ever looking here, i opened bug at https://bugs.launchpad.net/maas/+bug/1582836 for the apparently unrelated change from http to https

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2014-03-26 11:11:08 +0000
3+++ README 2016-04-07 07:49:45 +0000
4@@ -29,4 +29,4 @@
5
6 For more information see the `MAAS guide`_.
7
8-.. _MAAS guide: https://maas.ubuntu.com/
9+.. _MAAS guide: https://maas.io/
10
11=== modified file 'docs/_static/versions.js'
12--- docs/_static/versions.js 2014-04-14 21:42:00 +0000
13+++ docs/_static/versions.js 2016-04-07 07:49:45 +0000
14@@ -2,7 +2,7 @@
15
16 This is mostly done, but not limited to support creating links
17 between the different versions of the MAAS documentation on
18-maas.ubuntu.com.
19+maas.io.
20
21 */
22
23
24=== modified file 'docs/about.rst'
25--- docs/about.rst 2014-11-10 16:39:12 +0000
26+++ docs/about.rst 2016-04-07 07:49:45 +0000
27@@ -23,10 +23,10 @@
28 However, it is also possible that there have been additional sections,
29 or more helpful and clearer bits added since the package you are using
30 was made. For this reason you can always find the latest documentation
31-online here: `http://maas.ubuntu.com`_.
32+online here: `http://maas.io/`_.
33
34-.. _http://maas.ubuntu.com:
35- http://maas.ubuntu.com
36+.. _http://maas.io/:
37+ http://maas.io
38
39
40 Contributing
41
42=== modified file 'docs/bootsources.rst'
43--- docs/bootsources.rst 2015-08-21 20:35:25 +0000
44+++ docs/bootsources.rst 2016-04-07 07:49:45 +0000
45@@ -20,7 +20,7 @@
46 $ maas $PROFILE boot-sources read
47 [
48 {
49- "url": "http://maas.ubuntu.com/images/ephemeral-v2/releases/",
50+ "url": "https://images.maas.io/ephemeral-v2/releases/",
51 "keyring_data": "",
52 "resource_uri": "<url omitted for readability>",
53 "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg",
54
55=== modified file 'docs/index.rst'
56--- docs/index.rst 2016-03-28 13:54:47 +0000
57+++ docs/index.rst 2016-04-07 07:49:45 +0000
58@@ -25,7 +25,7 @@
59 compute nodes and redeploy it to Hadoop. When you're done, it's just
60 as easy to give the node back to Nova.
61
62-.. _MAAS project: http://maas.ubuntu.com
63+.. _MAAS project: http://maas.io/
64 .. _Juju: https://juju.ubuntu.com/
65
66 MAAS is ideal where you want the flexibility of the cloud, and the
67
68=== modified file 'docs/sstreams-mirror.rst'
69--- docs/sstreams-mirror.rst 2015-12-04 19:33:29 +0000
70+++ docs/sstreams-mirror.rst 2016-04-07 07:49:45 +0000
71@@ -15,7 +15,7 @@
72 This example gets the daily trusty (14.04) and precise (12.04) images for the
73 amd64/generic and amd64/hwe-t architectures::
74
75- $ sudo sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://maas.ubuntu.com/images/ephemeral-v2/daily/ /var/www/html/maas/images/ephemeral-v2/daily 'arch=amd64' 'subarch~(generic|hwe-t)' 'release~(trusty|precise)' --max=1
76+ $ sudo sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg https://images.maas.io/ephemeral-v2/daily/ /var/www/html/maas/images/ephemeral-v2/daily 'arch=amd64' 'subarch~(generic|hwe-t)' 'release~(trusty|precise)' --max=1
77
78 This may take a while as hundreds of megabytes will be downloaded.
79
80
81=== modified file 'src/maascli/parser.py'
82--- src/maascli/parser.py 2015-12-15 22:44:22 +0000
83+++ src/maascli/parser.py 2016-04-07 07:49:45 +0000
84@@ -66,7 +66,7 @@
85 help_title, help_body = parse_docstring(api)
86 parser = ArgumentParser(
87 description=help_body, prog=argv[0],
88- epilog="http://maas.ubuntu.com/")
89+ epilog="http://maas.io/")
90 register_cli_commands(parser)
91 api.register_api_commands(parser)
92 parser.add_argument(
93
94=== modified file 'src/maasserver/bootresources.py'
95--- src/maasserver/bootresources.py 2016-03-28 13:54:47 +0000
96+++ src/maasserver/bootresources.py 2016-04-07 07:49:45 +0000
97@@ -459,7 +459,7 @@
98 architecture = '%s/%s' % (arch, subarch)
99
100 # Allow a generated resource to be replaced by a sycned resource. This
101- # gives the ability for maas.ubuntu.com to start providing images that
102+ # gives the ability for maas.io to start providing images that
103 # MAAS used to generate itself.
104 supported_rtypes = [
105 BOOT_RESOURCE_TYPE.SYNCED,
106@@ -484,7 +484,7 @@
107 # replaced with this synced image.
108 resource.rtype = BOOT_RESOURCE_TYPE.SYNCED
109
110- # Simplestreams content from maas.ubuntu.com includes the following
111+ # Simplestreams content from maas.io includes the following
112 # extra fields. Looping through the extra product data and adding it to
113 # extra will not work as the product data that is passed into this
114 # object store contains additional data that should not be stored into
115@@ -517,7 +517,7 @@
116 """Get existing `BootResourceFile` for the given resource set and
117 product or create a new one if one does not exist."""
118 # For synced resources the filename is the same as the filetype. This
119- # is the way the data is from maas.ubuntu.com so we emulate that here.
120+ # is the way the data is from maas.io so we emulate that here.
121 filetype = product['ftype']
122 filename = filetype
123 rfile = get_one(resource_set.files.filter(filename=filename))
124@@ -529,7 +529,7 @@
125 rfile.filetype = filetype
126 rfile.extra = {}
127
128- # Simplestreams content from maas.ubuntu.com includes the following
129+ # Simplestreams content from maas.io includes the following
130 # extra fields. Looping through the extra product data and adding it to
131 # extra will not work as the product data that is passed into this
132 # object store contains additional data that should not be stored into
133
134=== modified file 'src/maasserver/bootsources.py'
135--- src/maasserver/bootsources.py 2015-12-01 18:12:59 +0000
136+++ src/maasserver/bootsources.py 2016-04-07 07:49:45 +0000
137@@ -1,4 +1,4 @@
138-# Copyright 2014-2015 Canonical Ltd. This software is licensed under the
139+# Copyright 2014-2016 Canonical Ltd. This software is licensed under the
140 # GNU Affero General Public License version 3 (see the file LICENSE).
141
142 """Boot Sources."""
143@@ -26,6 +26,7 @@
144 from maasserver.utils.orm import transactional
145 from maasserver.utils.threads import deferToDatabase
146 from provisioningserver.auth import get_maas_user_gpghome
147+from provisioningserver.drivers.osystem.ubuntu import UbuntuOS
148 from provisioningserver.import_images.download_descriptions import (
149 download_all_image_descriptions,
150 )
151@@ -48,13 +49,15 @@
152 """Set default boot source if none is currently defined."""
153 if not BootSource.objects.exists():
154 source = BootSource.objects.create(
155- url='http://maas.ubuntu.com/images/ephemeral-v2/releases/',
156+ url='https://images.maas.io/ephemeral-v2/releases/',
157 keyring_filename=(
158 '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg'))
159 # Default is to import newest Ubuntu LTS releases, for only amd64
160 # release versions only.
161+ ubuntu = UbuntuOS()
162 BootSourceSelection.objects.create(
163- boot_source=source, os='ubuntu', release='trusty',
164+ boot_source=source, os=ubuntu.name,
165+ release=ubuntu.get_default_commissioning_release(),
166 arches=['amd64'], subarches=['*'], labels=['release'])
167
168
169
170=== modified file 'src/maasserver/enum.py'
171--- src/maasserver/enum.py 2016-03-31 23:34:55 +0000
172+++ src/maasserver/enum.py 2016-04-07 07:49:45 +0000
173@@ -310,7 +310,7 @@
174 ROOT_DD = 'root-dd'
175
176 # Following are not allowed on user upload. Only used for syncing
177- # from another simplestreams source. (Most likely maas.ubuntu.com)
178+ # from another simplestreams source. (Most likely maas.io)
179
180 #: Root Image (gets converted to root-image root-tgz, on Cluster)
181 ROOT_IMAGE = 'root-image.gz'
182
183=== modified file 'src/maasserver/forms.py'
184--- src/maasserver/forms.py 2016-03-28 13:54:47 +0000
185+++ src/maasserver/forms.py 2016-04-07 07:49:45 +0000
186@@ -1348,7 +1348,7 @@
187 label="Sync URL", required=True,
188 help_text=(
189 "URL to sync boot image from. E.g. "
190- "http://maas.ubuntu.com/images/ephemeral-v2/releases/"))
191+ "https://images.maas.io/ephemeral-v2/releases/"))
192
193 def __init__(self, *args, **kwargs):
194 super(BootSourceSettingsForm, self).__init__(*args, **kwargs)
195
196=== modified file 'src/maasserver/models/tests/test_bootresourceset.py'
197--- src/maasserver/models/tests/test_bootresourceset.py 2016-03-28 13:54:47 +0000
198+++ src/maasserver/models/tests/test_bootresourceset.py 2016-04-07 07:49:45 +0000
199@@ -24,7 +24,7 @@
200 for filetype in filetypes:
201 # We set the filename to the same value as filetype, as in most
202 # cases this will always be true. The simplestreams content from
203- # maas.ubuntu.com, is formatted this way.
204+ # maas.io, is formatted this way.
205 factory.make_boot_resource_file_with_content(
206 resource_set, filename=filetype, filetype=filetype)
207
208
209=== modified file 'src/maasserver/testing/factory.py'
210--- src/maasserver/testing/factory.py 2016-03-28 13:54:47 +0000
211+++ src/maasserver/testing/factory.py 2016-04-07 07:49:45 +0000
212@@ -1318,7 +1318,7 @@
213 for filetype in filetypes:
214 # We set the filename to the same value as filetype, as in most
215 # cases this will always be true. The simplestreams content from
216- # maas.ubuntu.com, is formatted this way.
217+ # maas.io, is formatted this way.
218 self.make_boot_resource_file_with_content(
219 resource_set, filename=filetype, filetype=filetype)
220 return resource
221
222=== modified file 'src/maasserver/tests/test_bootresources.py'
223--- src/maasserver/tests/test_bootresources.py 2016-03-28 13:54:47 +0000
224+++ src/maasserver/tests/test_bootresources.py 2016-04-07 07:49:45 +0000
225@@ -479,7 +479,7 @@
226 filetype = factory.pick_enum(BOOT_RESOURCE_FILE_TYPE)
227 # We set the filename to the same value as filetype, as in most
228 # cases this will always be true. The simplestreams content from
229- # maas.ubuntu.com, is formatted this way.
230+ # maas.io, is formatted this way.
231 filename = filetype
232 size = randint(1024, 2048)
233 content = factory.make_bytes(size=size)
234
235=== modified file 'src/maasserver/tests/test_bootsources.py'
236--- src/maasserver/tests/test_bootsources.py 2016-03-28 13:54:47 +0000
237+++ src/maasserver/tests/test_bootsources.py 2016-04-07 07:49:45 +0000
238@@ -102,7 +102,7 @@
239 self.assertAttributes(
240 source,
241 {
242- 'url': 'http://maas.ubuntu.com/images/ephemeral-v2/releases/',
243+ 'url': 'https://images.maas.io/ephemeral-v2/releases/',
244 'keyring_filename': (
245 '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg'),
246 })
247@@ -111,11 +111,11 @@
248 selection.release: selection
249 for selection in selections
250 }
251- self.assertItemsEqual(['trusty'], by_release.keys())
252+ self.assertItemsEqual(['xenial'], by_release.keys())
253 self.assertAttributes(
254- by_release['trusty'],
255+ by_release['xenial'],
256 {
257- 'release': 'trusty',
258+ 'release': 'xenial',
259 'arches': ['amd64'],
260 'subarches': ['*'],
261 'labels': ['release'],
262
263=== modified file 'src/provisioningserver/config.py'
264--- src/provisioningserver/config.py 2016-03-28 13:54:47 +0000
265+++ src/provisioningserver/config.py 2016-04-07 07:49:45 +0000
266@@ -181,7 +181,7 @@
267 if_key_missing = None
268
269 url = UnicodeString(
270- if_missing="http://maas.ubuntu.com/images/ephemeral-v2/releases/")
271+ if_missing="https://images.maas.io/ephemeral-v2/releases/")
272 keyring = UnicodeString(
273 if_missing="/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg")
274 keyring_data = UnicodeString(if_missing="")
275
276=== modified file 'src/provisioningserver/drivers/osystem/tests/test_ubuntu.py'
277--- src/provisioningserver/drivers/osystem/tests/test_ubuntu.py 2015-12-18 00:07:25 +0000
278+++ src/provisioningserver/drivers/osystem/tests/test_ubuntu.py 2016-04-07 07:49:45 +0000
279@@ -1,4 +1,4 @@
280-# Copyright 2014-2015 Canonical Ltd. This software is licensed under the
281+# Copyright 2014-2016 Canonical Ltd. This software is licensed under the
282 # GNU Affero General Public License version 3 (see the file LICENSE).
283
284 """Tests for the UbuntuOS module."""
285@@ -18,7 +18,12 @@
286 class TestUbuntuOS(MAASTestCase):
287
288 def get_lts_release(self):
289- return UbuntuDistroInfo().lts()
290+ # XXX ltrager 2016-04-06 - python3-distro-info won't set the latest lts
291+ # to Xenial until its been released. So we can start testing MAAS 2.0
292+ # with Xenial by default override it here. Once Xenial is released this
293+ # can be removed
294+ # return UbuntuDistroInfo().lts()
295+ return "xenial"
296
297 def get_release_title(self, release):
298 info = UbuntuDistroInfo()
299
300=== modified file 'src/provisioningserver/drivers/osystem/ubuntu.py'
301--- src/provisioningserver/drivers/osystem/ubuntu.py 2015-12-17 03:22:59 +0000
302+++ src/provisioningserver/drivers/osystem/ubuntu.py 2016-04-07 07:49:45 +0000
303@@ -1,4 +1,4 @@
304-# Copyright 2014-2015 Canonical Ltd. This software is licensed under the
305+# Copyright 2014-2016 Canonical Ltd. This software is licensed under the
306 # GNU Affero General Public License version 3 (see the file LICENSE).
307
308 """Ubuntu Operating System."""
309@@ -39,7 +39,15 @@
310
311 def get_lts_release(self):
312 """Return the latest Ubuntu LTS release."""
313- return self.ubuntu_distro_info.lts()
314+ lts_release = self.ubuntu_distro_info.lts()
315+ # XXX ltrager 2016-04-06 - python3-distro-info won't set the latest lts
316+ # to Xenial until its been released. So we can start testing MAAS 2.0
317+ # with Xenial by default override it here. Once Xenial is released this
318+ # can be removed
319+ if lts_release == "trusty":
320+ return "xenial"
321+ else:
322+ return lts_release
323
324 def get_default_release(self):
325 """Gets the default release to use when a release is not
326
327=== modified file 'src/provisioningserver/import_images/tests/test_download_resources.py'
328--- src/provisioningserver/import_images/tests/test_download_resources.py 2016-03-28 13:54:47 +0000
329+++ src/provisioningserver/import_images/tests/test_download_resources.py 2016-04-07 07:49:45 +0000
330@@ -73,7 +73,7 @@
331 snapshot_path = self.make_dir()
332 cache_path = os.path.join(storage_path, 'cache')
333 file_store = FileStore(cache_path)
334- source_url = "http://maas.ubuntu.com/images/ephemeral-v2/releases/"
335+ source_url = "https://images.maas.io/ephemeral-v2/releases/"
336
337 download_resources.download_boot_resources(
338 source_url, file_store, snapshot_path, None, None)