manila oversubscription enhancements

Registered by haixin

The Current Manila has the following problems when collecting provisioned_capacity_gb and allocated_capacity_gb.

1: provisioned_capacity_gb = allocated_capacity_gb + shares_gb_created_manually (or another manila) on the same storage pool.
so provisioned_capacity_gb we can get from backend storage, but allocated_capacity_gb get from backend maybe not correct. unless exclusive storage pool. current mainla does not know whether the storage pool is exclusive. So it's necessary for Manila to count allocated_capacity_gb from the database. and let drivers to report provisioned_capacity_gb instead of allocated_capacity_gb.

2: about scheduler service supports Active/Active HA, The consume_from_share function is executed each time a share is created or extend, in this function allocated_capacity_gb and free_capacity_gb must be updated,Suppose 100 1gb
shares are created, 50 of which are executed on node 1 and 30 on node 2 and 20 on node 3. Since allocated_capacity_gb is maintained in the memory of the scheduling service. As a result, the allocated_capacity_gb values of the three scheduling nodes are inconsistent. This is problematic .We need to calibrate allocated_capacity_gb periodically.

How to solve the above two problems?
1: Add a periodic task in Manila Share to periodically collect allocated_capacity_gb statistics from the database and record it in self._allocated_capacity_gb . Read self. _allocated_capacity_gb and update allocated_capacity_gb in share_STATS [pools] when executing _report_driver_status.
      Because Manila doesn't require very much real-time data for allocated_capacity_gb, Therefore, the interval of periodic tasks can be set to 5 minutes to reduce system and database pressure.

2: Update the driver code to report provisioned_capacity_gb instead of allocated_capacity_gb.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
haixin
Direction:
Needs approval
Assignee:
haixin
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.