create volume from snapshot using horizon error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Dashboard (Horizon) |
Critical
|
Masco | ||
| Kilo |
Undecided
|
Unassigned |
Bug Description
When I try to create a volume from snapshot using the OpenStack UI it creates a new raw volume with correct size, but it's not created from a snapshot.
$ cinder show 9d5d0ca1-
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2015-04-
| description | None |
| encrypted | False |
| id | 9d5d0ca1-
| metadata | {} |
| multiattach | False |
| name | v2s2 |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| os-volume-
| os-volume-
| replication_status | disabled |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| user_id | c8163c531350430
| volume_type | None |
+------
But when I use cinder command line everything seems to be fine.
$ cinder create --snapshot-id 382a0e1d-
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2015-04-
| description | None |
| encrypted | False |
| id | b33ec1ef-
| metadata | {} |
| multiattach | False |
| name | None |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| os-volume-
| os-volume-
| replication_status | disabled |
| size | 1 |
| snapshot_id | 382a0e1d-
| source_volid | None |
| status | creating |
| user_id | c8163c531350430
| volume_type | None |
+------
So it looks like it uses different flows via UI and via command line for some reason.
John Griffith (john-griffith) wrote : | #1 |
Changed in cinder: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
John Griffith (john-griffith) wrote : | #2 |
Verified using cinderclient for these ops works as expected. No idea what Horizon is calling/doing here. Removing Cinder for now, we can readd if there's infact something weird on our side.
no longer affects: | cinder |
John Griffith (john-griffith) wrote : | #3 |
Turns out that with create from snapshot and others, none of the additional parameters are actually set in the horizon call. If for example you run "create from snapshot" using horizon and check the body of the request as it enters Cinders API (v2/volumes.py) you'll notice there are no parameters provided:
{u'volume': {u'status': u'creating', u'user_id': None, u'description': u'', u'imageRef': None, u'availability_
Changed in horizon: | |
status: | New → Confirmed |
Changed in horizon: | |
assignee: | nobody → Masco Kaliyamoorthy (masco) |
Changed in horizon: | |
importance: | Undecided → Critical |
tags: | added: kilo-rc-potential |
Changed in horizon: | |
status: | Confirmed → In Progress |
Fix proposed to branch: master
Review: https:/
Changed in horizon: | |
assignee: | Masco Kaliyamoorthy (masco) → Lin Hua Cheng (lin-hua-cheng) |
Changed in horizon: | |
assignee: | Lin Hua Cheng (lin-hua-cheng) → Masco Kaliyamoorthy (masco) |
milestone: | none → liberty-1 |
tags: | removed: kilo-rc-potential |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 690e56e5cfc9654
Author: Masco Kaliyamoorthy <email address hidden>
Date: Mon Apr 27 14:58:00 2015 +0530
corrected the create volume from snapshot
While creating the volume from snapshot via horizon UI, the volume
is not created from snapshot. It is just creating a volume with
same size of the snapshot.
Fixed the condition used if snapshot_id should be passed when
creating volume. The volume_source_type field is empty string if
launched from Volume Snapshot panel.
Co-Authored-By: Lin Hua Cheng <email address hidden>
Change-Id: I19ddd572d1a7a0
Closes-Bug: #1447288
Changed in horizon: | |
status: | In Progress → Fix Committed |
Fix proposed to branch: stable/kilo
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 2fc3fcd88eb09f1
Author: Masco Kaliyamoorthy <email address hidden>
Date: Mon Apr 27 14:58:00 2015 +0530
corrected the create volume from snapshot
While creating the volume from snapshot via horizon UI, the volume
is not created from snapshot. It is just creating a volume with
same size of the snapshot.
Fixed the condition used if snapshot_id should be passed when
creating volume. The volume_source_type field is empty string if
launched from Volume Snapshot panel.
Co-Authored-By: Lin Hua Cheng <email address hidden>
Change-Id: I19ddd572d1a7a0
Closes-Bug: #1447288
(cherry picked from commit 690e56e5cfc9654
tags: | added: in-stable-kilo |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | liberty-1 → 8.0.0 |
Turns out this is worse than I thought at first glance. So it appears that running from Horizon isn't honoring create from snap, it's also not honoring bootable settings.
What's worse however is that at first check it appears that it's not actually creating from snap at all. To test I created a bootable volume, booted it up, wrote some stuff. Shutdown the instance, created a snapshot, created a volume from snapshot. Attached the new volume and inspected it, turns out it's an empty/raw volume with nothing on it.
Given this still seems to work from cinder side, I think this is a Horizon specific bug but haven't verified/triaged.