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.
Fix proposed to branch: master /review. openstack. org/218567
Review: https:/