Replies: 1 comment
-
Some notes here to summarize: This looks to be a repeating issue as per the issue tracker, and spread out over multiple versions: https://github.com/techno-tim/k3s-ansible/issues?q=ready+replicas+of+controller The answer seems to be be removing the controller: #146 (comment) To do this: Wait for the initial re-deployment / upgrade error to occur. At this point the cluster should be mostly operational anyways. Login to your cluster and spawn up a shell in your normal method. Run the following command.
Find the older, age wise, and delete it with the following command. Where is the name of the older controller.
Rerun deployment. Future Fix: Maybe prior to the "k3s_server_post : Deploy metallb pool" task we can delete the replicaset. However, I do see a step that looks to be doing that already? "[k3s_server_post : Delete outdated metallb replicas]" task passed with flying colors for me though, so maybe it isn't fully or properly deleting it. |
Beta Was this translation helpful? Give feedback.
-
"Wait for MetalLB resources" task fails if there is more then one replica set
Expected Behavior
"Wait for MetalLB resources" task finishes without errors
Current Behavior
"Wait for MetalLB resources" task fails
Steps to Reproduce
This is happening after update of metallb components
Context (variables)
3 master cluster in proxmox vms on Ubuntu 22.04.3 LTS
Operating system: Ubuntu 22.04.3 LTS
Hardware: proxmox vms
Variables Used
all.yml
Hosts
host.ini
Possible Solution
Check current replicaset before checking for condition or check deployment itself
Logs from ansible-playbook
TASK [k3s/post : Wait for MetalLB resources] *******************************************************************************************************
ok: [k3s-master-11.int.geoshapka.xyz] => (item=controller) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "deployment", "--namespace=metallb-system", "controller", "--for", "condition=Available=True", "--timeout=120s"], "delta": "0:00:00.231939", "end": "2023-09-16 17:57:22.992662", "item": {"condition": "--for condition=Available=True", "description": "controller", "name": "controller", "resource": "deployment"}, "msg": "", "rc": 0, "start": "2023-09-16 17:57:22.760723", "stderr": "", "stderr_lines": [], "stdout": "deployment.apps/controller condition met", "stdout_lines": ["deployment.apps/controller condition met"]}
ok: [k3s-master-11.int.geoshapka.xyz] => (item=webhook service) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "pod", "--namespace=metallb-system", "--selector=component=controller", "--for=jsonpath={.status.phase}=Running", "--timeout=120s"], "delta": "0:00:00.222319", "end": "2023-09-16 17:57:23.487403", "item": {"condition": "--for=jsonpath='{.status.phase}'=Running", "description": "webhook service", "resource": "pod", "selector": "component=controller"}, "msg": "", "rc": 0, "start": "2023-09-16 17:57:23.265084", "stderr": "", "stderr_lines": [], "stdout": "pod/controller-64f57db87d-gz7cf condition met", "stdout_lines": ["pod/controller-64f57db87d-gz7cf condition met"]}
ok: [k3s-master-11.int.geoshapka.xyz] => (item=pods in replica sets) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "pod", "--namespace=metallb-system", "--selector=component=controller,app=metallb", "--for", "condition=Ready", "--timeout=120s"], "delta": "0:00:00.217239", "end": "2023-09-16 17:57:23.978061", "item": {"condition": "--for condition=Ready", "description": "pods in replica sets", "resource": "pod", "selector": "component=controller,app=metallb"}, "msg": "", "rc": 0, "start": "2023-09-16 17:57:23.760822", "stderr": "", "stderr_lines": [], "stdout": "pod/controller-64f57db87d-gz7cf condition met", "stdout_lines": ["pod/controller-64f57db87d-gz7cf condition met"]}
ok: [k3s-master-11.int.geoshapka.xyz] => (item=ready replicas of controller) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "deployment", "--namespace=metallb-system", "--selector=component=controller,app=metallb", "--for=jsonpath={.status.readyReplicas}=1", "--timeout=120s"], "delta": "0:00:00.218818", "end": "2023-09-16 17:57:24.468843", "item": {"condition": "--for=jsonpath='{.status.readyReplicas}'=1", "description": "ready replicas of controller", "resource": "deployment", "selector": "component=controller,app=metallb"}, "msg": "", "rc": 0, "start": "2023-09-16 17:57:24.250025", "stderr": "", "stderr_lines": [], "stdout": "deployment.apps/controller condition met", "stdout_lines": ["deployment.apps/controller condition met"]}
failed: [k3s-master-11.int.geoshapka.xyz] (item=fully labeled replicas of controller) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "deployment", "--namespace=metallb-system", "--selector=component=controller,app=metallb", "--for=jsonpath={.status.fullyLabeledReplicas}=1", "--timeout=120s"], "delta": "0:02:00.120743", "end": "2023-09-16 17:59:24.856453", "item": {"condition": "--for=jsonpath='{.status.fullyLabeledReplicas}'=1", "description": "fully labeled replicas of controller", "resource": "deployment", "selector": "component=controller,app=metallb"}, "msg": "non-zero return code", "rc": 1, "start": "2023-09-16 17:57:24.735710", "stderr": "error: timed out waiting for the condition on deployments/controller", "stderr_lines": ["error: timed out waiting for the condition on deployments/controller"], "stdout": "", "stdout_lines": []}
ok: [k3s-master-11.int.geoshapka.xyz] => (item=available replicas of controller) => {"ansible_loop_var": "item", "changed": false, "cmd": ["k3s", "kubectl", "wait", "deployment", "--namespace=metallb-system", "--selector=component=controller,app=metallb", "--for=jsonpath={.status.availableReplicas}=1", "--timeout=120s"], "delta": "0:00:00.237164", "end": "2023-09-16 17:59:25.383833", "item": {"condition": "--for=jsonpath='{.status.availableReplicas}'=1", "description": "available replicas of controller", "resource": "deployment", "selector": "component=controller,app=metallb"}, "msg": "", "rc": 0, "start": "2023-09-16 17:59:25.146669", "stderr": "", "stderr_lines": [], "stdout": "deployment.apps/controller condition met", "stdout_lines": ["deployment.apps/controller condition met"]}
Comment
I`ve temporarily fixed it by manually deleting old replica set
Beta Was this translation helpful? Give feedback.
All reactions