Browse Source

Don't raise FileNotFoundError during disabling keepalived

In case when keepalived's config is not existing already, there is no
need to raise any exception while L3 agent is trying to clean this
config.

Change-Id: I9ec81ad0c10379294d3145c5902e8b81b65c0221
Closes-Bug: #1892866
(cherry picked from commit a08893368a)
changes/60/748960/1
Slawek Kaplonski 11 months ago
parent
commit
5656f3cc89
  1. 5
      neutron/agent/l3/ha_router.py

5
neutron/agent/l3/ha_router.py

@ -197,7 +197,10 @@ class HaRouter(router.RouterInfo):
return
self.keepalived_manager.disable()
conf_dir = self.keepalived_manager.get_conf_dir()
shutil.rmtree(conf_dir)
try:
shutil.rmtree(conf_dir)
except FileNotFoundError:
pass
def _get_keepalived_instance(self):
return self.keepalived_manager.config.get_instance(self.ha_vr_id)

Loading…
Cancel
Save