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

[release-4.13] UPSTREAM: 116376: node: device-mgr: Handle recovery by checking if healthy devices exist #1563

Closed

Conversation

ffromani
Copy link

@ffromani ffromani commented May 4, 2023

fixes device manager recovery ordering by rejecting admission of pod requiring unhealthy devices.

This is a targeted cherry pick containing only the core fix from https://github.com/kubernetes/kubernetes/pull//116337. It can be dropped once the PR merges upstream.

Validation of the change can be performed using openshift/origin#27902

…althy devices exist

In case of node reboot/kubelet restart, the flow of events involves
obtaining the state from the checkpoint file followed by setting
the `healthDevices`/`unhealthyDevices` to its zero value. This is
done to allow the device plugin to re-register itself so that
capacity can be updated appropriately.

During the allocation phase, we need to check if the resources requested
by the pod have been registered AND healthy devices are present on
the node to be allocated.

Also we need to move this check above `needed==0` where needed is
required - devices allocated to the container (which is obtained from
the checkpoint file) because even in cases where no additional devices
have to be allocated (as they were pre-allocated), we still need to
make sure he devices that were previously allocated are healthy.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
(cherry picked from commit dc1a592)
@openshift-ci-robot openshift-ci-robot added the backports/validated-commits Indicates that all commits come to merged upstream PRs. label May 4, 2023
@openshift-ci
Copy link

openshift-ci bot commented May 4, 2023

@ffromani: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.13] UPSTREAM: 116376: node: device-mgr: Handle recovery by checking if healthy devices exist

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link

@ffromani: the contents of this pull request could be automatically validated.

The following commits are valid:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci openshift-ci bot requested review from mrunalp and rphillips May 4, 2023 15:45
@openshift-ci
Copy link

openshift-ci bot commented May 4, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ffromani
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@ffromani
Copy link
Author

/retest-required

all failures look unrelated at glance

@openshift-ci
Copy link

openshift-ci bot commented May 18, 2023

@ffromani: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ffromani
Copy link
Author

obsoleted by #1586

@ffromani ffromani closed this May 26, 2023
@ffromani ffromani deleted the devmgr-recovery-4.13 branch May 26, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backports/validated-commits Indicates that all commits come to merged upstream PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants