Add test for RHEL-68432
/Regression/gracefull-restart
This commit is contained in:
parent
b03ecd4835
commit
91d4463c86
4 changed files with 174 additions and 0 deletions
81
Regression/gracefull-restart/daemons
Normal file
81
Regression/gracefull-restart/daemons
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# This file tells the frr package which daemons to start.
|
||||
#
|
||||
# Sample configurations for these daemons can be found in
|
||||
# /usr/share/doc/frr/examples/.
|
||||
#
|
||||
# ATTENTION:
|
||||
#
|
||||
# When activating a daemon for the first time, a config file, even if it is
|
||||
# empty, has to be present *and* be owned by the user and group "frr", else
|
||||
# the daemon will not be started by /etc/init.d/frr. The permissions should
|
||||
# be u=rw,g=r,o=.
|
||||
# When using "vtysh" such a config file is also needed. It should be owned by
|
||||
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
|
||||
#
|
||||
# The watchfrr, zebra and staticd daemons are always started.
|
||||
#
|
||||
bgpd=yes
|
||||
ospfd=no
|
||||
ospf6d=no
|
||||
ripd=no
|
||||
ripngd=no
|
||||
isisd=no
|
||||
pimd=no
|
||||
nhrpd=no
|
||||
eigrpd=no
|
||||
sharpd=no
|
||||
pbrd=no
|
||||
bfdd=no
|
||||
fabricd=no
|
||||
vrrpd=no
|
||||
|
||||
#
|
||||
# If this option is set the /etc/init.d/frr script automatically loads
|
||||
# the config via "vtysh -b" when the servers are started.
|
||||
# Check /etc/pam.d/frr if you intend to use "vtysh"!
|
||||
#
|
||||
vtysh_enable=yes
|
||||
zebra_options=" -A 127.0.0.1 -s 90000000"
|
||||
bgpd_options=" -A 127.0.0.1"
|
||||
ospfd_options=" -A 127.0.0.1"
|
||||
ospf6d_options=" -A ::1"
|
||||
ripd_options=" -A 127.0.0.1"
|
||||
ripngd_options=" -A ::1"
|
||||
isisd_options=" -A 127.0.0.1"
|
||||
pimd_options=" -A 127.0.0.1"
|
||||
nhrpd_options=" -A 127.0.0.1"
|
||||
eigrpd_options=" -A 127.0.0.1"
|
||||
sharpd_options=" -A 127.0.0.1"
|
||||
pbrd_options=" -A 127.0.0.1"
|
||||
staticd_options="-A 127.0.0.1"
|
||||
bfdd_options=" -A 127.0.0.1"
|
||||
fabricd_options="-A 127.0.0.1"
|
||||
vrrpd_options=" -A 127.0.0.1"
|
||||
|
||||
# configuration profile
|
||||
#
|
||||
#frr_profile="traditional"
|
||||
#frr_profile="datacenter"
|
||||
|
||||
#
|
||||
# This is the maximum number of FD's that will be available.
|
||||
# Upon startup this is read by the control files and ulimit
|
||||
# is called. Uncomment and use a reasonable value for your
|
||||
# setup if you are expecting a large number of peers in
|
||||
# say BGP.
|
||||
#MAX_FDS=1024
|
||||
|
||||
# The list of daemons to watch is automatically generated by the init script.
|
||||
#watchfrr_options=""
|
||||
|
||||
# To make watchfrr create/join the specified netns, use the following option:
|
||||
#watchfrr_options="--netns"
|
||||
# This only has an effect in /etc/frr/<somename>/daemons, and you need to
|
||||
# start FRR with "/usr/lib/frr/frrinit.sh start <somename>".
|
||||
|
||||
# for debugging purposes, you can specify a "wrap" command to start instead
|
||||
# of starting the daemon directly, e.g. to use valgrind on ospfd:
|
||||
# ospfd_wrap="/usr/bin/valgrind"
|
||||
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
|
||||
# all_wrap="/usr/bin/perf record --call-graph -"
|
||||
# the normal daemon command is added to this at the end.
|
||||
25
Regression/gracefull-restart/frr.conf
Normal file
25
Regression/gracefull-restart/frr.conf
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
hostname Router-CLIENT
|
||||
!
|
||||
log file <CLIENT_FRR_LOG> debugging
|
||||
!
|
||||
router bgp 50000
|
||||
bgp router-id <CLIENT_IF_ADDR>
|
||||
no bgp ebgp-requires-policy
|
||||
no bgp default ipv4-unicast
|
||||
no bgp network import-check
|
||||
neighbor 10.0.0.1 remote-as 500001
|
||||
!
|
||||
address-family ipv4 unicast
|
||||
neighbor 10.0.0.1 activate
|
||||
neighbor 10.0.0.1 next-hop-self
|
||||
exit-address-family
|
||||
exit
|
||||
!
|
||||
route-map RMAP permit 10
|
||||
set ipv6 next-hop prefer-global
|
||||
exit
|
||||
!
|
||||
line vty
|
||||
!
|
||||
!
|
||||
end
|
||||
24
Regression/gracefull-restart/main.fmf
Normal file
24
Regression/gracefull-restart/main.fmf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
summary: FRR gives false warning when Graceful Restart enabled
|
||||
description: 'When doing a BGP Peering with GR, there is a false warning. There is feature (Graceful Restart) which should work but logs will be polluted with false negative.'
|
||||
contact: Frantisek Hrdina <fhrdina@redhat.com>
|
||||
component:
|
||||
- frr
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- frr
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
link:
|
||||
- verifies: https://issues.redhat.com/browse/RHEL-68432
|
||||
adjust:
|
||||
- environment+:
|
||||
AVC_ERROR: +no_avc_check
|
||||
when: distro ~< rhel-8.7
|
||||
because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7'
|
||||
- enabled: false
|
||||
when: distro < rhel-7
|
||||
continue: false
|
||||
44
Regression/gracefull-restart/test.sh
Executable file
44
Regression/gracefull-restart/test.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
CLIENT_FRR_LOG="/var/log/frr/frr-r2.log"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm "frr"
|
||||
TestDir=$(pwd)
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "pushd $tmp"
|
||||
|
||||
rlRun "rlFileBackup --clean /etc/frr/"
|
||||
rlRun "rlFileBackup --clean /etc/systemd/system/"
|
||||
rlRun "rlFileBackup --clean /var/log/frr/"
|
||||
rlRun "rlFileBackup --clean /var/log/audit/audit.log"
|
||||
rlRun "rlFileBackup --clean /var/run/frr"
|
||||
rlRun "rlFileBackup --clean /run/frr"
|
||||
rlRun "rlFileBackup --clean /root/.history_frr"
|
||||
|
||||
rlRun "cp -f $TestDir/frr.conf /etc/frr/frr.conf"
|
||||
rlRun "cp -f $TestDir/daemons /etc/frr/daemons"
|
||||
rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf"
|
||||
|
||||
rlRun "sed -i 's|<CLIENT_IF_ADDR>|${CLIENT_IF_ADDR}|g' /etc/frr/frr.conf"
|
||||
rlRun "sed -i 's|<CLIENT_FRR_LOG>|${CLIENT_FRR_LOG}|g' /etc/frr/frr.conf"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlServiceStart "frr"
|
||||
sleep 30s
|
||||
rlRun "vtysh -c configure -c 'router bgp 50000' -c 'neighbor 10.0.0.1 graceful-restart' &> graceful-restart.log"
|
||||
rlRun "vtysh -c configure -c 'router bgp 50000' -c 'neighbor 10.0.0.1 graceful-restart' &> graceful-restart.log"
|
||||
rlAssertNotGrep "% The Graceful Restart command used is not valid at this moment." graceful-restart.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlServiceRestore "frr"
|
||||
rlRun "rlFileRestore" 0 "Restoring original config files"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue