Page MenuHomeVyOS Platform

Static IPv6 route with blackhole fails
Closed, ResolvedPublicBUG

Description

Report from the forum
To reproduce

set protocol static route6 2a00:1000:1::1/128 next-hop 2a00:1000:2000::11
set protocol static route6 2a0b:1000::/32 blackhole
commit

Commit:

[ protocols static ]
VyOS had an issue completing a command.


Report time:      2023-04-26 18:32:21
Image version:    VyOS 1.4-rolling-202304261027
Release train:    current

Built by:         [email protected]
Built on:         Wed 26 Apr 2023 10:27 UTC
Build UUID:       6dee870f-c04e-4282-a551-41db656e6a26
Build commit ID:  25cf22e2ebcf2f

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:    4d6f4d29-1ae8-446f-8d2b-3decd9da64c7

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_static.py", line 128, in <module>
    c = get_config()
        ^^^^^^^^^^^^
  File "/usr/libexec/vyos/conf_mode/protocols_static.py", line 41, in get_config
    conf = Config()
           ^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 85, in __init__
    self._config_source = ConfigSourceSession(session_env)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configsource.py", line 145, in __init__
    self._session_config = ConfigTree(session_config_text)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 143, in __init__
    raise ValueError("Failed to parse config: {0}".format(msg))
ValueError: Failed to parse config: internal indexing error



[[protocols static]] failed
Commit failed
Traceback (most recent call last):
  File "/etc/commit/post-hooks.d/01vyos-commit-revision", line 33, in <module>
    sys.exit(load_entry_point('vyos==1.3.0', 'console_scripts', 'config-mgmt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 608, in run
    config_mgmt = ConfigMgmt()
                  ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 70, in __init__
    config = Config()
             ^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 85, in __init__
    self._config_source = ConfigSourceSession(session_env)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configsource.py", line 145, in __init__
    self._session_config = ConfigTree(session_config_text)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 143, in __init__
    raise ValueError("Failed to parse config: {0}".format(msg))
ValueError: Failed to parse config: internal indexing error
run-parts: /etc/commit/post-hooks.d/01vyos-commit-revision exited with return code 1
[edit]
vyos@r14#

Trying to compare:

vyos@r14# compare 
Traceback (most recent call last):
  File "/usr/bin/config-mgmt", line 33, in <module>
    sys.exit(load_entry_point('vyos==1.3.0', 'console_scripts', 'config-mgmt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 608, in run
    config_mgmt = ConfigMgmt()
                  ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 70, in __init__
    config = Config()
             ^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 85, in __init__
    self._config_source = ConfigSourceSession(session_env)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configsource.py", line 145, in __init__
    self._session_config = ConfigTree(session_config_text)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 143, in __init__
    raise ValueError("Failed to parse config: {0}".format(msg))
ValueError: Failed to parse config: internal indexing error
[edit]
vyos@r14#

Details

Version
VyOS 1.4-rolling-202304261027
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

Event Timeline

Viacheslav updated the task description. (Show Details)
Viacheslav updated the task description. (Show Details)
jestabro triaged this task as Urgent! priority.Apr 26 2023, 4:33 PM
jestabro changed the task status from Open to In progress.EditedApr 26 2023, 5:38 PM

This is a simple bug in the recently introduced configtree node name comparison function; fixed and should be in next rolling.

Merged and repos updated, so this will be in the next nightly build. Note that for a local build, one will need an updated Docker image for the update to vyos1x-config.

Dear Jestabro,
i built an updated docker image and a new ISO, i do confirm now IPv6 is working correctly.

I will get back to you soon with some other unrelated issues i'm trying to pinpoint ;-)

Thanks again,
oTo

jestabro moved this task from Open to Finished on the VyOS 1.4 Sagitta board.