Page MenuHomeVyOS Platform

[1.3.5 -> 1.4.0-RC1 Migration] as-path-list Entries Get Messed Up
Open, HighPublicBUG

Description

I'm not quite sure how to describe this other than during migration, somehow as-path-list entries get random escape characters added. I've seen this before, but I can't remember where. Here are the original entries, taken running 1.3.5:

image.png (430×553 px, 41 KB)

Here's after moving to 1.4-RC1:

image.png (194×484 px, 98 KB)

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rc1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

It looks like what this should be converted to is as follows:

trae@cr01b-vyos# show as-path-list 
 as-path-list DAL10 {
     rule 10 {
         action permit
         description "Allow anything from or via DAL10"
>        regex 4242420668_$
     }
 }
 as-path-list IBM {
     rule 10 {
         action permit
         description "Allow anything directly from IBM Cloud"
>        regex ^_42424206(68|70)_$
     }
 }
 as-path-list INT {
     rule 10 {
         action permit
         description "Allow anything from or via int"
>        regex 4242420666_$
     }
 }

It looks like with VyOS 1.3, one way to match AS path (or at least, the way I did it) was to use an escaped parenthesis [\)], but in 1.4+ it appears this way no longer works, and instead those escapes should probably be converted to underscores (_).

To reproduce, we can use the interface description
1.3.5 in config file we see \\

vyos@r1# set interfaces ethernet eth1 description 'WAN\interface'
[edit]
vyos@r1# set interfaces ethernet eth0 description 'WAN\interface'
[edit]
vyos@r1# set interfaces ethernet eth1 description 'My\LAN interface|for lan | network'
[edit]
vyos@r1# compare 
[edit interfaces ethernet eth0]
>description WAN\interface
[edit interfaces ethernet eth1]
+description "My\LAN interface|for lan | network"
[edit]
vyos@r1# commit
[edit]
vyos@r1# save
Saving configuration to '/config/config.boot'...
Done
[edit]
vyos@r1# run show conf com | match desc
set interfaces ethernet eth0 description 'WAN\\\\interface'
set interfaces ethernet eth1 description 'My\\LAN interface|for lan | network'
[edit]
vyos@r1#

After update to 1.4-rc1+

vyos@r1:~$ show conf com | match desc
set interfaces ethernet eth0 description 'WAN\\\\\\\\interface'
set interfaces ethernet eth1 description 'My\\LAN interface|for lan | network'
vyos@r1:~$
This comment was removed by jestabro.

A general summary of the issue and proposed solution to avoid for future migrations has been added to subtask T5996, however even when implemented for 1.4 it will control, but not avoid, the problem when migrating from 1.3 --- short story: this is an incompatibility between the legacy and modern parser, and a need to refine the approach towards compatibility.

My understanding is that, as I read it, a workaround for the specific migration error is available; if not please let us know. On the plus side, this exposes an issue that has been present, in a minor form, throughout the 1.3 series, and has a solution going forward.

If the fix in T5996 is backported for release in 1.4-rcX/epa (I consider this an open question, pending discussion) then a simple workaround can be provided.