Instances in soft-delete counting against quota

Bug #914532 reported by Rick Harris
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

SCENARIO:

Instance Quota: 10

1. User spins up 10 instances.

2. User deletes 10 instances.

3. User goes to spin up 1 instance <--- THIS FAILS.

The reason this fails is because in step 2, we didn't actually delete the instance, we marked it for soft-delete. Currently these soft-deleted instances will count in the tally of used-instances for the customer.

This is an issue b/c the customer has no idea that we're actually retaining the instance for CYA purposes. It won't show up in the list, and we may potentially hold on to the instance-data for many hours.

FIX:

We should modify the quota code to disregard soft-deleted instances.

CAVEAT:

Removing the quota could possibly lead to a DOS vector since a user could continually create and destroy N instances; consuming disk-space as they go.

This could be mitigated by only keeping an instance in soft-delete for at most as long as it was around (e.g. if an instance was created and torn down in 5 minutes, we'll keep it around after deleting for 5 minutes).

Another addition could be a soft_delete quota that is set fairly high; for example a user could have a soft_deleted quota set to 10 times their instance quota.

Revision history for this message
Thierry Carrez (ttx) wrote :

I'd say that the soft-delete feature is a trade-off: you add incorrect quotas and various inconsistencies to get CYA support. I understand that some deployers may want this, but a lot of other, more down-to-the-bone cloud deployers would certainly prefer correct quotas and no CYA. This should have been optional...

Changed in nova:
status: New → Incomplete
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Hendrik Volkmer (hvolkmer) wrote :

One possible solution might be to just count the disk space quota for soft-deleted instances. The user will not be able to DOS the disk space but still spin up other instances. If heavy use of soft-deleted instances is needed the disk-space quota can be configured accordingly. e.g. set higher disk space quota to allow for soft-deleted instances but still prevent the disk space from filling up.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

upping the importance. This is a big user experience issue.

Changed in nova:
importance: Wishlist → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.