Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPV6 support is incomplete and buggy in VRouter NIC and AddressRange #586

Open
Thiryn opened this issue Jan 23, 2025 · 0 comments · May be fixed by #587
Open

IPV6 support is incomplete and buggy in VRouter NIC and AddressRange #586

Thiryn opened this issue Jan 23, 2025 · 0 comments · May be fixed by #587

Comments

@Thiryn
Copy link
Contributor

Thiryn commented Jan 23, 2025

Description

There are three issues with IPv6 support:

  • Address ranges can not parse fields with underscore correctly (ULA_PREFIX becomes ULAPREFIX as we're marshalling the go struct by field name as opposed to the XML fields here. Leading to the address range being created, but never read correctly, so the creation never completes.
  • Address ranges is setting ula_prefix to the global_prefix value here
  • VRouter NICs can not set static IPV6 IPs

Terraform and Provider version

Terraform v1.9.4
on darwin_arm64

  • provider registry.terraform.io/opennebula/opennebula v1.4.1

Affected resources and data sources

  • opennebula_virtual_network_address_range
  • opennebula_virtual_router_nic

Terraform configuration

Expected behavior

Setting an AR for IPv6 with SLAAC should work

resource "opennebula_virtual_network_address_range" "test5" {
	virtual_network_id = [some_network]
	ar_type            = "IP4_6"
	size               = 2
	ip4                = "172.16.100.240"
        ula_prefix 	   = "fd00:ffff:ffff::"
}

It does not because:

  • The ula_prefix field is not parsed correctly upon reading the field on create (see here)
  • The ula_prexix will always show as missing in the plan as currently it is set to global_prefix upon read (see here)

Setting Static IPV6 for Vrouter

Similarly to this issue, we should allow to set IPv6 static IPs via the vrouter nic

resource "opennebula_virtual_router_nic" "nic_floating_ip6_specified" {
    ip6               = "fd00:ffff:ffff::0"
    virtual_router_id = [some_vrouter]
    network_id        = [some_network]
}

Actual behavior

Creating a IP4_6 address range leads to the AR being created but terraform never acknowledge it so it keeps retrying (thus creating the AR many time).

Steps to Reproduce

See added tests in PR.

Debug output

No response

Panic output

No response

Important factoids

No response

References

No response

@Thiryn Thiryn linked a pull request Jan 23, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant