-
Notifications
You must be signed in to change notification settings - Fork 173
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
k3s component actually waits for node to come up #366
Conversation
The previuos command was just running the 'k get nodes' command without verifying any nodes were actually returned.
I was originally doing a |
I think the reason that |
I think we may need to confirm wc/ Grep actually exist on our target OS's as well--or do it in code and get rid of this step. I actually think something that blocks everything in code until there is a complete node is cleaner than this anyway. Thoughts? |
Maybe something like this? components:
- name: k3s
needsK8s: false
...
- name: InstallSomeFile
needsK8s: false
...
- name: someFooBarK8sDeployment
needsK8s: true
... |
It will not return an error code if the nodes are not up yet, which is a race condition we ran into when trying to get the node architecture when initializing with k3s. We care that at least 1 node is there. |
That makes sense. If this very small change fixes that than I'm all for it. Something bigger that resolves the issue in a more elegant way can come later |
You don't even need that. The only time we don't need k8s is when you are only moving files and that is already accounted for in the package deploy stage. We already know if you need k8s. I think rather than using scripts (which was a band-aid and brittle) we should just either add something to the k8s getstate function or some call before that to make sure we have a real/valid k8s connection to a running cluster. |
I'll replace this PR with something like that then :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YrrepNoj I believe you're going to rewrite this to use something in go instead
fbe0f56
to
045f3ba
Compare
@jeff-mccoy I think this should be more in line with what you were thinking |
I think there's still some issue with the test--but this is good enough to merge and finish cleaning in the main branch now. Thanks! |
The previous command was just running the 'k get nodes' command without verifying any nodes were actually returned.
Description
As part of the 'after' script definitions for the k3s component we will now verify that at least 1 k3s node is returned when 'kubectl get nodes' is executed.
Type of change