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

Non-schedulable nodes should not be part of targeted nodes for Module… #83

Conversation

yevgeny-shnaidman
Copy link
Member

… (#125)

Currently ModuleLoader cannot be scheduled to run on Non-Schedulable nodes, i.e. masters etc'. This PR fixed the extraction of schedulable nodes list, which will also affect the status update of the Module

@openshift-ci openshift-ci bot requested a review from ybettan October 27, 2022 13:42
@openshift-ci
Copy link

openshift-ci bot commented Oct 27, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yevgeny-shnaidman

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

@yevgeny-shnaidman
Copy link
Member Author

/assign @ybettan

…rh-ecosystem-edge#125)

Currently ModuleLoader cannot be scheduled to run on Non-Schedulable nodes,
i.e. masters etc'. This PR fixed the extraction of schedulable nodes list,
which will also affect the status update of the Module
@yevgeny-shnaidman yevgeny-shnaidman force-pushed the yevgeny/cherry-pick-c26cefd073c238b4fe0bf85a814594d3cdbee0b4 branch from f81d24a to c13ee41 Compare October 30, 2022 08:50
@yevgeny-shnaidman
Copy link
Member Author

Upstream PR for cherry-pick:
kubernetes-sigs/kernel-module-management@c26cefd

logger.Error(err, "Could not list nodes")
return nil, fmt.Errorf("could not list nodes: %v", err)
}
return nodes.Items, nil
nodes := make([]v1.Node, 0, len(selectedNodes.Items))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer to call it scheduableNodes but let's stay consistent with the u/s code.

@@ -397,3 +404,12 @@ func (r *ModuleReconciler) SetupWithManager(mgr ctrl.Manager, kernelLabel string
Named("module").
Complete(r)
}

func isNodeSchedulable(node *v1.Node) bool {
for _, taint := range node.Spec.Taints {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Who is responsible for tainting the node?

Copy link
Member Author

Choose a reason for hiding this comment

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

master nodes , that are not schedulable ( not SNO) are tainted by KubeAPI server

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ack. So this has nothing to do with our code.

@ybettan
Copy link
Collaborator

ybettan commented Oct 30, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 30, 2022
@openshift-merge-robot openshift-merge-robot merged commit 74bfa7f into rh-ecosystem-edge:main Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants