Auto-publishing completely new image types from pending to current can clobber existing images in current

Bug #1815448 reported by Łukasz Zemczak on 2019-02-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CD Images

Bug Description

It's hard to find a good title for such a specific bug. We only once encountered it in a very specific case, but it might actually not be the only case that's broken.

We have 'official' stable images for ubuntu-core/18/stable on cdimage. Those are only to be updated on point releases or during emergency re-spins, which is why all of the current image types generated by core18 builds are set to manual-promotion. This means that no image from pending/ will automatically go to current/ - this whole process is completely manual.
Because of this, currently the 'ubuntu-core/18/stable/current' directory is a symlink to the latest official 'tested' image directory.

During a test spin of stable images for 18 we have added a new target image (pi3-arm64) which, by mistake, was not added to the auto-promotion blacklist. After the image builds have finished, cdimage attempted promotion from pending to current for this one additional platform. This caused the symlink to be replaced with a regular directory with only the pi3-arm64 images inside.

As per Steve's comments, there apparently is supposed to be logic that handles symlinked-current directories, which was supposed to indeed replace it with a directory, copy over the old images and add the new ones next to it. This didn't seem to work here. Might be that the feature is missing and needs addition. It's a corner case, but with more and more platforms appearing (especially for core), we should be ready for future issues like this.

Łukasz Zemczak (sil2100) wrote :

So this needs investigation. Strangely, it feels to me that the feature works as intended now. I have renamed the current/ directory of that 'broken' run into current.broken/ and, when checking yesterday, I have noticed many symlinks to the old images there. It seemed like it just needed some more time for that to happen (and the mirror sync happened at the wrong time).

Let me double-check that.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers