Skip to content

Account/domain limits stay cached forever #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hrak opened this issue Jan 16, 2024 · 1 comment · Fixed by #338
Closed

Account/domain limits stay cached forever #336

hrak opened this issue Jan 16, 2024 · 1 comment · Fixed by #338
Assignees
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

Comments

@hrak
Copy link
Contributor

hrak commented Jan 16, 2024

/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:

  • Cluster-api-provider-cloudstack version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 16, 2024
hrak added a commit to hrak/cluster-api-provider-cloudstack that referenced this issue Jan 17, 2024
hrak added a commit to hrak/cluster-api-provider-cloudstack that referenced this issue Feb 5, 2024
@rohityadavcloud rohityadavcloud added this to the v0.5.0 milestone Feb 8, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants