Problems with OS::Nova::Server metadata property and complex values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Lars Kellogg-Stedman |
Bug Description
It is possible to set the "metadata" property of an OS::Nova::Server instance to a complex value. For example:
instance0:
type: OS::Nova::Server
metadata:
internal_ip: {get_attr: [instance0_eth1, fixed_ips]}
While this does not result in any errors, the value available in the "meta" key of the metadata service (http://
$ curl http://
{
"internal_ip": "[{u'subnet_id': u'20bb4a78-
}
It seems like heat should do one of two things:
(a) Refuse to create the stack if a metadata key is set to a non-string value, or
(b) Serialize complex values using, e.g., JSON
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | icehouse-3 → 2014.1 |
I assume you mean the metadata property:
instance0:
type: OS::Nova::Server
properties:
metadata:
internal_ip: {get_attr: [instance0_eth1, fixed_ips]}
Serialising complex values to json seems reasonable. Feel free to provide a fix which implements and documents this.