Skip to content

Conversation

@kerthcet
Copy link
Contributor

Signed-off-by: kerthcet [email protected]

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
Contributor

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
Contributor 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.

@kerthcet kerthcet force-pushed the feat/consider-initContainer-in-gpu branch from 0a27f6b to d824529 Compare August 11, 2022 02:18
@kerthcet
Copy link
Contributor 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

Details 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
Contributor

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
Contributor Author

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

@Thor-wl
Copy link
Contributor

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