Metadata would ideally properly differentiate between None and the empty string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Critical
|
Eoghan Glynn |
Bug Description
This is probably low priority, as it's fairly easy to work around, but this will bite us one day when we have a property when null is not the same as the empty string.
The way metadata is returns is inconsistent between the images detail list and the metadata headers on the image...
In particular, below you can see that disk_format is null in the JSON, but in the header it is returned as the empty string. I think the header should not be returned, because otherwise you can't tell Null and "" apart. For now, it's fairly easy to assume that "" => None though, but this may not always be valid.
---
Extract from the details list:
{"images": [{"status": "active", "name": "Z}'DM^
....
But then if we do a HEAD:
3 > HEAD http://
3 > Accept: application/json
3 > X-Auth-Token: c82aa86c-
3 * Client in-bound response
3 < 200
3 < X-Image-
3 < X-Image-Meta-Owner: d14f636a4439493
3 < X-Image-
3 < Content-Length: 0
3 < X-Image-
3 < X-Image-Meta-Name: Z}'DM^5z^
3 < Location: http://
3 < Etag: e9ceb5025565e99
3 < X-Image-
3 < X-Image-
3 < Connection: keep-alive
3 < X-Image-
3 < Date: Thu, 16 Feb 2012 19:29:03 GMT
3 < X-Image-Meta-Id: 3fd5cb85-
3 < X-Image-
3 < X-Image-
3 < X-Image-
3 < X-Image-
3 < X-Image-
3 < X-Image-Meta-Size: 4202895
3 < Content-Type: text/html; charset=UTF-8
3 < X-Image-
3 <
Changed in glance: | |
assignee: | nobody → Eoghan Glynn (eglynn) |
Changed in glance: | |
status: | Confirmed → In Progress |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-4 → 2012.1 |
I think you may have stumbled upon a much larger problem... An image should never be able to be created with a disk_format or container_format of null :(