When a custom image is updated it shows as synced before copied to rack controllers

Bug #2003980 reported by Jorge Merlino
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned
3.0
New
Undecided
Unassigned
3.1
Triaged
High
Unassigned
3.2
Triaged
High
Unassigned
3.3
Triaged
High
Unassigned
3.4
Triaged
High
Unassigned

Bug Description

When a custom image is loaded to MAAS it is shown in the web page that it is downloading, then it is shown as "Syncing to rack controllers" and lastly is shown as "Synced".

When the same image is updated (uploaded again with the same name) it is shown that it is being downloaded but immediately after that it shows as "Synced", before the rack controllers have been able to update it.

In this last state it is possible to launch a machine that will use the old version of the image even if the web page is showing the new version as "Synced".

Tags: sts
Changed in maas:
status: New → In Progress
assignee: nobody → Jorge Merlino (jorge-merlino)
Changed in maas:
milestone: none → 3.4.0
importance: Undecided → Low
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

MAAS bug-council,

This fix is desired on MAAS 3.0.

Once (and if) the MR to 3.4 is approved/merged, can we send backport MRs to 3.3/3.2? (And we'd follow with 3.1/3.0 as well, maintained by SEG.)

Thanks!

tags: added: bug-council sts
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

The advised way of dealing with updating images is to upload them with different names. The name of the image needs to be unique, because it's treated as an identifying property of an image, so having two images with different contents but the same name is not something that MAAS expects.

Having said that, it's not clear why the displayed state of image sync appears to be incorrect. This needs to be looked at first before we proceed with fixes.

Changed in maas:
assignee: Jorge Merlino (jorge-merlino) → nobody
importance: Low → Medium
status: In Progress → Incomplete
tags: removed: bug-council
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Jerzy,

> having two images with different contents but the same name is not something that MAAS expects.

Thanks for the clarification.

So, maybe should we change MAAS to error out image uploads with duplicate names?

(Or, alternatively, update the docs with this restriction? even though the command does suggest it performs a Create, not Update, operation: maas <profile> boot-resources create ..., IIRC).

Changed in maas:
status: Incomplete → Triaged
assignee: nobody → Igor Brovtsin (igor-brovtsin)
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Revision history for this message
Jacopo Rota (r00ta) wrote :

IIUC, I think we should raise an error if the user tries to upload an image with a duplicated name.

Revision history for this message
Jorge Merlino (jorge-merlino) wrote (last edit ):

Hi all,

To move this forward I can implement the raising of an error message or other behavior you see fit.

Thanks

tags: added: bug-council
Revision history for this message
Alan Baghumian (alanbach) wrote :

This is something that clients quite often encounter. They delete a custom image and upload a new one with the exact same name only realizing later that the "new" image was never replicated to rack controllers as an image with the same name already existed on the filesystem.

Thank you,
Alan

Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

We think there are two places where MAAS does not inform rack controller that the custom image has changed: the first when the image is deleted (MAAS should trigger rack controller sync, but currently does not), and the second where a new custom image is uploaded with the same name (MAAS DB trigger should fire, causing rack controller sync, but currently does not).

In MAAS 3.5 and later, the image storage and synchronisation mechanisms are significantly changed, so this issue is relevant to MAAS 3.4.x and earlier releases.

Changed in maas:
assignee: Igor Brovtsin (igor-brovtsin) → nobody
importance: Medium → High
milestone: 3.4.x → 3.5.0
status: Triaged → Invalid
tags: removed: bug-council
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.