Merge lp://staging/~caio1982/ubuntu-system-image/remote-sis-generator-skips-metadata into lp://staging/ubuntu-system-image/server
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~caio1982/ubuntu-system-image/remote-sis-generator-skips-metadata |
Merge into: | lp://staging/ubuntu-system-image/server |
Diff against target: |
157 lines (+44/-14) 1 file modified
lib/systemimage/generators.py (+44/-14) |
To merge this branch: | bzr merge lp://staging/~caio1982/ubuntu-system-image/remote-sis-generator-skips-metadata |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Barry Warsaw (community) | Needs Fixing | ||
Review via email: mp+260210@code.staging.launchpad.net |
Description of the change
Feel free to replace this code with whatever you guys think is best but please do fix this bug :-)
I think the commit message is pretty descriptive so let me know if you need more info. We found a situation with Capomastro's instance of image server where only the first device in a channel list would have its Ubuntu rootfs's versioning right, so this address that problem as... well... we definitely need the rootfs versions to be right. People were chasing us for that last week :-(
Unmerged revisions
- 273. By Caio Begotti
-
add missing debug logging to the existing (!!!) fixes for the problem we originally saw... so apparently only the remote s-i-s generator was behind this :-)
- 272. By Caio Begotti
-
make the remote system-image generator respect the metadata of existing images
this is a really big problem when you have multiple devices in the same channel and both pull the same ubuntu rootfs, exactly like we have right now for arale... e.g. 'arale' and 'generic' devices both pulling a stable ubuntu rootfs from system-
image.ubuntu. com device 'generic' first pulls it just fine and loads its json with the metadata, including ubuntu='' versioning, but then when the 'arale' device imports its stuff, the ubuntu rootfs has been imported already so the path matches and the generator returns it without loading its json file
no ubuntu='' version string for any other devices in the channel :-(
fun fact: a 'generic' device is always processed first, even if it was created later because of a sorting done in the device list (i haven't really checked it so i assum it happens), so with the current code ONLY the 'generic' devices get their ubuntu='' version right for all those rootfs tarballs
- 271. By Caio Begotti
-
remove unnecessary (and too verbose) logging, as over time the server will be so crowded with images this might be totally useless and poluting
Thanks for taking on this bug. I've added some comments, but none that you really need to address in this branch.
What I *do* think needs fixing before this can land is... tests! Can you please add a test for the bug? As Steve pointed out in my own branch, the best way to ensure this fixes the problem is to apply the test-adding diff, see the test fail, then add the fix and see it succeed.
The change looks okay on the face of it, but please add a test.