Merge ~stgraber/simplestreams:master into simplestreams:master

Proposed by Stéphane Graber on 2019-12-04
Status: Merged
Approved by: Robert C Jennings on 2019-12-04
Approved revision: b395c744508fd450cd63ff8477394b8d9e477565
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~stgraber/simplestreams:master
Merge into: simplestreams:master
Diff against target: 22 lines (+2/-2)
1 file modified
tools/make-test-data (+2/-2)
Reviewer Review Type Date Requested Status
Robert C Jennings 2019-12-04 Approve on 2019-12-04
Server Team CI bot continuous-integration Approve on 2019-12-04
Review via email: mp+376357@code.launchpad.net

Commit message

Fix file matching for disk-kvm.img

To post a comment you must log in.
Stéphane Graber (stgraber) wrote :

As we have two different images files both with the ".img" extension, the previous logic was mistakenly selecting the wrong file, causing duplicate entries which were causing LXD to ignore the image entirely.

This fix corrects that by selecting the full file extension instead.

As we have bad image entries out there right now, we'll want the fix to land quickly AND a re-generation of the index to happen so that the bad entries go away and LXD stops ignoring those images.

Robert C Jennings (rcj) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/make-test-data b/tools/make-test-data
2index f0b2523..7a39843 100755
3--- a/tools/make-test-data
4+++ b/tools/make-test-data
5@@ -301,7 +301,7 @@ def create_fake_file(prefix, item):
6 # - combined_disk-kvm-img_sha256 for the img
7 ftype = item['ftype']
8 for name, extension in (('disk1-img', '.img'),
9- ('disk-kvm-img', '.img'),
10+ ('disk-kvm-img', 'disk-kvm.img'),
11 ('rootxz', '-root.tar.xz'),
12 ('squashfs', '.squashfs')):
13 if (ftype == "lxd.tar.xz" and
14@@ -572,7 +572,7 @@ def create_image_data(query_tree, out_d, streamdir):
15
16 # find calculated combined checksums
17 for name, extension in (('disk1-img', '.img'),
18- ('disk-kvm-img', '.img'),
19+ ('disk-kvm-img', 'disk-kvm.img'),
20 ('rootxz', '-root.tar.xz'),
21 ('squashfs', '.squashfs')):
22 root = lxd.replace('-lxd.tar.xz', extension)

Subscribers

People subscribed via source and target branches