Glance quota only enforced when we do size check on create image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Confirmed
|
Low
|
Akanksha Srivastava |
Bug Description
if I set user_storage_quota = 2 it should fail image create.
but since --location does not check image size during create, the quota is not enforced during create.
since the quota is not implemented during image download, we basically have an easy way of bypassing the quota...
to reproduce:
1. change user_storage_quota = 2 in user_storage_quota = 2
2. create an image using --location from any iso.
3. boot an instance from the image
Results:
The image will be created and we can boot instances from it -> hence quota is not enforced.
expected results:
I think that we should either enforce the quota on image download and not image create or we can block using --location when we enforce the quota.
Changed in glance: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in glance: | |
assignee: | nobody → Tushar Bankar (tushar-bankar) |
Changed in glance: | |
assignee: | Tushar Bankar (tushar-bankar) → nobody |
Changed in glance: | |
assignee: | nobody → Saranya Pandian (saranya-pandian) |
Changed in glance: | |
assignee: | nobody → Akanksha Srivastava (akanksha-dlf) |
If the remote location doesn't return the image size, then there's not much we can do there. So, either we always allow images using `--location` to be created or we don't allow them at all when quota size is enabled.
A third option would be to have a `enforce_ quota_on_ locations` flag that enables / disables this behaviour. I'm a bit against it because I don't want to add another configuration option for this.