can't attach a read only volume to an instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Thang Pham | ||
Icehouse |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Description of problem:
An attachment of a read only volume to an instance failed. The openstack was installed as AIO, Cinder was configured with Netapp back end. The following error from the nova compute log:
014-04-13 11:28:17.838 25176 ERROR oslo.messaging.
0834c31.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.838 25176 TRACE oslo.messaging.
2014-04-13 11:28:17.858 25176 ERROR oslo.messaging.
Version-Release number of selected component (if applicable):
openstack-
openstack-
openstack-
openstack-
openstack-
python-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
How reproducible:
100%
Steps to Reproduce:
1. Create a volume from a qcow2 image.
2. Attach the volume to an instance and make changes.
3. Detach the volume from the instance.
4. Set the volume as read only.
5. Attach the volume to an instance.
Actual results:
the attachment fails.
Expected results:
the attachment should succeed, but the volume cannot be changed.
tags: | added: volumes |
Changed in nova: | |
assignee: | nobody → Thang Pham (thang-pham) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: libvirt |
tags: | added: icehouse-backport-potential |
Changed in nova: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
tags: | removed: icehouse-backport-potential |
Changed in nova: | |
milestone: | juno-1 → 2014.2 |
The bug is generic across all volume backends. I can also reproduce this with glusterfs. The bug is caused by a missing option passed to cinderclient, i.e. mode. By default, if mode is not passed to cinderclient. volumes. attach, the mode defaults to 'rw'. The structure of this method found in the Volume class under python- cinderclient/ cinderclient/ v2/volumes. py is as follows:
def attach(self, instance_uuid, mountpoint, mode='rw'):
When nova attaches a volume to an instance, the mode is ignored and not passed in, hence every time you attempt to attach a read-only volume, the mode gets set to 'rw' and fails with InvalidInput.