Merge ~ltrager/maas-images:daily_to_candidate into maas-images:master
- Git
- lp:~ltrager/maas-images
- daily_to_candidate
- Merge into master
Proposed by
Lee Trager
Status: | Merged |
---|---|
Merge reported by: | Lee Trager |
Merged at revision: | 35f038367ab85a871b86773e59c2f07608c59e63 |
Proposed branch: | ~ltrager/maas-images:daily_to_candidate |
Merge into: | maas-images:master |
Diff against target: |
380 lines (+62/-62) 11 files modified
README (+22/-22) README.testing (+10/-10) conf/bootloaders.yaml (+2/-2) conf/centos.yaml (+2/-2) conf/meph-v3.yaml (+3/-3) meph2/commands/cloudimg_sync.py (+8/-8) meph2/commands/flags.py (+1/-1) meph2/commands/meph2_util.py (+10/-10) meph2/commands/mimport.py (+2/-2) meph2/stream.py (+1/-1) tools/genstream-muc (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Donato (community) | Approve | ||
Review via email:
|
Commit message
Rename daily to candidate
Description of the change
The daily stream is being renamed candidate and we'll be creating a new stable stream. Images produced by lp:maas-images need to be created using the candidate label so inserting works properly. This branch won't be landed until CPC is ready to create both streams.
To post a comment you must log in.
- bae0560... by Lee Trager
-
Merge branch 'master' into daily_to_candidate
- 35f0383... by Lee Trager
-
Merge branch 'master' into daily_to_candidate
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/README b/README |
2 | index df2a9ab..050bdcf 100644 |
3 | --- a/README |
4 | +++ b/README |
5 | @@ -1,6 +1,6 @@ |
6 | -This builds maas ephemeral images from daily builds of cloud images. |
7 | +This builds maas ephemeral images from candidate builds of cloud images. |
8 | Ie, it creates stuff that goes on |
9 | - http://images.maas.io/ephemeral-v2/daily/ |
10 | + http://images.maas.io/ephemeral-v3/candidate |
11 | from stuff on |
12 | http://cloud-images.ubuntu.com/daily |
13 | |
14 | @@ -50,7 +50,7 @@ To force a build, use '--target=force' |
15 | copied from maas.ubuntu.com for all other products, but will only |
16 | create new content for products that match the provided filters. |
17 | |
18 | - If the maas ephemeral data is up to date with the latest cloud image daily |
19 | + If the maas ephemeral data is up to date with the latest cloud image candidate |
20 | then meph2-cloudimg-sync will not do anything. |
21 | |
22 | In order to 'rebuild' something. To create a new '20160101.1' even when |
23 | @@ -114,10 +114,10 @@ an existing stream. This option (meph2-util insert) is additive only. |
24 | |
25 | === insert data === |
26 | Given output of a meph2-cloudimg-sync command above in build-output.d |
27 | -and local daily stream directory daily-stream.d you can add the new data |
28 | +and local candidate stream directory candidate-stream.d you can add the new data |
29 | with: |
30 | |
31 | - meph2-util insert build-output.d daily-stream.d |
32 | + meph2-util insert build-output.d candidate-stream.d |
33 | |
34 | If you do not want to sign (create .gpg and .sjson files), then you will |
35 | have to use '--no-sign'. |
36 | @@ -126,23 +126,23 @@ You can use '--dry-run' to only report what would be done. |
37 | |
38 | === Promoting Builds === |
39 | Promoting is done on a specific version of a product. |
40 | -You promote a daily build to a released build with a given label. |
41 | +You promote a candidate build to a released build with a given label. |
42 | Likely that label is 'release'. |
43 | |
44 | # list the product-ids and version are available for promotion |
45 | $ sstream-query --output-format="%(product_name)s %(version_name)s" --max=1 \ |
46 | - daily.d/streams/v1/index.json arch=i386 | sort -u |
47 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-p 20140414 |
48 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-q 20140414 |
49 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-r 20140414 |
50 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-s 20140414 |
51 | - com.ubuntu.maas.daily:v2:boot:13.10:i386:hwe-s 20140416 |
52 | - com.ubuntu.maas.daily:v2:boot:14.04:i386:hwe-t 20140416.1 |
53 | + candidate.d/streams/v1/index.json arch=i386 | sort -u |
54 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-p 20140414 |
55 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-q 20140414 |
56 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-r 20140414 |
57 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-s 20140414 |
58 | + com.ubuntu.maas.candidate:v3:boot:13.10:i386:hwe-s 20140416 |
59 | + com.ubuntu.maas.candidate:v3:boot:14.04:i386:hwe-t 20140416.1 |
60 | |
61 | # promote the listed version |
62 | $ meph2-util promote --label=release \ |
63 | - daily.d/streams/v1/index.json releases.d/ 20140414 \ |
64 | - product_name=com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-q |
65 | + candidate.d/streams/v1/index.json stable.d/ 20140414 \ |
66 | + product_name=com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-q |
67 | |
68 | |
69 | == cleaning old images == |
70 | @@ -158,7 +158,7 @@ clean-md is the meph-util subcommand that allows you to keep only a given |
71 | number of builds. For example, to keep the latest 3 versions of every |
72 | product in the meta-data, you would run: |
73 | |
74 | - meph2-util clean-md --max=3 daily-sream.d/ |
75 | + meph2-util clean-md --max=3 candidate-stream.d/ |
76 | |
77 | This *only* modifies the meta-data, it does not delete files, use find-orphans |
78 | and reap-orphans for that. |
79 | @@ -176,7 +176,7 @@ Example usage: |
80 | my-orphans.json with any new items, but will not update first-orphaned |
81 | timestamp. |
82 | |
83 | - $ meph2-util find-orphans my-orphans.json ./daily/ ./daily/streams/v1/*.json |
84 | + $ meph2-util find-orphans my-orphans.json ./candidate/ ./candidate/streams/v1/*.json |
85 | |
86 | More complex usage: |
87 | Its possible that 2 streams dirs could share a data directory, similar |
88 | @@ -184,11 +184,11 @@ More complex usage: |
89 | directory tree layout (note, 'path' elements would have 'data' in them in |
90 | this example): |
91 | |
92 | - daily/ |
93 | + candidate/ |
94 | data -> ../data/ |
95 | streams/v1/index.json |
96 | - streams/v1/daily.json |
97 | - released/ |
98 | + streams/v1/candidate.json |
99 | + stable/ |
100 | data -> ../data |
101 | streams/v1/index.json |
102 | streams/v1/released.json |
103 | @@ -199,10 +199,10 @@ More complex usage: |
104 | Then, we could run meph-util find-orphans with: |
105 | |
106 | $ meph2-util find-orphans my-orphans.json ./data/ \ |
107 | - ./daily/streams/v1/index.json released/streams/v1/index.json |
108 | + ./candidate/streams/v1/index.json stable/streams/v1/index.json |
109 | |
110 | That will look through files in data/ that are not referenced by path |
111 | - elements in either the daily/streams/v1/ or released/streams/v1/ files. |
112 | + elements in either the candidate/streams/v1/ or stable/streams/v1/ files. |
113 | |
114 | There is no --dry-run for finding orphans as it is non-destructive. |
115 | |
116 | diff --git a/README.testing b/README.testing |
117 | index 1622e4a..f5d558a 100644 |
118 | --- a/README.testing |
119 | +++ b/README.testing |
120 | @@ -1,28 +1,28 @@ |
121 | To get local copies of maas ephemerals, you can do: |
122 | |
123 | burl=http://maas.ubuntu.com/images/ephemeral-v2 |
124 | - for stream in releases daily; do |
125 | + for stream in releases candidate; do |
126 | sstream-mirror --no-item-download \ |
127 | $burl/$stream/streams/v1/index.json "$stream.d"; done |
128 | |
129 | |
130 | Then, to test promote you could do: |
131 | $ sstream-query --output-format="%(product_name)s %(version_name)s" --max=1 \ |
132 | - daily.d/streams/v1/index.json arch=i386 | sort -u |
133 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-p 20140414 |
134 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-q 20140414 |
135 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-r 20140414 |
136 | - com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-s 20140414 |
137 | - com.ubuntu.maas.daily:v2:boot:13.10:i386:hwe-s 20140416 |
138 | - com.ubuntu.maas.daily:v2:boot:14.04:i386:hwe-t 20140416.1 |
139 | + candidate.d/streams/v1/index.json arch=i386 | sort -u |
140 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-p 20140414 |
141 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-q 20140414 |
142 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-r 20140414 |
143 | + com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-s 20140414 |
144 | + com.ubuntu.maas.candidate:v3:boot:13.10:i386:hwe-s 20140416 |
145 | + com.ubuntu.maas.candidate:v3:boot:14.04:i386:hwe-t 20140416.1 |
146 | |
147 | $ sstream-query \ |
148 | --output-format="%(product_name)s %(version_name)s/%(item_name)s" \ |
149 | releases.d/streams/v1/index.json | sort -u > before |
150 | |
151 | $ meph2-util promote --no-sign --skip-file-copy --label=release \ |
152 | - daily.d/streams/v1/index.json releases.d/ 20140414 \ |
153 | - product_name=com.ubuntu.maas.daily:v2:boot:12.04:i386:hwe-q |
154 | + candidate.d/streams/v1/index.json releases.d/ 20140414 \ |
155 | + product_name=com.ubuntu.maas.candidate:v3:boot:12.04:i386:hwe-q |
156 | |
157 | $ sstream-query \ |
158 | --output-format="%(product_name)s %(version_name)s/%(item_name)s" \ |
159 | diff --git a/conf/bootloaders.yaml b/conf/bootloaders.yaml |
160 | index cf83162..7fd275e 100644 |
161 | --- a/conf/bootloaders.yaml |
162 | +++ b/conf/bootloaders.yaml |
163 | @@ -1,5 +1,5 @@ |
164 | -product_id: "com.ubuntu.maas.daily:1:{os}:{firmware_platform}:{arch}" |
165 | -content_id: "com.ubuntu.maas:daily:1:bootloader-download" |
166 | +product_id: "com.ubuntu.maas.candidate:1:{os}:{firmware_platform}:{arch}" |
167 | +content_id: "com.ubuntu.maas:candidate:1:bootloader-download" |
168 | |
169 | bootloaders: |
170 | - firmware-platform: pxe |
171 | diff --git a/conf/centos.yaml b/conf/centos.yaml |
172 | index 55bc311..3c06369 100644 |
173 | --- a/conf/centos.yaml |
174 | +++ b/conf/centos.yaml |
175 | @@ -1,7 +1,7 @@ |
176 | image_index: http://cloud.centos.org/centos/{version}/images/image-index |
177 | |
178 | -product_id: "com.ubuntu.maas.daily:centos-bases:{version}:{arch}" |
179 | -content_id: "com.ubuntu.maas:daily:centos-bases-download" |
180 | +product_id: "com.ubuntu.maas.candidate:centos-bases:{version}:{arch}" |
181 | +content_id: "com.ubuntu.maas:candidate:centos-bases-download" |
182 | os: centos |
183 | arch: amd64 |
184 | base_mirror: http://mirrors.edge.kernel.org |
185 | diff --git a/conf/meph-v3.yaml b/conf/meph-v3.yaml |
186 | index 594918b..a7e45a8 100644 |
187 | --- a/conf/meph-v3.yaml |
188 | +++ b/conf/meph-v3.yaml |
189 | @@ -207,9 +207,9 @@ enable_di: False |
190 | ## so for now, we just don't have a stream for that. |
191 | ## * kernel meta package in all cases here is linux-image-<flavor> |
192 | |
193 | -default_target: http://images.maas.io/ephemeral-v3/daily/streams/v1/com.ubuntu.maas:daily:v3:download.json |
194 | -content_id: com.ubuntu.maas:daily:v3:download |
195 | -product_id_pre: com.ubuntu.maas.daily:v3:boot |
196 | +default_target: http://images.maas.io/ephemeral-v3/candidate/streams/v1/com.ubuntu.maas:candidate:v3:download.json |
197 | +content_id: com.ubuntu.maas:candidate:v3:download |
198 | +product_id_pre: com.ubuntu.maas.candidate:v3:boot |
199 | |
200 | # By default maas-images uses the krel in the boot path. This worked for the v2 |
201 | # stream because there was only one kernel per release/arch/krel/kflavor. The |
202 | diff --git a/meph2/commands/cloudimg_sync.py b/meph2/commands/cloudimg_sync.py |
203 | index a118a52..2ea1903 100755 |
204 | --- a/meph2/commands/cloudimg_sync.py |
205 | +++ b/meph2/commands/cloudimg_sync.py |
206 | @@ -16,8 +16,8 @@ import os |
207 | import sys |
208 | import yaml |
209 | |
210 | -CLOUD_IMAGES_DAILY = ("http://cloud-images.ubuntu.com/daily/" |
211 | - "streams/v1/com.ubuntu.cloud:daily:download.json") |
212 | +CLOUD_IMAGES_CANDIDATE = ("http://cloud-images.ubuntu.com/candidate/" |
213 | + "streams/v1/com.ubuntu.cloud:candidate:download.json") |
214 | |
215 | FORCE_URL = "force" # a fake target url that will have nothing in it |
216 | DEFAULT_ARCHES = { |
217 | @@ -36,7 +36,7 @@ def v2_to_cloudimg_products(prodtree, rebuilds={}): |
218 | # this turns a v2 products tree into a cloud-image products tree. |
219 | # it pays attention only to products with krel == release |
220 | # (in an attempt to only get "primary") |
221 | - ret = util.empty_iid_products("com.ubuntu.cloud:daily:download") |
222 | + ret = util.empty_iid_products("com.ubuntu.cloud:candidate:download") |
223 | # rebuilds is {cloudimgYYYYMMDD:newYYYYMMDD} |
224 | for product in prodtree.get('products'): |
225 | if not (prodtree['products'][product].get('krel') == |
226 | @@ -44,8 +44,8 @@ def v2_to_cloudimg_products(prodtree, rebuilds={}): |
227 | continue |
228 | |
229 | # com.ubuntu.maas:boot:12.04:amd64:hwe-s => |
230 | - # com.ubuntu.cloud.daily:server:12.04:amd64 |
231 | - tprod = ("com.ubuntu.cloud.daily:server:%(version)s:%(arch)s" % |
232 | + # com.ubuntu.cloud.candidate:server:12.04:amd64 |
233 | + tprod = ("com.ubuntu.cloud.candidate:server:%(version)s:%(arch)s" % |
234 | prodtree['products'][product]) |
235 | |
236 | if tprod not in ret['products']: |
237 | @@ -99,7 +99,7 @@ class CloudImg2Meph2Sync(mirrors.BasicMirrorWriter): |
238 | self.rebuilds = rebuilds |
239 | |
240 | def load_products(self, path=None, content_id=None): |
241 | - if content_id != "com.ubuntu.cloud:daily:download": |
242 | + if content_id != "com.ubuntu.cloud:candidate:download": |
243 | raise ValueError("Not expecting to sync with content_id: %s" % |
244 | content_id) |
245 | |
246 | @@ -172,7 +172,7 @@ class CloudImg2Meph2Sync(mirrors.BasicMirrorWriter): |
247 | fp.write(util.dump_data(index)) |
248 | |
249 | def filter_index_entry(self, data, src, pedigree): |
250 | - if pedigree[0] != "com.ubuntu.cloud:daily:download": |
251 | + if pedigree[0] != "com.ubuntu.cloud:candidate:download": |
252 | LOG.info("skipping index entry %s" % '/'.join(pedigree)) |
253 | return False |
254 | return True |
255 | @@ -209,7 +209,7 @@ def main(): |
256 | parser.add_argument('--proposed', action='store_true', default=False) |
257 | parser.add_argument('--rebuild', action='append', default=[], |
258 | help='rebuild version name YYYYMMDD:YYYMMDD.1') |
259 | - parser.add_argument('--source', default=CLOUD_IMAGES_DAILY, |
260 | + parser.add_argument('--source', default=CLOUD_IMAGES_CANDIDATE, |
261 | help='cloud images mirror') |
262 | parser.add_argument('--target', default=None, |
263 | help="maas ephemeral v2 or v3 mirror, overrides " |
264 | diff --git a/meph2/commands/flags.py b/meph2/commands/flags.py |
265 | index f3ca85d..f85060d 100644 |
266 | --- a/meph2/commands/flags.py |
267 | +++ b/meph2/commands/flags.py |
268 | @@ -59,7 +59,7 @@ SUBCOMMANDS = { |
269 | ] |
270 | }, |
271 | 'promote': { |
272 | - 'help': 'promote a product/version from daily to release', |
273 | + 'help': 'promote a product/version from candidate to stable', |
274 | 'opts': [ |
275 | COMMON_FLAGS['dry-run'], COMMON_FLAGS['no-sign'], |
276 | COMMON_FLAGS['keyring'], |
277 | diff --git a/meph2/commands/meph2_util.py b/meph2/commands/meph2_util.py |
278 | index 295442d..f33b4be 100755 |
279 | --- a/meph2/commands/meph2_util.py |
280 | +++ b/meph2/commands/meph2_util.py |
281 | @@ -135,7 +135,7 @@ class InsertBareMirrorWriter(BareMirrorWriter): |
282 | |
283 | class ReleasePromoteMirror(InsertBareMirrorWriter): |
284 | # this does not do reference counting or .data/ storage |
285 | - # it converts a daily item to a release item and inserts it. |
286 | + # it converts a candidate item to a release item and inserts it. |
287 | |
288 | # we take care of writing file in insert_products |
289 | insert_index_entry = BareMirrorWriter._noop |
290 | @@ -145,7 +145,7 @@ class ReleasePromoteMirror(InsertBareMirrorWriter): |
291 | objectstore=objectstore) |
292 | self.label = label |
293 | |
294 | - def rel2daily(self, ptree): |
295 | + def rel2candidate(self, ptree): |
296 | ret = copy.deepcopy(ptree) |
297 | ret['content_id'] = self.fixed_content_id(ret['content_id']) |
298 | |
299 | @@ -155,25 +155,25 @@ class ReleasePromoteMirror(InsertBareMirrorWriter): |
300 | del ptree['products'][oname] |
301 | |
302 | def fixed_content_id(self, content_id): |
303 | - # when promoting from daily, our content ids get ':daily' removed |
304 | - # com.ubuntu.maas:daily:v2:download => com.ubuntu.maas:v2:download |
305 | - return(content_id.replace(":daily", "")) |
306 | + # when promoting from candidate, our content ids get ':candidate' removed |
307 | + # com.ubuntu.maas:candidate:v2:download => com.ubuntu.maas:v2:download |
308 | + return(content_id.replace(":candidate", "")) |
309 | |
310 | def fixed_pedigree(self, pedigree): |
311 | return tuple([self.fixed_product_id(pedigree[0])] + list(pedigree[1:])) |
312 | |
313 | def fixed_product_id(self, product_id): |
314 | - # when promoting from daily, product ids get '.daily' removed |
315 | - # com.ubuntu.maas.daily:v2:boot:13.10:armhf:generic-lpae -> |
316 | + # when promoting from candidate, product ids get '.candidate' removed |
317 | + # com.ubuntu.maas.candidate:v2:boot:13.10:armhf:generic-lpae -> |
318 | # com.ubuntu.maas:v2:boot:13.10:armhf:generic-lpae |
319 | - return product_id.replace(".daily:", ":") |
320 | + return product_id.replace(".candidate:", ":") |
321 | |
322 | def load_products(self, path, content_id): |
323 | # this loads the released products, but returns it in form |
324 | - # of daily products |
325 | + # of candidate products |
326 | ret = super(ReleasePromoteMirror, self).load_products( |
327 | path=path, content_id=self.fixed_content_id(content_id)) |
328 | - return self.rel2daily(ret) |
329 | + return self.rel2candidate(ret) |
330 | |
331 | def insert_item(self, data, src, target, pedigree, contentsource): |
332 | ret = super(ReleasePromoteMirror, self).insert_item( |
333 | diff --git a/meph2/commands/mimport.py b/meph2/commands/mimport.py |
334 | index 6344d3f..224a248 100644 |
335 | --- a/meph2/commands/mimport.py |
336 | +++ b/meph2/commands/mimport.py |
337 | @@ -67,7 +67,7 @@ def import_remote_config(args, product_tree, cfgdata): |
338 | print("Creating new product %s" % product_id) |
339 | product_tree['products'][product_id] = { |
340 | 'subarches': 'generic', |
341 | - 'label': 'daily', |
342 | + 'label': 'candidate', |
343 | 'subarch': 'generic', |
344 | 'arch': arch, |
345 | 'os': os_name, |
346 | @@ -175,7 +175,7 @@ def import_bootloaders(args, product_tree, cfgdata): |
347 | if product_tree['products'].get(product_id) is None: |
348 | print("Creating new product %s" % product_id) |
349 | product_tree['products'][product_id] = { |
350 | - 'label': 'daily', |
351 | + 'label': 'candidate', |
352 | 'arch': firmware_platform['arch'], |
353 | 'arches': firmware_platform['arches'], |
354 | 'os': firmware_platform['os'], |
355 | diff --git a/meph2/stream.py b/meph2/stream.py |
356 | index 3142401..47a9abd 100644 |
357 | --- a/meph2/stream.py |
358 | +++ b/meph2/stream.py |
359 | @@ -11,7 +11,7 @@ import yaml |
360 | |
361 | from simplestreams.log import LOG |
362 | |
363 | -ALL_ITEM_TAGS = {'label': 'daily', 'os': 'ubuntu'} |
364 | +ALL_ITEM_TAGS = {'label': 'candidate', 'os': 'ubuntu'} |
365 | |
366 | PATH_COMMON = "%(release)s/%(arch)s/" |
367 | BOOT_COMMON = PATH_COMMON + "%(version_name)s/%(kname)s/%(flavor)s" |
368 | diff --git a/tools/genstream-muc b/tools/genstream-muc |
369 | index 0134afa..758836a 100755 |
370 | --- a/tools/genstream-muc |
371 | +++ b/tools/genstream-muc |
372 | @@ -162,7 +162,7 @@ class FakeProduct(object): |
373 | self._versions[version] = d |
374 | |
375 | def get_label(self, version): |
376 | - return 'daily' |
377 | + return 'candidate' |
378 | |
379 | def makepaths(self, target, makedata=makedata_filepath): |
380 | for version_id, ver in self._versions.items(): |
LGTM.
As mentioned on MM maybe we could keep a feature branch where to land these changed until the whole feature is complete.