The task Init cluster inside the transient k3s-init service fails when using wsl to run #355
Replies: 6 comments
-
I have the same issue. I’m not sure the IP scheme is correct. Like do those ips need to be on the network you have set up or are they built with metallb |
Beta Was this translation helpful? Give feedback.
-
@Jimikephart The IPs need to be changed with the one according to your network. @Squawkykaka This is not only happening in WSL, I encountered a similar issue too when trying to set 3 master nodes in hosts.ini. Setting 1 master node works though. 1 task fails for each of the 3 master nodes. Though not exactly the same error, it also had something to do with the "Init cluster inside the transient k3s-init service fails" task. @timothystewart6 Any ideas? |
Beta Was this translation helpful? Give feedback.
-
@xymvl4t3d is it just an ip off my /24 then that doesn’t go to anything? My hardware is 10.10.0.3-10 with me running the commands on 10.10.0.7 |
Beta Was this translation helpful? Give feedback.
-
@Jimikephart yes, unassigned IPs from your network. for e.g. default: yours would be: X being an unassigned IP |
Beta Was this translation helpful? Give feedback.
-
@xymvl4t3d oh so my apiserver_endpoint shoul be 192.168.86.222 or something like that as all my ips have 86 in them |
Beta Was this translation helpful? Give feedback.
-
still broken after that and it also seems to be related to: server_init_args: >- |
Beta Was this translation helpful? Give feedback.
-
Expected Behavior
I dont really know it just spit out a huge error
Current Behavior
It gets to the task then gives this error:
TASK [k3s_server : Init cluster inside the transient k3s-init service] *************************************************
fatal: [192.168.86.45]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {% if groups[group_name_master | default('master')] | length > 1 %}\n {% if ansible_hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname'] %}\n --cluster-init\n {% else %}\n --server https://{{ hostvars[groups[group_name_master | default('master')][0]].k3s_node_ip | split(",") | first | ansible.utils.ipwrap }}:6443\n {% endif %}\n --token {{ k3s_token }}\n{% endif %} {{ extra_server_args | default('') }}: {{ extra_args }} {{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }} --tls-san {{ apiserver_endpoint }} --disable servicelb --disable traefik: --flannel-iface={{ flannel_iface }} --node-ip={{ k3s_node_ip }}: {{ ansible_facts[flannel_iface]["ipv4"]["address"] }}: 'dict object' has no attribute 'eth0'\n\nThe error appears to be in '/home/gleask/ansible/k3s-ansible/roles/k3s_server/tasks/main.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Init cluster inside the transient k3s-init service\n ^ here\n"}
fatal: [192.168.86.47]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {% if groups[group_name_master | default('master')] | length > 1 %}\n {% if ansible_hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname'] %}\n --cluster-init\n {% else %}\n --server https://{{ hostvars[groups[group_name_master | default('master')][0]].k3s_node_ip | split(",") | first | ansible.utils.ipwrap }}:6443\n {% endif %}\n --token {{ k3s_token }}\n{% endif %} {{ extra_server_args | default('') }}: {{ extra_args }} {{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }} --tls-san {{ apiserver_endpoint }} --disable servicelb --disable traefik: --flannel-iface={{ flannel_iface }} --node-ip={{ k3s_node_ip }}: {{ ansible_facts[flannel_iface]["ipv4"]["address"] }}: 'dict object' has no attribute 'eth0'\n\nThe error appears to be in '/home/gleask/ansible/k3s-ansible/roles/k3s_server/tasks/main.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Init cluster inside the transient k3s-init service\n ^ here\n"}
fatal: [192.168.86.46]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {% if groups[group_name_master | default('master')] | length > 1 %}\n {% if ansible_hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname'] %}\n --cluster-init\n {% else %}\n --server https://{{ hostvars[groups[group_name_master | default('master')][0]].k3s_node_ip | split(",") | first | ansible.utils.ipwrap }}:6443\n {% endif %}\n --token {{ k3s_token }}\n{% endif %} {{ extra_server_args | default('') }}: {{ extra_args }} {{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }} --tls-san {{ apiserver_endpoint }} --disable servicelb --disable traefik: --flannel-iface={{ flannel_iface }} --node-ip={{ k3s_node_ip }}: {{ ansible_facts[flannel_iface]["ipv4"]["address"] }}: 'dict object' has no attribute 'eth0'\n\nThe error appears to be in '/home/gleask/ansible/k3s-ansible/roles/k3s_server/tasks/main.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Init cluster inside the transient k3s-init service\n ^ here\n"}
PLAY RECAP *************************************************************************************************************
192.168.86.43 : ok=12 changed=0 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0
192.168.86.45 : ok=13 changed=0 unreachable=0 failed=1 skipped=22 rescued=0 ignored=0
192.168.86.46 : ok=13 changed=0 unreachable=0 failed=1 skipped=22 rescued=0 ignored=0
192.168.86.47 : ok=19 changed=4 unreachable=0 failed=1 skipped=16 rescued=0 ignored=0
Steps to Reproduce
Run the install script in ubuntu wsl
Context (variables)
Operating system: Windows 11 Home (WSL ubuntu)
Hardware:
Variables Used
all.yml
Hosts
host.ini
Possible Solution
Beta Was this translation helpful? Give feedback.
All reactions