Skip to content

bgp: option "graceful-restart" causes frr-reload.py to return non zero exit code #8403

Closed
@c-po

Description

@c-po

Describe the bug

When reloading the FRR configuration and bgp graceful-restart option is set, the /usr/lib/frr/frr-reload.py script returns with 1 but the configuration is applied properly into FRR - this makes scripts processing the return code fail.

  • Did you check if this is a duplicate issue?
  • Did you test it on the latest FRRouting/frr master branch?

To Reproduce

1.txt

!
frr version 7.5.1-20210401-04-g3d506af6a
frr defaults traditional
hostname LR1.wue3
log syslog
log facility local7
agentx
service integrated-vtysh-config
!
router bgp 100
 no bgp ebgp-requires-policy
 bgp graceful-restart
 no bgp network import-check
 neighbor DAL13 peer-group
 neighbor DAL13 remote-as 200
 neighbor DAL13 ebgp-multihop 2
 neighbor DAL13 update-source dum0
 neighbor 192.168.253.6 peer-group DAL13
 !
 address-family ipv4 unicast
  neighbor DAL13 soft-reconfiguration inbound
 exit-address-family
!
line vty
!
end

2.txt

!
frr version 7.5.1-20210401-04-g3d506af6a
frr defaults traditional
hostname LR1.wue3
log syslog
log facility local7
agentx
service integrated-vtysh-config
!
line vty
!
end

Now you can toggle between 1.txt and 2.txt, while loading 1.txt triggers the error

root@vyos:/home/vyos# /usr/lib/frr/frr-reload.py --reload --debug --daemon bgpd --stdout 1.txt
root@vyos:/home/vyos# echo $?
1
root@vyos:/home/vyos# /usr/lib/frr/frr-reload.py --reload --debug --daemon bgpd --stdout 2.txt
root@vyos:/home/vyos# echo $?
0

Even when frr-reload exists 1, the configuration is applied.

vyos@vyos:~$ vtysh -c "show run"
Building configuration...

Current configuration:
!
frr version 7.5.1-20210401-04-g3d506af6a
frr defaults traditional
hostname LR1.wue3
log syslog
log facility local7
agentx
service integrated-vtysh-config
!
router bgp 100
 no bgp ebgp-requires-policy
 bgp graceful-restart
 no bgp network import-check
 neighbor DAL13 peer-group
 neighbor DAL13 remote-as 200
 neighbor DAL13 ebgp-multihop 2
 neighbor DAL13 update-source dum0
 neighbor 192.168.253.6 peer-group DAL13
 !
 address-family ipv4 unicast
  neighbor DAL13 soft-reconfiguration inbound
 exit-address-family
!
line vty
!
end

Expected behavior

  • do not return a non zero exit code
  • do not apply the configuration if 1 is returned
    I would like to go with option 1, as it feels the rc=1 is triggered by Graceful restart configuration changed, reset all peers to take effect - so this is something the user should do afterwards

Screenshots

Versions

  • OS Version: Debian 10
  • Kernel: 5.10.27
  • FRR Version: 7.5.1-20210401-04-g3d506af6a

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions