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

addons: vxlan: local-tunnelip can be an ipv6 #172

Closed
wants to merge 1 commit into from

Conversation

JackSlateur
Copy link
Contributor

iproute2 as well as the kernel supports vxlan over IPv6

Signed-off-by: Alexandre Bruyelles abruyelles@odiso.com

@julienfortin
Copy link
Contributor

Hi @JackSlateur

For this we would need a new attribute vxlan-local-tunnelip6, we don't want to reuse the same attribute for ipv6.
We are using netlink to configure vxlans, so it's important to use a different attribute to set the proper netlink attribute (I don't want to have things like if IPAddress(value).version == 6: set Link.IFLA_VXLAN_LOCAL6

See 4065833 where I added new ipv6 attributes (ideally we wouldn't duplicate existing code like i had to do, i was in a rush when i added those attributes).

Signed-off-by: Alexandre Bruyelles <abruyelles@odiso.com>
@JackSlateur
Copy link
Contributor Author

JackSlateur commented Aug 27, 2020

@julienfortin Indeed :)

I've reworked -and tested- the code, with a single user-facing parameter

Please note that #173 is required

Thank you for the review

Copy link
Contributor

@julienfortin julienfortin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JackSlateur, we still need to have a specific attribute for ipv6. We don't want to have both mixed-up within the same attribute.
I left some comments on your commit, basically the function __config_vxlan_local_tunnelip needs to be reworked a bit.

@@ -47,7 +47,7 @@ class vxlan(Addon, moduleBase):
},
"vxlan-local-tunnelip": {
"help": "vxlan local tunnel ip",
"validvals": ["<ipv4>"],
"validvals": ["<ipv4>, <ipv6>"],
"example": ["vxlan-local-tunnelip 172.16.20.103"]
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't add ipv6 to this attribute but add a new attribute vxlan-local-tunnelip6

@@ -393,7 +393,7 @@ def __config_vxlan_local_tunnelip(self, ifname, ifaceobj, link_exists, user_requ
if link_exists:
# on ifreload do not overwrite anycast_ip to individual ip
# if clagd has modified
running_localtunnelip = cached_vxlan_ifla_info_data.get(Link.IFLA_VXLAN_LOCAL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function __config_vxlan_local_tunnelip should be reworked so that it handles both vxlan-local-tunnelip and vxlan-local-tunnelip6.

It could take the NETLINK_ATTR id as parameter (Link.IFLA_VXLAN_LOCAL or Link.IFLA_VXLAN_LOCAL6), as well as the attribute name so that no other changes are needed (this is what i should have done for mcastgrp6).

@JackSlateur
Copy link
Contributor Author

Ok

I'm closing this, I'll possibly rework the code as you asked and reopen then

Thank you for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants