Can't delete an image while it is downloading

Bug #2057935 reported by Jacopo Rota
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
Medium
Unassigned
3.5
Fix Committed
Medium
Unassigned
maas-ui
Fix Committed
Medium
Peter Makowski

Bug Description

In 3.5.0 when I'm downloading an image the "thrash" action button is available and if I click it the button is pinning until the image has been downloaded. After it is available, it gets deleted and the ui returns to normal

Tags: ui
Jacopo Rota (r00ta)
Changed in maas:
importance: Undecided → High
Changed in maas-ui:
milestone: none → 3.5.0
Changed in maas-ui:
assignee: nobody → Peter Makowski (petermakowski)
Revision history for this message
Peter Makowski (petermakowski) wrote :

There are 2 ways we could approach this, both will require back-end work.

Option 1. If a user attempts to delete an image that is currently being imported, the UI can first make a request to `bootresource.stop_import` before calling `bootresource.delete_image`.
However, bootresource.stop_import currently stops all imports and doesn't allow to specify particular images. We would need to modify this endpoint to accept image id.

Option 2. When bootresource.delete_image is called on an image being downloaded, the back-end could make sure that download operation is paused before proceeding with the deletion.

Changed in maas-ui:
status: New → Triaged
Revision history for this message
Peter Makowski (petermakowski) wrote :

Just to confirm, you're referring to the spinner in the side panel submit button?
https://share.cleanshot.com/qm9kmtHR

Revision history for this message
Jacopo Rota (r00ta) wrote :

Yup

Changed in maas:
importance: High → Medium
Revision history for this message
Jacopo Rota (r00ta) wrote :

Would it be a possibility to disable that button until the resource is imported or the import job is not running?

Revision history for this message
Peter Makowski (petermakowski) wrote :

That is possible and I like the idea. Will be relatively straightforward to implement. I'll look into it.

Changed in maas-ui:
importance: Undecided → Medium
Revision history for this message
Peter Makowski (petermakowski) wrote :
Changed in maas-ui:
status: Triaged → Fix Committed
no longer affects: maas-ui/3.5
no longer affects: maas/3.6
Changed in maas:
milestone: 3.5.0 → 3.6.0
assignee: nobody → Anton Troyanov (troyanov)
assignee: Anton Troyanov (troyanov) → nobody
status: Triaged → Fix Committed
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.