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

Fixed total CP waiting loop condition #14

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

PhilipSchmid
Copy link
Contributor

Problem on macOS: There are white spaces in front of the wc -l output this leads to the situation that the condition is never true ( 3 != 3).

│ + [[        3 == \3 ]]
│ + [[ 179 -gt 180 ]]
│ + WAIT_FOR_TOTAL_CONTROL_PLANE_NODES_ATTEMPT_NUM=180
│ + sleep 1
│ ++ kubectl get node -l node-role.kubernetes.io/control-plane --no-headers
│ ++ wc -l
│ + [[        3 == \3 ]]
│ + [[ 180 -gt 180 ]]
│ + WAIT_FOR_TOTAL_CONTROL_PLANE_NODES_ATTEMPT_NUM=181
│ + sleep 1
│ ++ kubectl get node -l node-role.kubernetes.io/control-plane --no-headers
│ ++ wc -l
│ + [[        3 == \3 ]]
│ + [[ 181 -gt 180 ]]
│ + echo 'Timed out while waiting for the total number of control-plane nodes.'
│ Timed out while waiting for the total number of control-plane nodes.
│ + exit 1

Reason: https://stackoverflow.com/a/30927885

Copy link

@ayuspin ayuspin left a comment

Choose a reason for hiding this comment

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

nice )

Copy link
Contributor

@bmcustodio bmcustodio left a comment

Choose a reason for hiding this comment

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

LGTM, thank you Philip! 💯

@PhilipSchmid PhilipSchmid merged commit 3ae80b8 into main Oct 20, 2023
2 checks passed
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