Volume uuid of deleted volume is visible in volume list while restoring volume backup in horizon.

Bug #1928953 reported by Shubham Dang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Unassigned

Bug Description

Issue:
When I deleted a volume and try to restore a backup of same volume which I deleted , the selected value in drop-down shows the UUID of volume which lead to problem.

Analysis:
When I checked the code and found that the value of volume UUID is picked from backup, but volume is not present anymore in the cloud.

The default value is set by this block of code: https://github.com/openstack/horizon/blob/2d2f944e2fe127433f2973ef77ba86ec997cf434/horizon/forms/fields.py#L303

the template used here for rendering: https://github.com/openstack/horizon/blob/master/horizon/templates/horizon/common/fields/_themable_select.html#L5

Code block responsible for choices of available volume:
https://github.com/openstack/horizon/blob/stable/train/openstack_dashboard/dashboards/project/backups/forms.py#L107

Steps to reproduce:
1. create a volume backup let's say vol
2. create backup 'backup' of volume 'vol'
3. delete the volume 'vol'
4. now restore backup 'back'

 A list of all available volume is shown, but the UUID of deleted volume 'vol' is also present in the list.

Actual:
UUID of deleted volume is visible in the list

Expected:
Volume UUID of deleted should not be present

Proposed Solution: If initial_value is not present in choices then take the first value of choices.

Revision history for this message
Shubham Dang (shubhamdang7) wrote :
Revision history for this message
Shubham Dang (shubhamdang7) wrote :
description: updated
tags: added: backup-service horizon
Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 20.1.0

This issue was fixed in the openstack/horizon 20.1.0 release.

affects: cinder → horizon
Changed in horizon:
status: New → Fix Released
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.