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

dra scheduler: ensure that we never have nil claim/class parameters #123828

Merged
merged 2 commits into from Mar 11, 2024

Commits on Mar 11, 2024

  1. dra kubelet: fix error log

    Previously we were returning the error string from 'err' (which is nil), when
    we should have been returning it from result.Error. Without this it is hard to
    debug issues with NodeUnprepareResources.
    
    Signed-off-by: Kevin Klues <kklues@nvidia.com>
    klueska committed Mar 11, 2024
    Copy the full SHA
    fc2134c View commit details
    Browse the repository at this point in the history
  2. dra scheduler: create default claim/class parameters instead of nil

    Without this, the scheduler was crashing in newClaimController() in
    pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go
    
    The code in newClaimController() assumes that the parameters are not nil.
    Furthermore it assumes that there is at least one DriverRequest populated in
    order to allocate any resources to a claim.
    
    This PR adds logic to define default claim/class parameters that will allow
    allocation to proceed even if an end user doesn't provide any class or claim
    parameters themselves.
    
    Signed-off-by: Kevin Klues <kklues@nvidia.com>
    klueska committed Mar 11, 2024
    Copy the full SHA
    21a0dd1 View commit details
    Browse the repository at this point in the history