Ask Your Question
0

Mount multiple cinder volumes to VM via heat

asked 2015-12-03 17:17:33 -0500

Nodir gravatar image

I am using following heat template to attach multiple volumes to my VM.

  cinder_relhighiops_volume:                                                        
    type: OS::Cinder::Volume                                                        
    properties:                                                                     
      size: { get_param: volume_size }                                              
      availability_zone: { get_param: availability_zone }                           
      volume_type: relhighiops_type                                                 

  volume_attachment:                                                                
    type: OS::Cinder::VolumeAttachment                                              
    properties:                                                                     
      volume_id: { get_resource: cinder_relhighiops_volume }                        
      instance_uuid: { get_resource: my_instance }                                  

  cinder_highcap_volume:                                                            
    type: OS::Cinder::Volume                                                        
    properties:                                                                     
      size: { get_param: volume_size }                                              
      availability_zone: { get_param: availability_zone }                           
      volume_type: highcap_type                                                     

  volume_attachment:                                                                
    type: OS::Cinder::VolumeAttachment                                              
    properties:                                                                     
      volume_id: { get_resource: cinder_highcap_volume }                            
      instance_uuid: { get_resource: my_instance }

It always attaches the last entry, i.e., cinder_highcap_volume, and ignores others. I wonder if values preceding it are somehow getting overwritten. Any ideas?

Thanks,

Nodir

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-12-04 02:54:44 -0500

ccowley gravatar image

You have given both attachments the same name, so the last one over-rules the first. Try this:

  cinder_relhighiops_volume:                                                        
    type: OS::Cinder::Volume                                                        
    properties:                                                                     
      size: { get_param: volume_size }                                              
      availability_zone: { get_param: availability_zone }                           
      volume_type: relhighiops_type                                                 

  volume_attachment_relhighiops:                                                                
    type: OS::Cinder::VolumeAttachment                                              
    properties:                                                                     
      volume_id: { get_resource: cinder_relhighiops_volume }                        
      instance_uuid: { get_resource: my_instance }                                  

  cinder_highcap_volume:                                                            
    type: OS::Cinder::Volume                                                        
    properties:                                                                     
      size: { get_param: volume_size }                                              
      availability_zone: { get_param: availability_zone }                           
      volume_type: highcap_type                                                     

  volume_attachment_highcap:                                                                
    type: OS::Cinder::VolumeAttachment                                              
    properties:                                                                     
      volume_id: { get_resource: cinder_highcap_volume }                            
      instance_uuid: { get_resource: my_instance }
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-12-03 17:17:33 -0500

Seen: 1,039 times

Last updated: Dec 04 '15