Remove validation on image_type
Bug #720459 reported by
Rick Harris
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Rick Harris |
Bug Description
Nova's xs-unified-images branch adds a new image_type called 'vhd' (slightly different than 'raw').
While, we could add 'vhd' to the validation, I think it makes more sense to remove the validation entirely. Unlike statuses, which need to be controlled by Glance to remain consistent across installations, image_type is *only* used by the IAAS modules (Nova). Since Nova, et. al. may support different image_types, it makes sense to just blindly store whatever they tell us.
This change would be a stop-gap. Eventually, we'll have container_format and disk_format attributes instead of image type.
Related branches
lp:~rconradharris/glance/bug720459
- Jay Pipes (community): Approve
- Devin Carlen (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedglance/registry/db/models.py (+1/-1)
Changed in glance: | |
assignee: | nobody → Rick Harris (rconradharris) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in glance: | |
status: | In Progress → Fix Committed |
Changed in glance: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
"Unlike statuses, which need to be controlled by Glance to remain consistent across installations, image_type is *only* used by the IAAS modules (Nova)."
This is not correct. Glance can run entirely without Nova. When run as a stand-alone image registry and delivery service, wouldn't it be a good idea to validate the data going into the registry database?
Removing this constraint just means Glance lets whatever garbage is in the request into the database.
IMHO, a better idea would be to complete the api-image-format blueprint *before* trying to do Nova's xs-unified-images blueprint because the latter is facilitated by the former.
-jay