Skip to content

Commit

Permalink
ospf: T6747: fix deferred shutdown handling
Browse files Browse the repository at this point in the history
Honor ospfd deferred shutdown when "max-metric router-lsa on-shutdown" is
defined.

FRRouting/frr#17011
  • Loading branch information
c-po committed Dec 2, 2024
1 parent 5276e1b commit a8faf70
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions smoketest/scripts/cli/test_protocols_ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import unittest
import time

from time import sleep
from base_vyostest_shim import VyOSUnitTestSHIM

from vyos.configsession import ConfigSessionError
Expand Down Expand Up @@ -226,6 +226,13 @@ def test_ospf_05_options(self):
frrconfig = self.getFRRconfig('router ospf', daemon=PROCESS_NAME)
self.assertIn(f' distance ospf intra-area {intra_area} inter-area {inter_area} external {external}', frrconfig)

# https://github.com/FRRouting/frr/issues/17011
# We need to wait on_shutdown time, until the OSPF process is removed from the CLI
# otherwise the test in tearDown() will fail
self.cli_delete(base_path)
self.cli_commit()

sleep(int(on_shutdown) + 5) # additional grace period of 5 seconds

def test_ospf_06_neighbor(self):
priority = '10'
Expand Down Expand Up @@ -572,7 +579,7 @@ def test_ospf_17_duplicate_area_network(self):
print(f"Attempt {retry_count}: FRR config is still empty. Retrying...")

retry_count += 1
time.sleep(1)
sleep(1)
frrconfig = self.getFRRconfig('router ospf', daemon=PROCESS_NAME)

if not frrconfig:
Expand Down

0 comments on commit a8faf70

Please sign in to comment.