From 7b6f6db2dc8a3cefa97eb87c81ae032f7e0f29bf Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Fri, 25 Sep 2026 12:15:37 -0600 Subject: [PATCH] Fix homelab up worker and omniroute blockers --- infra/omniroute/docker-compose.yml | 3 +-- scripts/workers | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/infra/omniroute/docker-compose.yml b/infra/omniroute/docker-compose.yml index 0a43d5a..64ea1da 100644 --- a/infra/omniroute/docker-compose.yml +++ b/infra/omniroute/docker-compose.yml @@ -3,11 +3,10 @@ services: image: ${OMNIROUTE_IMAGE:-diegosouzapw/omniroute:latest} container_name: ${OMNIROUTE_CONTAINER_NAME:-omniroute} restart: unless-stopped - stop_timeout: 40 ports: - "${OMNIROUTE_PORT:-20128}:20128" volumes: - omniroute-data:/app/data volumes: - omniroute-data: \ No newline at end of file + omniroute-data: diff --git a/scripts/workers b/scripts/workers index a6b9e1d..dcffa51 100755 --- a/scripts/workers +++ b/scripts/workers @@ -24,7 +24,7 @@ Commands: restart [index|all] Gracefully restart Pimox worker VM(s) drain Drain a Kubernetes worker node uncordon Mark a Kubernetes worker node schedulable - recreate-plan Print the safe recreate sequence for one Pimox worker + recreate-plan [index|all] Print the safe recreate sequence for Pimox worker(s) rebalance Restart evicted/pending pods and show scheduling pressure EOF } @@ -182,8 +182,8 @@ uncordon_node() { kubectl_cmd uncordon "$node" } -recreate_plan() { - local index="${1:-}" +recreate_plan_one() { + local index="$1" local vmid local node @@ -214,6 +214,15 @@ Target node: $node EOF } +recreate_plan() { + local target="${1:-all}" + local index + + for index in $(target_indexes "$target"); do + recreate_plan_one "$index" + done +} + rebalance() { if ! have kubectl || [ ! -s "$KUBECONFIG_PATH" ]; then echo "kubectl and kubeconfig are required for workers rebalance." >&2