Code review comment for lp:~qzhang/lava-dispatcher/gen-test-tarball

Revision history for this message
Paul Larson (pwlars) wrote :

I think it would be a good idea to clean up the things mentioned here, and also re-sync with trunk since some of the recent changes there overlap or replace things that are done here. There are some whitespace/indentation things that should be cleaned up (indents are 4 spaces, not 8 or tab). Also, I'm not sure about using qemu-nbd. It adds an extra requirement, and a kernel module that's not usually loaded at that. The way I'm doing this in the lab right now is simply to save the offset of the necessary partitions for each type, and mount with -oloop,offset=... This doesn't solve the problem of having to store some kind of information, and if the image format ever changes, this will clearly break. One way I can think of around this might be to script parted sorta like:
parted qemu.img -s unit b p
and parse the output to get the offset of each of the partitions. If we can assume that we guess either 2 partitions means 1=boot 2=root and 3 means that 2=boot, 3=root, then we can use that without having to store any information about partition numbers or offsets. Seems like there should be a better way...

I submitted a wishlist item for l-m-c to see if they think it would be easy enough to teach l-m-c to output tarballs instead of a whole image. If it's not equally ugly to do something like that in l-m-c, that would make things really convenient for us.

review: Needs Fixing

« Back to merge proposal