redhat-partner-solutions / crucible

Apache License 2.0
34 stars 59 forks source link

RFE: support ipv6 in setup_vm_host_network role #298

Open novacain1 opened 7 months ago

novacain1 commented 7 months ago

Bug description

https://github.com/redhat-partner-solutions/crucible/blob/main/roles/setup_vm_host_network/tasks/make_network_config.yml#L25 only supports IPv4. Given the emphasis on dual stack deployments, an RFE is to provide support for IPv6 based addresses on the bridge to hold VMs, that way the playbook could be used to set the IPv6 address on the bridge.

OpenShift version

other (provide in the description)

Assisted Installer version

other (provide in the description)

Relevant log output

TASK [generate_manifests : Using query to set mac_interface_map for supervisor1] ***************************************************************************************
Tuesday 12 December 2023  16:24:04 -0500 (0:00:00.042)       0:02:51.475 ****** 
fatal: [bastion]: FAILED! => 
  msg: |-
    Error in jmespath.search in json_query filter plugin:
    {'interfaces': [{'name': 'enp1s0', 'mac': '52:54:17:EC:BD:8D', 'addresses': {'ipv4': [{'ip': '172.28.50.47', 'prefix': 26}], 'ipv6': [{'ip': 'fd00:172:28:50::47', 'prefix': '64'}]}}], 'dns_server_ips': ['172.28.50.12', '{{ ipv6.dns }}'], 'routes': [{'destination': '0.0.0.0/0', 'address': '172.28.50.1', 'interface': '{{ vm_bridge_name }}'}, {'destination': '::/0', 'address': '{{ ipv6.gateway }}', 'interface': '{{ vm_bridge_name }}'}, {'destination': '172.28.50.0/24', 'address': '172.28.50.1', 'interface': '{{ vm_bridge_name }}'}]}: 'ipv6' is undefined. 'ipv6' is undefined

Inventory file

No response

Required statements

nocturnalastro commented 5 months ago

If you defined network_config instead you can get ipv6 and dual stack. I think it would be a good idea to allow vm_bridge_ip to be ipv6 or ipv4 but I think dual stack it is probably a good idea to use network_config.

Let me have a think about how to do this in a why that is backwards compatible :)