Horizon fails to create volume from snapshot of non-standard-type volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Undecided
|
Unassigned | ||
OpenStack Dashboard (Horizon) |
Invalid
|
Undecided
|
Martin Gerhard Loschwitz |
Bug Description
Horizon offers the opportunity to create a volume from a snapshot. It does not, however, properly determine the type of the originating volume of the snapshot and tries to use the default. In environments with non-default storage types (e.g. encrypted storages, like in our case), this fails and leads to an error message:
2020-06-26 16:13:12,633 36 WARNING horizon.exceptions Recoverable error: Invalid input received: Invalid volume_type provided: d4917a31-
Problematic code is in cinder/forms.py of Horizon:
Under normal circumstances, the storage type should be set in that file in "prepare_
That code would need to be triggered in the __init__ function of CreateForm (https:/
Debugging however, unveils that GET simply does not contain any of the strings checked for there anymore -- in our case, it always was "<WSGIRequest: GET '/dashboard/
This of course also leads to creating volumes from volumes not working due to the same issue.
Found with the help of Harald Wagener.
description: | updated |
description: | updated |
Changed in horizon: | |
assignee: | nobody → Martin Gerhard Loschwitz (martin-loschwitz) |
status: | New → In Progress |
subscribed ~field-high
We see this in a bionic-train openstack deployment from the cloud archive with the following charms:
cs:openstack- dashboard- 305 charmers- next/cinder- ceph-333
cs:cinder-304
cs:~openstack-
With openstack-dashboard version 3:16.2. 0-0ubuntu1~ cloud0
There are multiple volume types in the environment, but creating a volume from a snapshot in horizon will always try to use the default type, which fails if the original volume was not created with that type.
The workaround is to use the cli:
openstack volume create <new volume name> --snapshot <snapshot> --type <type of the original volume>