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

Consider initContainer GPUs quota in calculating #2423

Merged

Conversation

kerthcet
Copy link
Member

Signed-off-by: kerthcet kerthcet@gmail.com

fix: #2422

@volcano-sh-bot
Copy link
Contributor

Welcome @kerthcet!

It looks like this is your first PR to volcano-sh/volcano 馃帀.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 10, 2022
}

// getGPUResourceOfPod returns the GPU resource required by the container.
func getGPUResourceOfContainer(container *v1.Container) uint {
func getGPUResourceOfContainer(container v1.Container) uint {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to keep the object reference as the input parameter for we only need the spec.resource part. That will be more efficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, currently we pass a value here.

Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet kerthcet force-pushed the feat/consider-initContainer-in-gpu branch from 0a27f6b to d824529 Compare August 11, 2022 02:18
@kerthcet
Copy link
Member Author

Updated and squashed.
The flaky test maybe not related to this PR.

failed to create job queue2-job in namespace 
  Unexpected error:
      <*errors.StatusError | 0xc00044e960>: {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "admission webhook \"validatejob.volcano.sh\" denied the request: can only submit job to queue with state `Open`, queue `queue2` status is ``;",
              Reason: "",
              Details: nil,
              Code: 400,
          },
      }
      admission webhook "validatejob.volcano.sh" denied the request: can only submit job to queue with state `Open`, queue `queue2` status is ``;
  occurred

@Thor-wl Thor-wl requested review from Thor-wl, hwdef, qiankunli and shinytang6 and removed request for zen-xu August 11, 2022 08:16
@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2022
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Thor-wl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2022
Copy link
Member

@hwdef hwdef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
Thanks!

@volcano-sh-bot volcano-sh-bot merged commit 2d6055f into volcano-sh:master Aug 11, 2022
@kerthcet kerthcet deleted the feat/consider-initContainer-in-gpu branch August 11, 2022 10:13
@Thor-wl
Copy link
Member

Thor-wl commented Aug 12, 2022

@kerthcet Hi, Could you cherry pick this patch to branch v1.6/v.15/v1.4? It makes sense.

@kerthcet
Copy link
Member Author

I think you mean release-1.6, release-1.5, release-1.4, right?

@Thor-wl
Copy link
Member

Thor-wl commented Aug 12, 2022

I think you mean release-1.6, release-1.5, release-1.4, right?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take initContainer's GPU quota into consideration
4 participants