-
Notifications
You must be signed in to change notification settings - Fork 8
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
Restart services with handlers #52
Conversation
* `install.yml` no longer performs restarts in a separate play in the playbook. This will be handled by setting `serial` attribute per play later on.
This looks really interesting! I would love to test this. However, I can't seem to figure out how this helps running only the restart in serial mode? I guess we still want to perform all the work on all nodes in parallell, but only restart in serial (or 50% serial, or similar). How would you configure this? |
@anton-johansson It doesn't add serial. We need another PR for that. But adding would be very simple. Add - hosts: localhost
connection: local
roles:
- certificates
- hosts: etcd
serial: "{{ serial_etcd | default(-1) }}"
roles:
- etcd
- hosts: masters
serial: "{{ serial_masters | default(-1) }}"
roles:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- hosts: nodes
serial: "{{ serial_nodes | default(-1) }}"
roles:
- cni
- containerd
- runc
- kube-proxy
- kubelet Also, commit 8e290b9 adds a handler for |
@anton-johansson I think you can go ahead and re-open #48 again and rebase once this PR is merged |
Aha, okay, that makes sense. So the plan is to run everything in serial, and not just restarts? That's okay with me, just curious. I'll reopen #48 and I'll see if I can make the appropriate changes. |
Well yeah I can't figure out another way since it would mean that restarts are performed in a separate play which would require a lot of checks to determine if stuff has changed in order to perform restarts. Because we only want to perform restarts if something has changed. No point in restarting stuff if the system hasn't been altered. That is what handlers are good at. |
Okay, that's fair enough for me! Thinking about it, if I want pure high availability, it feels good to actually not touch nodes at all that are waiting for "their turn". |
This PR adds Handlers to those roles that have servers that needs to be restarted at the end of each play. Namely: