get_attr doesn't work with block_device_mapping
Bug #1463531 reported by
Zane Bitter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Rabi Mishra | ||
Juno |
Fix Released
|
High
|
Rabi Mishra | ||
Kilo |
Fix Released
|
High
|
Rabi Mishra |
Bug Description
When the fields of the OS::Nova::Server block_device_
This was previously raised as bug 1230140. The fix on that occasion was to get rid of the 'uuid' attribute of a volume and require people to use get_resource instead. However, this fails to take into account that the volume may be inside a nested stack. At least in Juno and before this means a volume can not be defined in a template resource. In Kilo and later there may be a workaround using get_resource instead of get_attr, but I wouldn't regard it as a fix per se.
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: juno-backport-potential kilo-backport-potential |
Changed in heat: | |
status: | Fix Committed → Fix Released |
tags: |
added: in-stable-juno in-stable-kilo removed: juno-backport-potential kilo-backport-potential |
Changed in heat: | |
milestone: | liberty-1 → 5.0.0 |
To post a comment you must log in.
I think there is a simple fix for this. get_attr returns an empty string rather than 'None'. If we can change the validation logic to
some thing like this, it would work. This is standard problem for all validations where we use nested stack resources for properties which are not created yet.
if volume_id is not None and snapshot_id is not None:
raise exception. ResourcePropert yConflict(
self. BLOCK_DEVICE_ MAPPING_ VOLUME_ ID,
self. BLOCK_DEVICE_ MAPPING_ SNAPSHOT_ ID)
' device mapping %s') % device_name
raise exception. StackValidation Failed( message= msg)
if volume_id is None and snapshot_id is None:
msg = _('Either volume_id or snapshot_id must be specified for'