Skip to content
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

TAS: may report negative values of pods in messages for non-admitted workloads #3482

Closed
mimowo opened this issue Nov 7, 2024 · 3 comments · Fixed by #3490
Closed

TAS: may report negative values of pods in messages for non-admitted workloads #3482

mimowo opened this issue Nov 7, 2024 · 3 comments · Fixed by #3490
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mimowo
Copy link
Contributor

mimowo commented Nov 7, 2024

What happened:

When a workload using preferred topology annotation cannot be admitted is sometimes reports negative number of pods in the status message of the workload.

What you expected to happen:

negative values of pods are never reported, it does not make sense.

How to reproduce it (as minimally and precisely as possible):

I have a reproducible scenario, but it is yet not simplified enough to be included here. I will simplify and post.

Basically I create multiple jobs using preferred, and workload corresponding to the non-admitted job reports message like:

status:
  conditions:
  - lastTransitionTime: "2024-11-07T13:01:01Z"
    message: 'couldn''t assign flavors to pod set main: insufficient unused quota
      for cpu in flavor tas-flavor, 30 more needed, topology "gke-default" allows
      to fit only -18 out of 40 pod(s)'
    observedGeneration: 1
    reason: Pending
    status: "False"
    type: QuotaReserved

Anything else we need to know?:

It was reported first here: #3211 (comment)

@mimowo mimowo added the kind/bug Categorizes issue or PR as related to a bug. label Nov 7, 2024
@mimowo
Copy link
Contributor Author

mimowo commented Nov 7, 2024

/assign

@mimowo
Copy link
Contributor Author

mimowo commented Nov 7, 2024

/cc @tenzen-y @hy00nc

@mimowo mimowo changed the title TAS: when using preferred topology annotation a non-admitted workload may report negative values of pods TAS: may report negative values of pods in messages for non-admitted workloads Nov 8, 2024
@mimowo
Copy link
Contributor Author

mimowo commented Nov 8, 2024

After investigation it turns out that this is not only related to preferred - so I retitled the issue.

The root cause is that the usage of TAS workloads is multiplied by the number of resources, because of this loop which iterates over pairs of (resource, flavor). So it would add the same usage for (cpu, tas-flavor), (memory, tas-flavor), (gpu, tas-flavor).

I proposed a fix #3490

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant