Bug 2215579

Summary: Duplicated prefix lists when no seq is specified
Product: Red Hat Enterprise Linux 8 Reporter: Federico Paolinelli <fpaoline>
Component: frrAssignee: Michal Ruprich <mruprich>
Status: ASSIGNED --- QA Contact: FrantiĊĦek Hrdina <fhrdina>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.4CC: fhrdina
Target Milestone: rcKeywords: Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Federico Paolinelli 2023-06-16 15:20:13 UTC
Description of problem:

When creating a configuration with multiple prefix lists, without specifying the seq number and we load the file with the frr-reload.py script, the prefix lists are duplicated. We don't have a case but this was noted by a user.

Version-Release number of selected component (if applicable):

frr-7.5-4.el8_4.2.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Start with an empty frr.conf, then load


og file /etc/frr/frr.log informational
log timestamp precision 3
hostname kind-worker2
ip nht resolve-via-default
ipv6 nht resolve-via-default
route-map 172.18.0.5-in deny 20


ip prefix-list 172.18.0.5-pl-ipv4 permit 192.168.10.1/32


ip prefix-list 172.18.0.5-pl-ipv4 permit 192.168.10.3/32


ip prefix-list 172.18.0.5-pl-ipv4 permit 192.168.10.0/32


ip prefix-list 172.18.0.5-pl-ipv4 permit 192.168.10.2/32

ip prefix-list 172.18.0.5-pl-ipv4 deny any
ipv6 prefix-list 172.18.0.5-pl-ipv4 deny any

route-map 172.18.0.5-out permit 7
  match ip address prefix-list 172.18.0.5-pl-ipv4
route-map 172.18.0.5-out permit 8
  match ipv6 address prefix-list 172.18.0.5-pl-ipv4
route-map 172.18.0.6-in deny 20


ip prefix-list 172.18.0.6-pl-ipv4 permit 192.168.10.1/32


ip prefix-list 172.18.0.6-pl-ipv4 permit 192.168.10.3/32


ip prefix-list 172.18.0.6-pl-ipv4 permit 192.168.10.0/32


ip prefix-list 172.18.0.6-pl-ipv4 permit 192.168.10.2/32

ip prefix-list 172.18.0.6-pl-ipv4 deny any
ipv6 prefix-list 172.18.0.6-pl-ipv4 deny any

route-map 172.18.0.6-out permit 7
  match ip address prefix-list 172.18.0.6-pl-ipv4
route-map 172.18.0.6-out permit 8
  match ipv6 address prefix-list 172.18.0.6-pl-ipv4

router bgp 64512
  no bgp ebgp-requires-policy
  no bgp network import-check
  no bgp default ipv4-unicast

  neighbor 172.18.0.5 remote-as 64512
  neighbor 172.18.0.5 port 179
  neighbor 172.18.0.5 timers 30 90


  neighbor 172.18.0.6 remote-as 64512
  neighbor 172.18.0.6 port 179
  neighbor 172.18.0.6 timers 30 90



  address-family ipv4 unicast
    neighbor 172.18.0.5 activate
    neighbor 172.18.0.5 route-map 172.18.0.5-in in
    neighbor 172.18.0.5 route-map 172.18.0.5-out out
  exit-address-family
  address-family ipv6 unicast
    neighbor 172.18.0.5 activate
    neighbor 172.18.0.5 route-map 172.18.0.5-in in
    neighbor 172.18.0.5 route-map 172.18.0.5-out out
  exit-address-family

  address-family ipv4 unicast
    neighbor 172.18.0.6 activate
    neighbor 172.18.0.6 route-map 172.18.0.6-in in
    neighbor 172.18.0.6 route-map 172.18.0.6-out out
  exit-address-family
  address-family ipv6 unicast
    neighbor 172.18.0.6 activate
    neighbor 172.18.0.6 route-map 172.18.0.6-in in
    neighbor 172.18.0.6 route-map 172.18.0.6-out out
  exit-address-family
  address-family ipv4 unicast
    network 192.168.10.0/32
    network 192.168.10.1/32
    network 192.168.10.2/32
    network 192.168.10.3/32
  exit-address-family


2.
3.

Actual results:
3 occurrences of each prefix list, when running vtysh show running-conf

ip prefix-list 172.18.0.5-pl-ipv4 seq 5 permit 192.168.10.1/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 10 permit 192.168.10.3/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 15 permit 192.168.10.0/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 20 permit 192.168.10.2/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 25 deny any
ip prefix-list 172.18.0.5-pl-ipv4 seq 30 permit 192.168.10.1/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 35 permit 192.168.10.3/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 40 permit 192.168.10.0/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 45 permit 192.168.10.2/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 50 deny any
ip prefix-list 172.18.0.5-pl-ipv4 seq 55 permit 192.168.10.1/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 60 permit 192.168.10.3/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 65 permit 192.168.10.0/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 70 permit 192.168.10.2/32
ip prefix-list 172.18.0.5-pl-ipv4 seq 75 deny any



Expected results:

Only one occurrency per entry

Additional info:

Comment 1 Michal Ruprich 2023-06-27 11:20:18 UTC
Hi Federico,

I see this happening on older RHEL8s, the frr-7.5.1 that is available from RHEL-8.7.0 is not affected (I did not yet find an actual commit that would tell me that this was fixed but the behavior is ok on later RHEL8s). Do you have access to newer FRR or is OCP not going to have any more rebases in RHEL8?

Regards,
Michal

Comment 2 Federico Paolinelli 2023-06-28 10:18:26 UTC
From what I see here https://docs.google.com/spreadsheets/d/1VO00pWkWf8Fr30PHl8mZFTK9ZnJO51BGXH4FT6efwp4/edit#gid=1551125754 older versions of ocp are tied to a given version of RHEL (in particular, the oldest we get is 4.10 which is based on 8.4) and that won't change.

Now that I see it, I also need to understand why I am getting a 8.4 rpm on 4.12, which is supposed to be 8.6