Restart ivs/nvfswitch after config file is updated
This change - https://review.openstack.org/#/c/561609/, removed the restart of ivs/nvfswitch to avoid network interruptions. However, when a change is made to the config file then ivs/nvfswitch must be restarted in order to pick up the change. Closes-Bug: #1794182 Change-Id: I8f879072799cef29c09ddc74bd71069dd168ec88
This commit is contained in:
parent
05b47339a2
commit
2495c9ddaa
|
@ -1110,13 +1110,21 @@ class IfcfgNetConfig(os_net_config.NetConfig):
|
||||||
if ivs_uplinks or ivs_interfaces:
|
if ivs_uplinks or ivs_interfaces:
|
||||||
location = ivs_config_path()
|
location = ivs_config_path()
|
||||||
data = self.generate_ivs_config(ivs_uplinks, ivs_interfaces)
|
data = self.generate_ivs_config(ivs_uplinks, ivs_interfaces)
|
||||||
self.write_config(location, data)
|
if (utils.diff(location, data)):
|
||||||
|
self.write_config(location, data)
|
||||||
|
msg = "Restart ivs"
|
||||||
|
self.execute(msg, '/usr/bin/systemctl',
|
||||||
|
'restart', 'ivs')
|
||||||
|
|
||||||
if nfvswitch_interfaces or nfvswitch_internal_ifaces:
|
if nfvswitch_interfaces or nfvswitch_internal_ifaces:
|
||||||
location = nfvswitch_config_path()
|
location = nfvswitch_config_path()
|
||||||
data = self.generate_nfvswitch_config(nfvswitch_interfaces,
|
data = self.generate_nfvswitch_config(nfvswitch_interfaces,
|
||||||
nfvswitch_internal_ifaces)
|
nfvswitch_internal_ifaces)
|
||||||
self.write_config(location, data)
|
if (utils.diff(location, data)):
|
||||||
|
self.write_config(location, data)
|
||||||
|
msg = "Restart nfvswitch"
|
||||||
|
self.execute(msg, '/usr/bin/systemctl',
|
||||||
|
'restart', 'nfvswitch')
|
||||||
|
|
||||||
if activate:
|
if activate:
|
||||||
for linux_team in restart_linux_teams:
|
for linux_team in restart_linux_teams:
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- When the ivs interface (or nfvswitch) configuration changes,
|
||||||
|
ivs (or nvfswitch) needs to be restarted in order to pick
|
||||||
|
up the new configuration.
|
Loading…
Reference in New Issue