You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside /templates/keepalived.conf.j2 the Ansible fact "ansible_default_ipv4" is used three times.
If you want to run an IPv6 / Hybrid cluster which has an IPv6 main-address you will run in either of those two problems:
When no IPv4 interface is configured:
The execution fails with a fatal error and Ansible will stop the provisioning.
When both IPv4 and IPv6 interfaces are configured:
It will setup the keepalived VRRP on the wrong interface.
I for myself have just changed all occurrence of "ansible_default_ipv4" to "ansible_default_ipv6" for a workaround.
If it is possible it would be nice if you can integrate a check which evaluates if provided node ip/s are IPv4 or IPv6 and then based on the check later call the corresponding Ansible fact. An even easier workaround would be to use a role variable to enable IPv6.
Summary
Inside /templates/keepalived.conf.j2 the Ansible fact "ansible_default_ipv4" is used three times.
If you want to run an IPv6 / Hybrid cluster which has an IPv6 main-address you will run in either of those two problems:
When no IPv4 interface is configured:
The execution fails with a fatal error and Ansible will stop the provisioning.
When both IPv4 and IPv6 interfaces are configured:
It will setup the keepalived VRRP on the wrong interface.
I for myself have just changed all occurrence of "ansible_default_ipv4" to "ansible_default_ipv6" for a workaround.
If it is possible it would be nice if you can integrate a check which evaluates if provided node ip/s are IPv4 or IPv6 and then based on the check later call the corresponding Ansible fact. An even easier workaround would be to use a role variable to enable IPv6.
Issue Type
Bug Report
Ansible Version
Steps to Reproduce
Inventory:
[masters]
rancher-server01 ansible_host=[IPv6-Address] rke2_type=server
rancher-server02 ansible_host=[IPv6-Address] rke2_type=server
rancher-server03 ansible_host=[IPv6-Address] rke2_type=server
[workers]
rancher-node01 ansible_host=[IPv6-Address] rke2_type=agent
rancher-node02 ansible_host=[IPv6-Address] rke2_type=agent
rancher-node03 ansible_host=[IPv6-Address] rke2_type=agent
[k8s_cluster:children]
masters
workers
Playbook:
hosts: all
become: yes
become_user: root
become_method: su
vars:
rke2_ha_mode: true
rke2_api_ip : [IPv6-Address]
rke2_server_options:
- "cluster-cidr: 2001:cafe:42:0::/56"
- "service-cidr: 2001:cafe:42:1::/112"
rke2_custom_registry_mirrors:
- name: docker.io
endpoint:
- "https://registry.ipv6.docker.com"
roles:
Expected Results
Provisioning will run through all steps as usual and will bind keepalived VRRP on IPv6 Interface.
Actual Results
Provisioning fails at keepalived VRRP if no IPv4 is setup or will use wrong interface in an IPv4/IPv6 hybrid setup.
The text was updated successfully, but these errors were encountered: