Merge lp:~mpontillo/maas/fresh-images into lp:~maas-committers/maas/trunk
- fresh-images
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Mike Pontillo | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5032 | ||||
Proposed branch: | lp:~mpontillo/maas/fresh-images | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
149 lines (+20/-7) 8 files modified
docs/bootsources.rst (+1/-1) docs/sstreams-mirror.rst (+6/-0) src/maasserver/bootsources.py (+2/-1) src/maasserver/forms.py (+3/-2) src/maasserver/rpc/tests/test_regionservice.py (+1/-0) src/maasserver/tests/test_bootsources.py (+2/-1) src/provisioningserver/config.py (+3/-1) src/provisioningserver/import_images/tests/test_download_resources.py (+2/-1) |
||||
To merge this branch: | bzr merge lp:~mpontillo/maas/fresh-images | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email:
|
Commit message
Change default image selection to 'daily' from 'releases'. Drive-by fix to revert image sync protocol to http from https, to accommodate customer use cases and because images are already verified cryptographically.
Description of the change

Mike Pontillo (mpontillo) wrote : | # |

Lee Trager (ltrager) wrote : | # |
Should we document that releases still exists? Will releases ever go away(including making releases a sym link to daily)?

Blake Rouse (blake-rouse) wrote : | # |
"It shouldn't be 5 places in the code..."? So why not fix that now?

Mike Pontillo (mpontillo) wrote : | # |
I was about to. ;-)

Mike Pontillo (mpontillo) wrote : | # |
I'll document that `releases` still exists, thanks Lee. I expect that a few customers won't want to be on the bleeding edge, so it'll be good for them to know.

Scott Moser (smoser) wrote : | # |
Do realize that you're not really doing anything other than kicking the can from releases to daily.
The goal of this I believe is to resolve "we need fresh images".
The 'released' stream was not fresh because it required someone to QA that before you promoted it to released. The solution you've provided to this is to just use the daily stream.
That effectively just accepts "there is no QA".
If you're willing to do that, then you might has well just automatically move things from 'daily' to 'released'. Then at least in the future should you ever have a way to apply QA before promoting you don't have to build a "pre-daily" ppa to perform that QA on and then promote from 'pre-daily' to 'daily'.
Note that we clearly have no intent of ever producing bad things in daily, but reality is that people make mistakes (https:/

Mike Pontillo (mpontillo) wrote : | # |
@smoser, I feel like we should converge on a more granular way to select a risk-level for images, to be consistent with what we're doing elsewhere in the company.
For example, you could have:
stable - equivalent to the latest point release? (14.04.4 for example)
candidate - moved for every RC when a new release is coming
beta - automatically moved based on some set of tests
edge - freshest images (equivalent to daily today)

Blake Rouse (blake-rouse) wrote : | # |
@smoser - Yes no QA, we know that. But again this is what is in *-updates pocket so if it doesn't work Ubuntu is already in hot water.
I think we should create a updated symlink between:
updated -> daily
So for now we can accept no QA, but later we can add QA and convert updated into its own stream. This will allow us to keep releases as they are today.

Mike Pontillo (mpontillo) wrote : | # |
(Based on my stake in the ground for what each "risk channel" means, I think if we moved to the model above, `beta` would be the default.)

Mike Pontillo (mpontillo) wrote : | # |
Alternatively, skip the `beta` channel altogether and we could just do stable/

Mike Pontillo (mpontillo) wrote : | # |
Sorry, I meant stable/

Blake Rouse (blake-rouse) wrote : | # |
Looks good. Lets go with this.

MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~mpontillo/maas/fresh-images into lp:maas failed. Below is the output from the failed tests.
Get:1 http://
Hit:2 http://
Get:3 http://
Hit:4 http://
Fetched 188 kB in 0s (432 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
libpq-dev is already the newest version (9.5.2-1).
make is already the newest version (4.1-6).
postgresql is already the newest versio...

Mike Pontillo (mpontillo) wrote : | # |
Filed a bug for this test failure:
https:/
Rolling the dice again.

MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~mpontillo/maas/fresh-images into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Get:2 http://
Hit:3 http://
Get:4 http://
Fetched 188 kB in 0s (466 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
libpq-dev is already the newest version (9.5.2-1).
make is already the newest version (4.1-6).
postgresql is already the newest versio...

MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~mpontillo/maas/fresh-images into lp:maas failed. Below is the output from the failed tests.
Get:1 http://
Hit:2 http://
Get:3 http://
Hit:4 http://
Fetched 188 kB in 0s (451 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
libpq-dev is already the newest version (9.5.2-1).
make is already the newest version (4.1-6).
postgresql is already the newest versio...

MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~mpontillo/maas/fresh-images into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Get:2 http://
Get:3 http://
Hit:4 http://
Fetched 188 kB in 0s (408 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
libpq-dev is already the newest version (9.5.2-1).
make is already the newest version (4.1-6).
postgresql is already the newest versio...

Mike Pontillo (mpontillo) wrote : | # |
I talked to Gavin about this repeatedly-failing test case, and he's still working on getting it passing 100% of the tine, but is out of the office today. So I'll add a skip for now.
Preview Diff
1 | === modified file 'docs/bootsources.rst' |
2 | --- docs/bootsources.rst 2016-04-11 16:23:26 +0000 |
3 | +++ docs/bootsources.rst 2016-05-18 08:18:24 +0000 |
4 | @@ -20,7 +20,7 @@ |
5 | $ maas $PROFILE boot-sources read |
6 | [ |
7 | { |
8 | - "url": "https://images.maas.io/ephemeral-v2/releases/", |
9 | + "url": "http://images.maas.io/ephemeral-v2/daily/", |
10 | "keyring_data": "", |
11 | "resource_uri": "<url omitted for readability>", |
12 | "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg", |
13 | |
14 | === modified file 'docs/sstreams-mirror.rst' |
15 | --- docs/sstreams-mirror.rst 2016-04-11 16:23:26 +0000 |
16 | +++ docs/sstreams-mirror.rst 2016-05-18 08:18:24 +0000 |
17 | @@ -35,6 +35,12 @@ |
18 | can use the ``maas`` (see :doc:`maascli`) command, logged in as the admin |
19 | user:: |
20 | |
21 | + $ maas <profile> boot-sources create url=http://<server>/images/ephemeral-v2/daily/ keyring_filename=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg |
22 | + |
23 | +Note that if you wish to use older images (which change far less frequently, |
24 | +but will be lacking security updates), you can use the ``releases`` stream, |
25 | +such as:: |
26 | + |
27 | $ maas <profile> boot-sources create url=http://<server>/images/ephemeral-v2/releases/ keyring_filename=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg |
28 | |
29 | And then initiate the download with:: |
30 | |
31 | === modified file 'src/maasserver/bootsources.py' |
32 | --- src/maasserver/bootsources.py 2016-04-23 08:53:54 +0000 |
33 | +++ src/maasserver/bootsources.py 2016-05-18 08:18:24 +0000 |
34 | @@ -26,6 +26,7 @@ |
35 | from maasserver.utils.orm import transactional |
36 | from maasserver.utils.threads import deferToDatabase |
37 | from provisioningserver.auth import get_maas_user_gpghome |
38 | +from provisioningserver.config import DEFAULT_IMAGES_URL |
39 | from provisioningserver.drivers.osystem.ubuntu import UbuntuOS |
40 | from provisioningserver.import_images.download_descriptions import ( |
41 | download_all_image_descriptions, |
42 | @@ -49,7 +50,7 @@ |
43 | """Set default boot source if none is currently defined.""" |
44 | if not BootSource.objects.exists(): |
45 | source = BootSource.objects.create( |
46 | - url='https://images.maas.io/ephemeral-v2/releases/', |
47 | + url=DEFAULT_IMAGES_URL, |
48 | keyring_filename=( |
49 | '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg')) |
50 | # Default is to import newest Ubuntu LTS releases, for only amd64 |
51 | |
52 | === modified file 'src/maasserver/forms.py' |
53 | --- src/maasserver/forms.py 2016-05-11 19:01:48 +0000 |
54 | +++ src/maasserver/forms.py 2016-05-18 08:18:24 +0000 |
55 | @@ -153,6 +153,7 @@ |
56 | IPNetwork, |
57 | valid_ipv6, |
58 | ) |
59 | +from provisioningserver.config import DEFAULT_IMAGES_URL |
60 | from provisioningserver.logger import get_maas_logger |
61 | from provisioningserver.utils.network import make_network |
62 | from provisioningserver.utils.twisted import ( |
63 | @@ -1403,8 +1404,8 @@ |
64 | boot_source_url = forms.URLField( |
65 | label="Sync URL", required=True, |
66 | help_text=( |
67 | - "URL to sync boot image from. E.g. " |
68 | - "https://images.maas.io/ephemeral-v2/releases/")) |
69 | + "URL to sync boot image from. E.g. %s" % ( |
70 | + DEFAULT_IMAGES_URL))) |
71 | |
72 | def __init__(self, *args, **kwargs): |
73 | super(BootSourceSettingsForm, self).__init__(*args, **kwargs) |
74 | |
75 | === modified file 'src/maasserver/rpc/tests/test_regionservice.py' |
76 | --- src/maasserver/rpc/tests/test_regionservice.py 2016-05-17 16:45:31 +0000 |
77 | +++ src/maasserver/rpc/tests/test_regionservice.py 2016-05-18 08:18:24 +0000 |
78 | @@ -746,6 +746,7 @@ |
79 | |
80 | self.assertThat(service.ports, Equals([sentinel.port])) |
81 | |
82 | + @skip("XXX test fails far too often; bug #1582944") |
83 | @wait_for_reactor |
84 | @inlineCallbacks |
85 | def test_start_up_logs_failure_if_all_endpoint_options_fail(self): |
86 | |
87 | === modified file 'src/maasserver/tests/test_bootsources.py' |
88 | --- src/maasserver/tests/test_bootsources.py 2016-05-12 19:07:37 +0000 |
89 | +++ src/maasserver/tests/test_bootsources.py 2016-05-18 08:18:24 +0000 |
90 | @@ -34,6 +34,7 @@ |
91 | MAASTransactionServerTestCase, |
92 | ) |
93 | from maasserver.tests.test_bootresources import SimplestreamsEnvFixture |
94 | +from provisioningserver.config import DEFAULT_IMAGES_URL |
95 | from provisioningserver.import_images import ( |
96 | download_descriptions as download_descriptions_module, |
97 | ) |
98 | @@ -102,7 +103,7 @@ |
99 | self.assertAttributes( |
100 | source, |
101 | { |
102 | - 'url': 'https://images.maas.io/ephemeral-v2/releases/', |
103 | + 'url': DEFAULT_IMAGES_URL, |
104 | 'keyring_filename': ( |
105 | '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg'), |
106 | }) |
107 | |
108 | === modified file 'src/provisioningserver/config.py' |
109 | --- src/provisioningserver/config.py 2016-04-11 16:23:26 +0000 |
110 | +++ src/provisioningserver/config.py 2016-05-18 08:18:24 +0000 |
111 | @@ -162,6 +162,8 @@ |
112 | # Default result for cluster UUID if not set |
113 | UUID_NOT_SET = None |
114 | |
115 | +DEFAULT_IMAGES_URL = "http://images.maas.io/ephemeral-v2/daily/" |
116 | + |
117 | |
118 | class BootSourceSelection(Schema): |
119 | """Configuration validator for boot source selection configuration.""" |
120 | @@ -181,7 +183,7 @@ |
121 | if_key_missing = None |
122 | |
123 | url = UnicodeString( |
124 | - if_missing="https://images.maas.io/ephemeral-v2/releases/") |
125 | + if_missing=DEFAULT_IMAGES_URL) |
126 | keyring = UnicodeString( |
127 | if_missing="/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg") |
128 | keyring_data = UnicodeString(if_missing="") |
129 | |
130 | === modified file 'src/provisioningserver/import_images/tests/test_download_resources.py' |
131 | --- src/provisioningserver/import_images/tests/test_download_resources.py 2016-05-12 19:07:37 +0000 |
132 | +++ src/provisioningserver/import_images/tests/test_download_resources.py 2016-05-18 08:18:24 +0000 |
133 | @@ -11,6 +11,7 @@ |
134 | |
135 | from maastesting.matchers import MockCalledWith |
136 | from maastesting.testcase import MAASTestCase |
137 | +from provisioningserver.config import DEFAULT_IMAGES_URL |
138 | from provisioningserver.import_images import download_resources |
139 | from provisioningserver.import_images.product_mapping import ProductMapping |
140 | from simplestreams.objectstores import FileStore |
141 | @@ -73,7 +74,7 @@ |
142 | snapshot_path = self.make_dir() |
143 | cache_path = os.path.join(storage_path, 'cache') |
144 | file_store = FileStore(cache_path) |
145 | - source_url = "https://images.maas.io/ephemeral-v2/releases/" |
146 | + source_url = DEFAULT_IMAGES_URL |
147 | |
148 | download_resources.download_boot_resources( |
149 | source_url, file_store, snapshot_path, None, None) |
Come to think of it, there should be a constant for this. It shouldn't be 5 places in the code...