Page MenuHomeVyOS Platform

policy route cannot have several entries with the same table
Closed, ResolvedPublicBUG

Description

When trying to set several policy rules that have the same table, commit fails, I have solved it temporarily by duplicating table 1 to table 11. Possibly related to #T4213

# set policy route src-route rule 1003 set table 1
[edit]
# commit

- and include all the information presented below

Report time:      2022-01-31 17:34:54
Image version:    VyOS 1.4-rolling-202201291849
Release train:    sagitta

Built by:         [email protected]
Built on:         Sat 29 Jan 2022 18:49 UTC
Build UUID:       6fd7a21e-65e2-41b6-a681-cd14502ad976
Build commit ID:  638f92941ba4f1

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:    88891583-d199-4250-8358-a403f928d037

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 250, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 241, in apply
    apply_table_marks(policy)
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 217, in apply_table_marks
    cmd(f'{cmd_str} rule add pref {set_table} fwmark {table_mark} table {set_table}')
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip rule add pref 1 fwmark 2147483646 table 1
returned:
exit code: 2

noteworthy:
cmd 'ip rule add pref 1 fwmark 2147483646 table 1'
returned (out):

returned (err):
RTNETLINK answers: File exists

[[policy route src-route]] failed
Commit failed
[edit]
# set policy route src-route rule 1003 set table 11
[edit]
# commit
#

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.4-rolling-202201291849-amd64.iso
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

sarthurdev changed the task status from Open to In progress.Jan 31 2022, 4:47 PM
sarthurdev claimed this task.
sarthurdev added a subscriber: sarthurdev.

I already have a fix for this from your comment on T4213. Will have it included in a PR shortly.