Unable to fetch attachments attribute of Cinder::Volume from SoftwareDeployment resource

Bug #1709279 reported by Alexey Shchukin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Medium
Rabi Mishra

Bug Description

Steps to reproduce:
0. Replace network_id, subnet_id, image and flavor within template with values from your environment.
1. Create stack.
2. Check stack's outputs. The value of variable *bootstrap_stderr > server > volumes* should be '/dev/vd[a-z]', but we have 'None'.

The error appears only on CREATE stage. However, on UPDATE stage everything works as expected.

Environment:
- OpenStack Ocata (RDO)
- Cinder uses Ceph as a backend
- Image must include the following elements:
  * os-collect-config
  * os-refresh-config
  * os-apply-config
  * heat-config
  * heat-config-script

Full template: http://paste.openstack.org/show/617522/
Logs: http://paste.openstack.org/show/617521/

Revision history for this message
Rabi Mishra (rabi) wrote :

The issue here is attachments for 'server_volume' change after 'server_volume_attachment' resource is created.

SoftwareDeployment 'bootstrap' depends on only 'server_volume' with it's attributes used in properties of 'bootstrap'. So it does not wait for 'server_volume_attachment' to be created.

By changing the 'depends_on' for 'bootstrap' resource to depend on the 'server_volume_attachment', I think you can fix this.

  bootstrap:
    type: OS::Heat::SoftwareDeployment
    depends_on: server_volume_attachment

You don't have explicitly add 'depends_on' for 'bootstrap_script' in 'bootstrap'.

Revision history for this message
Alexey Shchukin (alex-v-schukin) wrote :

I tried the following:
- change the 'bootstrap' resource definition (see below) and recreate a stack.
---
  bootstrap:
    type: OS::Heat::SoftwareDeployment
    depends_on: server_volume_attachment
    properties:
      name: 01_bootstrap
      config:
        get_resource: bootstrap_script
---

- apply patch from https://review.openstack.org/#/c/482663/ and recreate a stack.

Nothing of that helped.

Revision history for this message
Rabi Mishra (rabi) wrote :

Looks like the issue exists in master too. Will have a look.

Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
importance: Undecided → Medium
Rico Lin (rico-lin)
Changed in heat:
status: New → Triaged
Revision history for this message
Rabi Mishra (rabi) wrote :

It seems we keep the referenced attributes of a resource in node_data/stack_defn immediately after the resource is created/updated. Hence any changes to it afterwards is not accounted for when the resource with the referenced attribute is created/updated . I suggested the user an workaround for this, by splitting the template into two.

1. child template with server, volume, volume_attachments, networks
2. parent template with template resource, software config and deployment resources

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.