Can't update the read_only access mode for cinder volume

Bug #1490120 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua

Bug Description

1. create a stack with a cinder volume, nova server, and attach the volume to the server:

heat_template_version: 2015-04-30
resources:
  cv:
    type: OS::Cinder::Volume
    properties:
      size: 2
  my_s:
    type: OS::Nova::Server
    properties:
      flavor: 1
      image: cirros-0.3.0-x86_64-disk
  svatt:
    type: OS::Cinder::VolumeAttachment
    properties:
      instance_uuid: {get_resource: my_s}
      volume_id: {get_resource: cv}

2. the stack create complete, now update the stack to set 'read_only' access mode for the volume
**************
resources:
  cv:
    type: OS::Cinder::Volume
    properties:
      size: 2
      read_only: true
*******************
3. stack will update failed, cinder raise the error reason:
Invalid volume: Volumed 3f9957c-78d0-40d4-b4d9-37cf8dffa1b5 status must be available to update readonly flag, but current status is: in-use.

So cinder supports to update the access mode when the volume is in available, not creating, not in-use or other states.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Changed in heat:
importance: Undecided → Medium
tags: added: liberty-rc-potential
Changed in heat:
milestone: none → mitaka-1
tags: removed: liberty-rc-potential
Changed in heat:
milestone: mitaka-1 → mitaka-2
Revision history for this message
Rabi Mishra (rabi) wrote :

Can you please clarify the last point in your description? It seems cinder only allows it only when the status is available[1].

https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L1400

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/218567
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3b37f1021dd4c1389f0f45157b5a7adba71d5a5c
Submitter: Jenkins
Branch: master

commit 3b37f1021dd4c1389f0f45157b5a7adba71d5a5c
Author: huangtianhua <email address hidden>
Date: Sat Aug 29 18:48:49 2015 +0800

    Make sure update access mode for volume in available

    Cinder only supports update 'read_only' access mode for
    volumes which are in available status.
    This patch will make sure to update access mode for
    volume in available to avoid create/update failed.

    Change-Id: Iccd1918f314394e00095e4e718e067dc68fe95df
    Closes-Bug: #1490120

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b2

This issue was fixed in the openstack/heat 6.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This issue was fixed in the openstack/heat 6.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.