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

feature: Add rolling updates (node auto patching) feature #48

Closed
wants to merge 1 commit into from

Conversation

gyptazy
Copy link
Owner

@gyptazy gyptazy commented Aug 7, 2024

General

This PR adds the basic functionality to add a rolling update support for nodes in a cluster to ProxLB.
If activated, nodes will:

  • Check if update for itself is available
  • Integrate the updates
  • Check if a reboot is required
  • Add self to ignore_nodes list
  • Rebalance the cluster (move workloads away from self)
  • Reboot

This also brings up the new proxlb-additions package, which adds the missing options to the Proxmox API. This packages will be required. If this option is activated but the package is missing, ProxLB will throw an error guiding you to install the required package.

Test

Package updates present, but no reboot required:

root@virt01:~# /bin/proxlb -d -c /etc/proxlb/proxlb.conf
<6> ProxLB: Info: [logger]: Logger verbosity got updated to: INFO.
<4> ProxLB: Warning: [api-connection]: API connection does not verify SSL certificate.
<6> ProxLB: Info: [api-connection]: API connection succeeded to host: 127.0.0.1.
<6> ProxLB: Info: [node-update-status-getter]: Get update status for node: virt01.
<6> ProxLB: Info: [node-update-status-getter]: Updates available for node: virt01.
<6> ProxLB: Info: [node-update-executor]: Execute updates on node: virt01.
<6> ProxLB: Info: [node-update-executor]: Sucessfully integrated updates to node: virt01.
<6> ProxLB: Info: [node-reboot-status-getter]: Get reboot status for node: virt01.
<6> ProxLB: Info: [node-reboot-status-getter]: No reboot required for node: virt01.
<6> ProxLB: Info: [node-statistics]: Added node virt01.
<6> ProxLB: Info: [node-statistics]: Added node virt03.
<6> ProxLB: Info: [node-statistics]: Added node virt02.
<6> ProxLB: Info: [node-statistics]: Created node statistics.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-include-exclude-tags]: Got PLB include group.
[...]

Package updates present, reboot required:

add me

Activated but API addition missing:

Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [api-connection]: API connection succeeded to host: 127.0.0.1.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [cluster-master-getter]: Getting master node from cluster.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [cluster-master-getter]: Master node: virt03
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [cluster-master-validator]: Node executor hostname is: virt03
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [node-statistics]: Added node virt03.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [node-statistics]: Added node virt01.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [node-statistics]: Added node virt02.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [node-statistics]: Created node statistics.
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [rolling-node-updates]: Performing rolling node updates. Rolling updates: True and ProxLB API: True
Aug 10 14:35:41 virt03 proxlb[2543742]:  ProxLB: Info: [node-update-status-getter]: Get update status for node: virt03.
Aug 10 14:35:41 virt03 pvedaemon[948]: update new package list: /var/lib/pve-manager/pkgupdates
Aug 10 14:35:44 virt03 proxlb[2543742]:  ProxLB: Info: [node-update-status-getter]: Updates available for node: virt03.
Aug 10 14:35:44 virt03 proxlb[2543742]:  ProxLB: Info: [node-update-executor]: Execute updates on node: virt03.
Aug 10 14:35:44 virt03 proxlb[2543742]:  ProxLB: Error: [node-update-executor]: Missing API endpoint on node: virt03. Please make sure to have the package proxlb-additions installed.

Notes

Fixes: #39
Fixes: #18

@gyptazy gyptazy added the feature label Aug 7, 2024
@gyptazy gyptazy self-assigned this Aug 7, 2024
@gyptazy gyptazy force-pushed the feature/39-cluster-rolling-updates branch from 8bbead8 to d3600fd Compare August 7, 2024 14:19
@gyptazy gyptazy marked this pull request as draft August 7, 2024 14:21
@gyptazy gyptazy force-pushed the feature/39-cluster-rolling-updates branch 7 times, most recently from f60198d to 5f9d332 Compare August 9, 2024 20:10
@gyptazy gyptazy added this to the Release 1.1.0 milestone Aug 9, 2024
@gyptazy gyptazy marked this pull request as ready for review August 9, 2024 20:11
  * Add rolling updates feature.
  * Add own (ProxLB) API integration.

Fixes: #39
Fixes: #18
@gyptazy gyptazy force-pushed the feature/39-cluster-rolling-updates branch from 5f9d332 to f834f07 Compare August 10, 2024 18:56
@gyptazy gyptazy modified the milestones: Release 1.1.0, Release 1.0.2 Aug 13, 2024
@gyptazy gyptazy marked this pull request as draft August 18, 2024 08:49
@gyptazy gyptazy removed this from the Release 1.1.0 milestone Aug 19, 2024
@gyptazy gyptazy closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Cluster auto-patching / rolling updates Feature: Create an API Interface
1 participant