Track resources like memory and disk for a compute host. Provides the scheduler with useful information about availability through the ComputeNode model.
Bases: object
A declaration that a compute host operation will require free resources.
This information will be used to help keep the local compute hosts’s ComputeNode model in sync to aid the scheduler in making efficient / more correct decisions with respect to host selection.
Determine if this adjustment is old enough that we can assume it’s no longer needed.
Bases: object
Bases: object
Compute helper class for keeping track of resource usage as instances are built and destroyed.
Indicate that the operation that claimed the resources identified by ‘claim_id’ has either failed or been aborted and the resources are no longer needed.
Parameters: | claim – A claim ticket indicating a set of resources that were previously claimed. |
---|
Indicate that some resources are needed for an upcoming compute instance build operation.
This should be called before the compute node is about to perform an instance build operation that will consume additional resources.
Parameters: |
|
---|---|
Returns: | An integer ‘claim ticket’. This should be turned into finalize a resource claim or free resources after the compute operation is finished. Returns None if the claim failed. |
Indicate that the compute operation that previously claimed the resources identified by ‘claim’ has now completed and the resources have been allocated at the virt layer.
Calling this keeps the available resource data more accurate and timely than letting the claim timeout elapse and waiting for update_available_resource to reflect the changed usage data.
Parameters: | claim – A claim indicating a set of resources that were previously claimed. |
---|
Override in-memory calculations of compute node resource usage based on data audited from the hypervisor layer.
Add in resource claims in progress to account for operations that have declared a need for resources, but not necessarily retrieved them from the hypervisor layer yet.
Update the resource usage and stats after a change in an instance