Account/domain limits stay cached forever #336
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
release:must-have
Milestone
/kind bug
What steps did you take and what happened:
The CloudStack client in
pkg/cloud
is using https://github.com/jellydator/ttlcache/ to cache certain data fetched from the CS API. When the client connects for the first time, it fetches account/domain limits and stores them in the TTL cache.The ttlcache package is configured with
SkipTtlExtensionOnHit(false)
, meaning that as long as the cached account/domain limits are being hit by the client, their TTL never expires.This is causing problems when f.e. a domain is out of a certain resource (CPU cores/memory f.e.) on initial hit & cache of the account/domain limits, and the operator frees some resources in the domain. CAPC will not pick up the newly freed/available resources, causing VMs to never start up.
This could easily be solved by setting
SkipTtlExtensionOnHit
to true.What did you expect to happen:
CAPC should cache account/domain limits only for a certain time, not extend the TTL upon cache hit.
Anything else you would like to add:
I will address this with a PR shortly.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: