yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #84198
[Bug 1885357] Re: Horizon fails to create volume from snapshot of non-standard-type volume
*** This bug is a duplicate of bug 1879578 ***
https://bugs.launchpad.net/bugs/1879578
I'm going to mark this as a dup of 1879578. If that is not correct,
please let me know.
** Changed in: horizon
Status: In Progress => Invalid
** Also affects: cinder
Importance: Undecided
Status: New
** This bug has been marked a duplicate of bug 1879578
cinder assigns default volume_type even when it shouldn't
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1885357
Title:
Horizon fails to create volume from snapshot of non-standard-type
volume
Status in Cinder:
New
Status in OpenStack Dashboard (Horizon):
Invalid
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-3332-4323-9b1f-9ace3dda9d9a (requested type is not
compatible; recommend omitting the type argument). (HTTP 400)
(Request-ID: req-40ee2f61-6a16-44f2-96d7-46f5c42f1942)
Problematic code is in cinder/forms.py of Horizon:
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/forms.py#L379
Under normal circumstances, the storage type should be set in that
file in "prepare_source_fields_if_snapshot_specified"
(https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/forms.py#L145)
That code would need to be triggered in the __init__ function of
CreateForm
(https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/forms.py#L297)
which tests the GET of the original request for certain strings.
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/project/volumes/create/'>". So in fact,
the whole code path starting at
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/forms.py#L314
might be dead and the default will always be used. The default doesn't
populate "type", however,
This of course also leads to creating volumes from volumes not working
due to the same issue.
Found with the help of Harald Wagener.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1885357/+subscriptions
References