Page MenuHomeVyOS Platform

isisd and gre-bridge commit error
Closed, ResolvedPublicBUG

Description

Testing configuration:

set interfaces tunnel tun0 address '100.64.0.1/30'
set interfaces tunnel tun0 encapsulation 'gre-bridge'
set interfaces tunnel tun0 local-ip '203.0.113.1'
set interfaces tunnel tun0 remote-ip '203.0.113.2'
set protocols isis VyOS interface tun0
set protocols isis VyOS net 49.0001.0000.0011.0001.00

Commit:

[email protected]# commit
[ protocols isis VyOS ]
VyOS had an issue completing a command.

Report Time:      2021-07-28 13:42:24
Image Version:    VyOS 1.3.0-rc5
Release Train:    equuleus

Built by:         Sentrium S.L.
Built on:         Tue 29 Jun 2021 08:26 UTC
Build UUID:       36f7c218-6ebb-497f-9ec5-676241e5c13a
Build Commit ID:  892e8689b3234e

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    4484cf88-4c4c-4e04-9a81-f0cc5d5751bb

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_isis.py", line 165, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/protocols_isis.py", line 141, in apply
    frr_cfg.commit_configuration(daemon='isisd')
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 411, in commit_configuration
    reload_configuration('\n'.join(self.config), daemon=daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 186, in reload_configuration
    raise CommitError(f'Configuration FRR failed while commiting code: {repr(output)}')
vyos.frr.CommitError: Configuration FRR failed while commiting code: '% Configuration failed.\n\nError type: validation\nError description: Interface tun0 has MTU 1473, minimum MTU for the area is 1497\nline 4: Failure to communicate[13] to isisd, line:  ip router isis VyOS\n\n% Configuration failed.\n\nError type: validation\nError description: Interface tun0 has MTU 1473, minimum MTU for the area is 1497\nline 4: Failure to communicate[13] to isisd, line:  ip router isis VyOS\n\n% Configuration failed.\n\nError type: validation\nError description: Interface tun0 has MTU 1473, minimum MTU for the area is 1497\nline 9: Failure to communicate[13] to isisd, line:  ip router isis VyOS'



[[protocols isis VyOS]] failed
Commit failed

Details

Difficulty level
Normal (likely a few hours)
Version
1.3.0-rc5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from isisd and gre-bgidge commit error to isisd and gre-bridge commit error.Jul 28 2021, 10:52 AM

To reproduce in 1.4:

set interfaces tunnel tun0 address '100.64.0.1/30'
set interfaces tunnel tun0 encapsulation 'gretap'
set interfaces tunnel tun0 source-address  '203.0.113.1'
set interfaces tunnel tun0 remote '203.0.113.2'
set protocols isis interface tun0
set protocols isis net 49.0001.0000.0011.0001.00

commit fail:

[edit]
vyos@r1-roll# commit

Interface tun0 has MTU 1476, minimum area MTU is 1497!

[[protocols isis]] failed
Commit failed
[edit]

Changing lsp-mtu to 1476:

vyos@r1-roll# set protocols isis lsp-mtu 1476
[edit]
vyos@r1-roll# commit
[ protocols isis ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report Time:      2021-08-11 15:05:18
Image Version:    VyOS 1.4-rolling-202108101124
Release Train:    sagitta

Built by:         [email protected]
Built on:         Tue 10 Aug 2021 18:06 UTC
Build UUID:       5373ce0e-e4be-4bdb-864e-afeabed888ff
Build Commit ID:  dc5e42b9daa97a

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    08227416-e73c-46f1-984b-937def82b485

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_isis.py", line 245, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/protocols_isis.py", line 233, in apply
    frr_cfg.commit_configuration(isis_daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 458, in commit_configuration
    reload_configuration('\n'.join(self.config), daemon=daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 206, in reload_configuration
    raise CommitError('FRR configuration failed while running commit. Please ' \
vyos.frr.CommitError: FRR configuration failed while running commit. Please enable debugging to examine logs.

To enable debugging run: "touch /tmp/vyos.frr.debug" and "sudo systemctl stop vyos-configd"



[[protocols isis]] failed
Commit failed
[edit]
vyos@r1-roll#

Set lsp-mtu to 1473:

vyos@r1-roll# set protocols isis lsp-mtu 1473
[edit]
vyos@r1-roll# commit
[edit]
vyos@r1-roll#

Mtu for lsp should be at least 'interface mtu - 3'

Another bug.
From time to time I get errors in debug mode ("touch /tmp/vyos.frr.debug" and "sudo systemctl stop vyos-configd") when changing lsp-mtu size

vyos@r1-roll# set protocols isis lsp-mtu 1308
[edit]
vyos@r1-roll# commit
[ protocols isis ]

frr-reload output:  89 !
frr-reload output:  90 end
frr-reload output:  91 2021-08-12 14:31:26,439  INFO: Failed to execute router isis VyOS  no lsp-mtu 1300
frr-reload output:  92 2021-08-12 14:31:26,524  INFO: Failed to execute router isis VyOS  no lsp-mtu
frr-reload output:  93 2021-08-12 14:31:26,608  INFO: Failed to execute router isis VyOS  no
frr-reload output:  94 2021-08-12 14:31:26,609   ERROR: "router isis VyOS --  no" we failed to remove this command
frr-reload output:  95 2021-08-12 14:31:26,609   ERROR: % Configuration failed.
frr-reload output:  96 
frr-reload output:  97 Error type: validation
frr-reload output:  98 Error description: ISIS area contains circuit tun0, which has a maximum PDU size of 1473
frr-reload output:  99

But next commit without any errors

from vyos.xml import defaults doesn't work for 1.3 correctly, for some reason it gets 2 isis process with same name "FOO"
https://github.com/sever-sever/vyos-1x/commit/7b0a33618bfa1d1ef99b9744ed1ded49a2c832af

[email protected]# compare 
[edit protocols]
+isis FOO {
+    interface tun0 {
+    }
+    net 49.0001.0000.0011.0001.00
+}
[edit]
[email protected]# commit
[ protocols isis FOO ]
{'FOO': {'interface': {'tun0': {}}, 'net': '49.0001.0000.0011.0001.00'},
 'lsp_mtu': '1497'}
Only one isis process can be defined

[[protocols isis FOO]] failed
Commit failed
[edit]
[email protected]#

[email protected]# show protocols isis 
+isis FOO {
+    interface tun0 {
+    }
+    net 49.0001.0000.0011.0001.00
+}
[edit]
[email protected]#

So I can't find other solution, as hardcode default lsp_mtu value in python script

HI @Viacheslav, this works even in 1.3, your problem is that you need to merge it with isis['FOO'] and not isis.

We have had the exact same burdon in VyOS 1.4 where BGP still contained the ASN in the CLI path. See how I have done it in the past for BGP - you then can easily adjust this to your ISIS needs.

https://github.com/vyos/vyos-1x/blob/c106aead9e297f973e91c3ea5371790040c05de3/src/conf_mode/protocols_bgp.py#L65-L69

I guess this is what you need:

python
diff --git i/interface-definitions/protocols-isis.xml.in w/interface-definitions/protocols-isis.xml.in
index 624c72a4..fb2dbfd9 100644
--- i/interface-definitions/protocols-isis.xml.in
+++ w/interface-definitions/protocols-isis.xml.in
@@ -180,6 +180,7 @@
                 <validator name="numeric" argument="--range 128-4352"/>
               </constraint>
             </properties>
+            <defaultValue>1497</defaultValue>
           </leafNode>
           <leafNode name="lsp-refresh-interval">
             <properties>
diff --git i/src/conf_mode/protocols_isis.py w/src/conf_mode/protocols_isis.py
index da91f3b1..c71d11c8 100755
--- i/src/conf_mode/protocols_isis.py
+++ w/src/conf_mode/protocols_isis.py
@@ -20,11 +20,13 @@ from sys import exit

 from vyos.config import Config
 from vyos.configdict import node_changed
+from vyos.configdict import dict_merge
 from vyos import ConfigError
 from vyos.util import call
 from vyos.util import dict_search
 from vyos.template import render
 from vyos.template import render_to_string
+from vyos.xml import defaults
 from vyos import frr
 from vyos import airbag
 airbag.enable()
@@ -38,6 +40,13 @@ def get_config(config=None):

     isis = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)

+    # We have gathered the dict representation of the CLI, but there are default
+    # options which we need to update into the dictionary retrived.
+    default_values = defaults(base)
+    domain = next(iter(isis))
+    # Merge defaults into IS-IS dict
+    isis[domain] = dict_merge(default_values, isis[domain])
+
     return isis

 def verify(isis):
Viacheslav claimed this task.

1.3 fixed in T3779

SrividyaA set Issue type to Bug (incorrect behavior).Sep 1 2021, 10:39 AM