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

Support ygg adderesses in containers #1201

Merged
merged 5 commits into from
Feb 26, 2021
Merged

Conversation

muhamadazmy
Copy link
Member

No description provided.

@@ -285,7 +286,7 @@ func (n networker) ZDBPrepare(hw net.HardwareAddr) (string, error) {

}

return netNSName, n.createMacVlan(ZDBIface, hw, ips, routes, netNs)
return netNSName, n.createMacVlan(ZDBIface, types.YggBridge, hw, ips, routes, netNs)
Copy link
Contributor

Choose a reason for hiding this comment

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

The yggdrasil macvlan for zdbs should be installed next to the already existing macvlan, not replace it

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, so zdb will has both as well. right. This means we need another interface in the zdb container ?

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed, everything with ygg IP will have a dedicated interface for that. Later when a vm can have an ygg IP, it will also create a dedicated tap iface on the ygg bridge next to the existing ones. That way traffic flow is nicely separated.

func (n networker) ZDBPrepare(hw net.HardwareAddr) (string, error) {
func (n networker) ZDBPrepare(id string) (string, error) {

hw := ifaceutil.HardwareAddrFromInputBytes([]byte("pub:" + id))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the "pub:" prefix should not be here, so the input is the same as it was previously for this iface. Otherwise, if a node has a zdb running and reboots after this update, it will generate a new mac address, resulting in a different ip6 from slaac, which will mean the ipv6 originally returned in the result (which is probably used) is not valid anymore

@muhamadazmy
Copy link
Member Author

muhamadazmy commented Feb 25, 2021 via email

@LeeSmet
Copy link
Contributor

LeeSmet commented Feb 25, 2021

Hmm yes, if we only use it for grid3 that makes sense. Looks good, but CI errors

@muhamadazmy muhamadazmy merged commit 4d928d7 into master-3 Feb 26, 2021
@muhamadazmy muhamadazmy deleted the zos3/ygg-ip-in-containers branch February 26, 2021 07:43
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