Comment 15 for bug 1889729

Revision history for this message
Vern Hart (vern) wrote (last edit ):

I tested this fix. I set the glance-simplestreams-sync charm to latest/edge and the simplestreams snap to latest/edge (setting the gss charm's snap-channel did not have any effect).

Then I deleted my auto-sync'd bionic image and ran the sync-images action. A new bionic image showed up and it was RAW format. Nice!

However, each subsequent time I run the sync-images action, I get a new bionic image imported with the exact name as the existing one. I tried the same thing with the jammy image: deleted, ran sync-images twice, I end up with two raw jammy images. (And some more bionic images.)

It seems the code that detects if an image already exists doesn't see the raw images as equals. Note that my qcow2 focal image is not getting re-imported with each run.

Ah, the new raw images don't have any simplestreams-metadata. It seems probably that this was stripped when the image was converted.

It seems like the charm is doing the right thing but now we're back to the simplestreams snap.

I believe the simplestreams snap should be responsible for capturing the simplestreams-metadata and re-applying it to the newly converted image. Otherwise, new images will be created every time the sync job is run (daily by default, I think).