https://rancher.com/ logo
Title
s

sparse-fireman-14239

10/20/2022, 8:26 AM
Once again I have a question about how to properly shutdown a RKE2 master node 😄 1. Cordon node 2. Drain node 3. systemctl stop rke2-server which ends with the service being faulted I still have etcd, api server and everything else running. From an RKE2 perspective, what is the correct way to shutdown the relevant services? Thinking primarily etcd I guess, but ideally I'd shut down the other core services first and etcd last.
c

creamy-pencil-82913

10/20/2022, 8:34 AM
It will always show failed when you stop it. Low priority bug that it doesn't exit with 0 when you signal it to shutdown
s

sparse-fireman-14239

10/20/2022, 8:35 AM
Thanks @creamy-pencil-82913 that's good to know 🙂 Any tips on stopping etcd? Do I just stop it with crictl or should I enter the container and issue etdctl something?
c

creamy-pencil-82913

10/20/2022, 8:35 AM
If you just shut down the node normally, systemd will go through the normal process of signalling things
The killall script also works but is a little brutal
s

sparse-fireman-14239

10/20/2022, 8:36 AM
Ok thanks @creamy-pencil-82913 🙂 Yeah I've looked into using that but as you're saying it's a little brutal.
c

creamy-pencil-82913

10/20/2022, 8:38 AM
Right now we intentionally leave things running when the main rke2 process is stopped. If this is causing problems in your environment, feel free to open an issue. Making it wait and stop all the control-plane components before exiting would be non-trivial but I could see the reason for wanting it.
s

sparse-fireman-14239

10/20/2022, 8:39 AM
Yeah I've read a few GH issues regarding stopping rke2-server and I get your points. For me it's not an issue but logically, if the rke2-server unit starts something, it should also shut it down.
Oh and it'd be lovely if this behavior was documented instead of everyone not understanding why it's faulted and why services are not stopped 🙂