daemon: revamp to align gre tunnels for distributed to align with changes, also moved gre tunnels for wired links to occur directly when linking, allowing runtime distributed functionality, also updates to phyical node to leverage a core node, but avoid using namespacing

This commit is contained in:
Blake Harnden 2022-03-18 12:31:04 -07:00
parent 8c24e9cfa6
commit b71272519d
5 changed files with 113 additions and 201 deletions

View file

@ -776,8 +776,9 @@ class CoreNode(CoreNodeBase):
iface.flow_id = self.node_net_client.get_ifindex(iface.name)
logger.debug("interface flow index: %s - %s", iface.name, iface.flow_id)
# set mac address
self.node_net_client.device_mac(iface.name, str(iface.mac))
logger.debug("interface mac: %s - %s", iface.name, iface.mac)
if iface.mac:
self.node_net_client.device_mac(iface.name, str(iface.mac))
logger.debug("interface mac: %s - %s", iface.name, iface.mac)
# set all addresses
for ip in iface.ips():
# ipv4 check
@ -827,10 +828,10 @@ class CoreNetworkBase(NodeBase):
:param iface: network interface to attach
:return: nothing
"""
i = self.next_iface_id()
self.ifaces[i] = iface
iface_id = self.next_iface_id()
self.ifaces[iface_id] = iface
iface.net = self
iface.net_id = i
iface.net_id = iface_id
with self.linked_lock:
self.linked[iface] = {}