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

title: fix bug,some times clusternode created without podcidr #434

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

GreatLazyMan
Copy link
Contributor

What type of PR is this?

/kind bug

What does this PR do?

some times clusternode created without podcidr, fix this
code has bug, non-existent clusternode may be due to node controller has not created it,shoud add it in queue instead of skipping it

func requeue(originNodeName string, clusterNodeLister clusterlister.ClusterNodeLister, processor utils.AsyncWorker) {
	clusterNodes, err := clusterNodeLister.List(labels.Everything())
	if err != nil {
		return
	}

	for _, clusterNode := range clusterNodes {
		if clusterNode.Spec.NodeName == originNodeName {
			key, err := ClusterWideKeyFunc(clusterNode)
			if err != nil {
				return
			}

			processor.Add(key)
			break
		}
	}
}

Which issue(s) does this PR fix?

Fixes #433

Special notes for your reviewer:

Does this PR introduce a user-facing change?


@kosmos-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GreatLazyMan
To complete the pull request process, please assign duanmengkk after the PR has been reviewed.
You can assign the PR to them by writing /assign @duanmengkk in a comment when ready.

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

@GreatLazyMan
Copy link
Contributor Author

/cc @ONE7live @OrangeBao

@duanmengkk duanmengkk merged commit 4488663 into kosmos-io:main Mar 18, 2024
6 of 7 checks passed
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.

some times clusternode created without podcidr
3 participants