]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: stop frr-reload.py from trying to delete the vrf context 3485/head
authorDon Slice <dslice@cumulusnetworks.com>
Fri, 14 Dec 2018 13:11:05 +0000 (13:11 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Fri, 14 Dec 2018 13:11:05 +0000 (13:11 +0000)
Problem seen when removing last config item under the vrf context,
where frr-reload.py tries instead to delete the vrf context itself.
Since that is not permitted on an active vrf, the command errors
out and nothing is deleted.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
tools/frr-reload.py

index 3b41b57d682e4d2f218e1c6ac32fdca2a068ad9c..c48c8b97ad07b46e19ba12d405a04efe87b49038 100755 (executable)
@@ -974,8 +974,8 @@ def compare_context_objects(newconf, running):
                 delete_bgpd = True
                 lines_to_del.append((running_ctx_keys, None))
 
-            # We cannot do 'no interface' in FRR, and so deal with it
-            elif running_ctx_keys[0].startswith('interface'):
+            # We cannot do 'no interface' or 'no vrf' in FRR, and so deal with it
+            elif running_ctx_keys[0].startswith('interface') or running_ctx_keys[0].startswith('vrf'):
                 for line in running_ctx.lines:
                     lines_to_del.append((running_ctx_keys, line))