Avoid duplicate runs of MTU validator
This commit is contained in:
parent
ebdea165f1
commit
56021c443a
|
@ -77,14 +77,8 @@ class VXNetworkInstance(object):
|
||||||
def init_bridged(self):
|
def init_bridged(self):
|
||||||
self.old_description = None
|
self.old_description = None
|
||||||
self.description = None
|
self.description = None
|
||||||
|
|
||||||
try:
|
|
||||||
self.vx_mtu = self.zkhandler.read(('network.mtu', self.vni))
|
|
||||||
except Exception:
|
|
||||||
self.vx_mtu = None
|
self.vx_mtu = None
|
||||||
|
|
||||||
self.validateNetworkMTU()
|
|
||||||
|
|
||||||
# Zookeper handlers for changed states
|
# Zookeper handlers for changed states
|
||||||
@self.zkhandler.zk_conn.DataWatch(self.zkhandler.schema.path('network', self.vni))
|
@self.zkhandler.zk_conn.DataWatch(self.zkhandler.schema.path('network', self.vni))
|
||||||
def watch_network_description(data, stat, event=''):
|
def watch_network_description(data, stat, event=''):
|
||||||
|
@ -111,7 +105,8 @@ class VXNetworkInstance(object):
|
||||||
self.validateNetworkMTU()
|
self.validateNetworkMTU()
|
||||||
self.updateNetworkMTU()
|
self.updateNetworkMTU()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
self.validateNetworkMTU()
|
||||||
|
self.updateNetworkMTU()
|
||||||
|
|
||||||
self.createNetworkBridged()
|
self.createNetworkBridged()
|
||||||
|
|
||||||
|
@ -131,14 +126,8 @@ class VXNetworkInstance(object):
|
||||||
self.dhcp4_flag = self.zkhandler.read(('network.ip4.dhcp', self.vni))
|
self.dhcp4_flag = self.zkhandler.read(('network.ip4.dhcp', self.vni))
|
||||||
self.dhcp4_start = self.zkhandler.read(('network.ip4.dhcp_start', self.vni))
|
self.dhcp4_start = self.zkhandler.read(('network.ip4.dhcp_start', self.vni))
|
||||||
self.dhcp4_end = self.zkhandler.read(('network.ip4.dhcp_end', self.vni))
|
self.dhcp4_end = self.zkhandler.read(('network.ip4.dhcp_end', self.vni))
|
||||||
|
|
||||||
try:
|
|
||||||
self.vx_mtu = self.zkhandler.read(('network.mtu', self.vni))
|
|
||||||
except Exception:
|
|
||||||
self.vx_mtu = None
|
self.vx_mtu = None
|
||||||
|
|
||||||
self.validateNetworkMTU()
|
|
||||||
|
|
||||||
self.nftables_netconf_filename = '{}/networks/{}.nft'.format(self.config['nft_dynamic_directory'], self.vni)
|
self.nftables_netconf_filename = '{}/networks/{}.nft'.format(self.config['nft_dynamic_directory'], self.vni)
|
||||||
self.firewall_rules = []
|
self.firewall_rules = []
|
||||||
|
|
||||||
|
@ -257,7 +246,8 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
|
||||||
self.validateNetworkMTU()
|
self.validateNetworkMTU()
|
||||||
self.updateNetworkMTU()
|
self.updateNetworkMTU()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
self.validateNetworkMTU()
|
||||||
|
self.updateNetworkMTU()
|
||||||
|
|
||||||
@self.zkhandler.zk_conn.DataWatch(self.zkhandler.schema.path('network.ip6.network', self.vni))
|
@self.zkhandler.zk_conn.DataWatch(self.zkhandler.schema.path('network.ip6.network', self.vni))
|
||||||
def watch_network_ip6_network(data, stat, event=''):
|
def watch_network_ip6_network(data, stat, event=''):
|
||||||
|
|
Loading…
Reference in New Issue