Skip to content

Conversation

@jiaqiluo
Copy link
Member

Issue
rancher/rancher#52155

Problem

This bug was identified while debugging the provisioning test.

The Pod node driver assigns the IP address from the first pod in the namespace rather than the intended target pod. Consequently, if the RKE2 server is configured using the value from rancher-machine, the node’s public IPv4 address is set incorrectly, causing the node to remain stuck in the “activating” state.

The logic can be found at https://github.com/rancher/machine/blob/master/drivers/pod/pod.go#L270-L284

Solution

  • Fix the error in the logic of getting the pod IP
  • Reduce duplicated code
  • Improve the logging message

Teseting

The image built from this branch is used to run the Test_Provisioning_MP_MultipleEtcdNodesScaledDownThenDelete test in rancher/rancher. The test passes successfully, and as shown in the screenshot below, the image used by the machine-provisioning pod is from the customized image, and the logging messages now provide more detailed information.

Screenshot 2025-10-31 at 4 31 00 PM

@jiaqiluo jiaqiluo requested a review from a team October 31, 2025 23:44
@pedromfcarvalho pedromfcarvalho self-requested a review November 4, 2025 13:48
@jiaqiluo jiaqiluo requested a review from jakefhyde November 4, 2025 17:41
@jiaqiluo jiaqiluo merged commit 0af9c2c into rancher:master Nov 4, 2025
1 check passed
@jiaqiluo jiaqiluo deleted the fix-pod-driver branch November 4, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants