Device Name is mandatory but many (most?) Hypervisors can't set it.

Bug #1255136 reported by Stephen Gordon on 2013-11-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Low
Zhenguo Niu

Bug Description

Running Havana and noticed that in the "Manage Volume Attachments" dialog the "Device Name" field under "Attach To Instance" is marked as mandatory when attaching a volume. Per https://bugs.launchpad.net/cinder/+bug/1217874 (and others) this setting can't actually be enforced on any supported Hypervisors except Xen at the moment and there is no sign of this changing.

This field should not be mandatory and/or should default to the "auto" setting which results in the volume being attached to the next available device name in the guest (as above this is what happens even when you specify a device on most hypervisors). Exposing this field, particularly as mandatory, is likely to result in user confusion when the specified device is not actually the one used inside the guest.

Changed in horizon:
status: New → Confirmed
assignee: nobody → Zhenguo Niu (niu-zglinux)
Kieran Spear (kspear) wrote :

There's an option to configure this in settings:

""Some hypervisors have the ability to set the mount point for volumes attached to instances (KVM does not). Setting can_set_mount_point to False will remove the option to set the mount point from the UI.""

http://docs.openstack.org/developer/horizon/topics/settings.html#openstack-hypervisor-features

Zhenguo Niu (niu-zglinux) wrote :

IMHO, we should set the default value to False in local_settings.py.example.

Stephen Gordon (sgordon) wrote :

+1 to setting it to False, additionally the comment should probably be more explicit. As is it implies that it works on all the non-KVM hypervisors, I would update the entire statement to this:

"The Xen Hypervisor has the ability to set the mount point for volumes attached to instances (other Hypervisors currently do not). Setting can_set_mount_point to True will add the option to set the mount point from the UI."

Fix proposed to branch: master
Review: https://review.openstack.org/58911

Changed in horizon:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/58911
Committed: http://github.com/openstack/horizon/commit/d32e2375de15b33c54b897dd70318da012fe51fb
Submitter: Jenkins
Branch: master

commit d32e2375de15b33c54b897dd70318da012fe51fb
Author: Zhenguo Niu <email address hidden>
Date: Thu Nov 28 11:04:58 2013 +0800

    Set can_set_mount_point to False by default

    Change-Id: I518bfbeee709f5304a1c6b2b9ddcfe9655881a66
    Closes-Bug: #1255136

Changed in horizon:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/59229
Committed: http://github.com/openstack/horizon/commit/a38d9326765d96caa373b7ccbdcb68ccc65fb486
Submitter: Jenkins
Branch: master

commit a38d9326765d96caa373b7ccbdcb68ccc65fb486
Author: Stephen Gordon <email address hidden>
Date: Fri Nov 29 14:04:43 2013 -0500

    Updated can_set_mount_point default in docs

    The can_set_mount_point default has been changed from True to False,
    reflecting that only the Xen hypervisor currently supports the use of
    this option. This patch updates the documentation to reflect the
    change.

    The default changed in commit: d34d7904eed431937b3d75c11da7743767ce9551

    Change-Id: I4522718cb7335a1f13557acc0bad1e8f407571ad
    Closes-Bug: #1255136

David Lyle (david-lyle) on 2013-12-01
Changed in horizon:
importance: Undecided → Low
Julie Pichon (jpichon) wrote :

I don't think the fix is complete, or the docs update is inaccurate, as the can_set_mount_point default was only changed in the local_settings.py example file.

If the setting isn't defined, it still defaults to True: see https://github.com/openstack/horizon/blob/2b23ddebcb/openstack_dashboard/dashboards/project/volumes/forms.py#L293 .

Stephen Gordon (sgordon) on 2013-12-03
Changed in horizon:
status: Fix Committed → In Progress

Reviewed: https://review.openstack.org/59882
Committed: http://github.com/openstack/horizon/commit/1b13a42b9edbd34e8bb4339a962cd2c30bda7d81
Submitter: Jenkins
Branch: master

commit 1b13a42b9edbd34e8bb4339a962cd2c30bda7d81
Author: Zhenguo Niu <email address hidden>
Date: Wed Dec 4 09:45:56 2013 +0800

    Set can_set_mount_point default to False

    Patch https://review.openstack.org/#/c/59229/ only changed the default
    value in the local_settings.py example file. If the setting isn't defined,
    it still defaults to True

    Change-Id: Ia3525786e5eb9ec83b8057c1cb6158ab153adc59
    Closes-Bug: #1255136

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-01-22
Changed in horizon:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in horizon:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers