-
Notifications
You must be signed in to change notification settings - Fork 673
Weave network not deleted by 'kubeadm reset' #2911
Comments
Easiest thing is to reboot the machine. You can also download the |
Reboot the machine? I can install with a command but need to reboot for an uninstall? Not easy! I don't think it is a works for me. Also, you have the below note posted on the website. Are you suggesting to download weave on master or node? Is there a linux command to delete the weave network directly?
|
Found - Need to test if this doesn't break anything else. |
That would be on every master and every node.
The You also have the option to ignore these devices: if you have no software using them then nothing bad will happen. What may be more important is the CNI configuration file installed in The root problem, as I see it, is that Kubernetes does not tell the individual pods that the entire daemonset is being deleted: there is no hook we can act on to uninstall when required. I created a new issue kubernetes/kubernetes#44911 to see if anyone has any ideas over there. If any pods have been attached to Weave Net then deleting the bridge will remove their network access, and Kubernetes has no way to be told that it should do something to recover. Again, a reboot is the simplest way to get back to a stable state. |
Ah, I forgot you used |
#2888 also referred to difficulties cleaning down |
Thanks @bboreham for you detailed reply. I will summarize the problem that I have, the options that I have and few clarification I need. Requirement:
What I did for this :
Issues:
Things that need to be done still:
Weave Recommendation :
Your Recommendation:
Conflict of recommendations:
Clarification If Kubernetes master dies, the k8s API server also dies. So, the node needs to be instructed by kubeadm reset or a weave standalone binary (if any) to do the cleanup, as there is no way for the node to receive instruction from master. This needs to be an activity on the individual node rather than acting on a master hook.
Instead of having the install, delete, install loop as described in (Conflict of recommendations, point 3), can't there be a standalone binary that gets downloaded during the join process that does the cleanup activity? Where can I find this file/command? Is it a standalone binary and can be run on a node without a need for a full install or is it part of the full install?
The perspective is of a thoroughly confused used when using weave. Sorry! |
There is no hook in Kubernetes or Kubeadm to execute such a binary when required. I tagged this requirement onto kubernetes/kubernetes#35183. If you want to download and run it yourself, it's:
then
This is running outside of Kubernetes, with no knowledge of Kubernetes. It gets the job done, that is all. It is not a "conflict", it's just different. |
@bboreham Thank you very much for your understanding and patient reply.. Appreciate it! |
@bboreham how would you feel if we add cleanup in this script on SIGTERM on Pod termination, removing links created here: weave/prog/weave-kube/launch.sh Line 33 in f17a2a0
This will have a positive impact on the https://github.com/kubernetes/community/pull/483/files Let me know! |
will be properly fixed by https://github.com/kubernetes/community/pull/483/files |
@klizhentas as I said earlier the problem is that Kubernetes does not tell the individual pods that the entire daemonset is being deleted; we do not want to uninstall (hence break the network for all other pods) on deletion of an individual Weave Net pod because it may be a restart for upgrade. kubernetes/community#541 would give us a "reason for termination" which is what we need to act correctly. "deferContainers" are a solution to a different problem. |
This got worse with Weave Net 2.0, because it creates a data file on the host, and if you restart then the old contents of that file can disrupt operation. Maybe #3022 could help, indirectly. |
I used kubeadm join with token and ip address of master.
Immediately I had to reset it.
But, kubeadm does not delete the weave network.
FYI - I did not install weave on node. I installed only on master as per the kubeadm install guide.
How to recover the node?
The text was updated successfully, but these errors were encountered: