Page MenuHomeVyOS Platform

ldpd neighbour template errors
Closed, ResolvedPublicBUG

Description

The ldpd template has some errors in the section configuring neighbours:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_mpls.py", line 144, in <module>
    generate(c)
  File "/usr/libexec/vyos/conf_mode/protocols_mpls.py", line 76, in generate
    mpls['frr_ldpd_config'] = render_to_string('frr/ldpd.frr.j2', mpls)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/template.py", line 111, in render_to_string
    rendered = template.render(content)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/share/vyos/templates/frr/ldpd.frr.j2", line 17, in top-level template code
    {%         for neighbor, neighbor_config in ldp.neighbor %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)

I observed this on a fresh build of the sagitta branch, but the bug is also present on current.

Details

Difficulty level
Easy (less than an hour)
Version
1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to Needs testing.Oct 14 2023, 7:32 AM

after merge this ldp bug fixed , I saw that now it's already working . Could you check it ? I've tested on a lab and it seems to work :

vyos@vyos# run show version
Version:          VyOS 1.5-rolling-202311060023
Release train:    current

Built by:         [email protected]
Built on:         Mon 06 Nov 2023 01:44 UTC
Build UUID:       f6fd8df2-7037-43a4-af1b-dccff2ebebde
Build commit ID:  74b06c308bb631

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

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    e8efca04-b3c4-4e51-9e95-fffffc477abe

Copyright:        VyOS maintainers and contributors
[edit]
vyos@vyos# run show configuration commands | match mpls
set protocols mpls ldp discovery transport-ipv4-address '172.16.50.44'
set protocols mpls ldp interface 'eth1'
set protocols mpls ldp neighbor 1.1.1.1 password 'test01'
set protocols mpls ldp neighbor 1.1.1.1 session-holdtime '300'
set protocols mpls ldp neighbor 1.1.1.1 ttl-security '30'
set protocols mpls ldp router-id '172.16.50.44'
set protocols mpls ldp targeted-neighbor ipv4 address '1.1.1.1'

It's fixed in 1.5-rolling-202311060023 but the bug is still present in 1.4.

tested on 1.4-rolling-202311080309

vyos@vyos:~$ show version
Version:          VyOS 1.4-rolling-202311080309
Release train:    sagitta

Built by:         [email protected]
Built on:         Wed 08 Nov 2023 03:09 UTC
Build UUID:       b7e2acdd-77bc-45f9-8415-d1e49f3da063
Build commit ID:  987bbc8be52abc

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

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    e8efca04-b3c4-4e51-9e95-fffffc477abe

Copyright:        VyOS maintainers and contributors
vyos@vyos:~$ show configuration commands | mna

vyos@vyos:~$ show configuration commands | match mpls
set protocols mpls ldp discovery transport-ipv4-address '172.16.50.44'
set protocols mpls ldp interface 'eth1'
set protocols mpls ldp neighbor 1.1.1.1 password 'test01'
set protocols mpls ldp neighbor 1.1.1.1 session-holdtime '300'
set protocols mpls ldp neighbor 1.1.1.1 ttl-security '30'
set protocols mpls ldp router-id '172.16.50.44'
set protocols mpls ldp targeted-neighbor ipv4 address '1.1.1.1'