Page MenuHomeVyOS Platform

Trying to create a VRF named "vni" leads to an unhandled exception
Closed, ResolvedPublicBUG

Description

vyos@vyos# set vrf name vni table 100
[edit]
vyos@vyos# commit
[ vrf ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 146, in run_script
    script.apply(c)
  File "/usr/libexec/vyos//conf_mode/vrf.py", line 317, in apply
    cmd(f'nft {nft_add_element}')
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 189, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: None nft add element inet vrf_zones ct_iface_map { "vni" : 100 }
returned: 
exit code: 1

[[vrf]] failed
Commit failed

Details

Version
1.4.2
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav triaged this task as Normal priority.Jun 12 2025, 1:05 PM
$ sudo nft add element inet vrf_zones ct_somethingelse_map { "vni" : 100 }
Error: syntax error, unexpected vni
add element inet vrf_zones ct_somethingelse1_map { vni : 100 }
                                                   ^^^

$ sudo nft add element inet vrf_zones ct_somethingelse_map { \"vni\" : 100 }
$

There's likely other keyword collisions, but should be easy enough to escape - will whip up a PR.

Edit: Raised PR https://github.com/vyos/vyos-1x/pull/4581

dmbaturin claimed this task.
dmbaturin edited projects, added VyOS 1.4 Sagitta (1.4.3); removed VyOS 1.4 Sagitta.
dmbaturin moved this task from Open to Finished on the VyOS 1.5 Circinus (1.5-stream-2025-Q2) board.
dmbaturin moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.3) board.
dmbaturin moved this task from Need Triage to Completed on the VyOS Rolling board.