From 0762dedd28479a293f4ccf203265e4dc0fca5f2f Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 22 Dec 2021 10:49:47 +0100 Subject: [PATCH 01/84] Making restoring file more verbose --- Sanity/initscript/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index 16ec141..5a41d7a 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -99,7 +99,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartCleanup - rlFileRestore + rlRun "rlFileRestore" 0 "Restoring original config files" rlRun "userdel -fr testuserqa" 0 "Remove test user" rlPhaseEnd From 3070cf3c91d0733c79497ca48b6615d8e471f65c Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Fri, 1 Apr 2022 11:51:12 +0200 Subject: [PATCH 02/84] Adding /CoreOS/frr/Sanity/vtysh/extcommunity-list --- Sanity/vtysh/extcommunity-list/bgpd.conf | 33 ++++++++++ Sanity/vtysh/extcommunity-list/daemons | 80 +++++++++++++++++++++++ Sanity/vtysh/extcommunity-list/main.fmf | 23 +++++++ Sanity/vtysh/extcommunity-list/runtest.sh | 70 ++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 Sanity/vtysh/extcommunity-list/bgpd.conf create mode 100644 Sanity/vtysh/extcommunity-list/daemons create mode 100644 Sanity/vtysh/extcommunity-list/main.fmf create mode 100755 Sanity/vtysh/extcommunity-list/runtest.sh diff --git a/Sanity/vtysh/extcommunity-list/bgpd.conf b/Sanity/vtysh/extcommunity-list/bgpd.conf new file mode 100644 index 0000000..36f7bb6 --- /dev/null +++ b/Sanity/vtysh/extcommunity-list/bgpd.conf @@ -0,0 +1,33 @@ +hostname BGP_Seed +password test +! +router bgp 65000 + bgp router-id 127.0.0.1 + network 10.0.0.0/24 + neighbor 127.0.0.1 remote-as 65001 + neighbor 127.0.0.1 route-map RMAPpsklenar in + neighbor 127.0.0.1 route-map RMAPpsklenar out +! +! ACCEPT ECOMMUNITY +bgp extcommunity-list standard psklenar permit rt 65001:80 +! +route-map RMAPbrno permit 20 + match extcommunity psklenar + set local-preference 80 +! +log file /var/log/frr/bgpd.log debugging +! +!route-map SetAttr permit 10 +! set community 65000:1 additive +! set extcommunity rt 65000:1 +! set aggregator as 65002 1.2.3.4 +! set as-path prepend 1 2 3 4 +! set atomic-aggregate +! set metric 20 +! set originator-id 1.2.3.4 +! +line vty + no login +! +access-list CONF permit 10.0.0.0/24 +!end diff --git a/Sanity/vtysh/extcommunity-list/daemons b/Sanity/vtysh/extcommunity-list/daemons new file mode 100644 index 0000000..fd1deae --- /dev/null +++ b/Sanity/vtysh/extcommunity-list/daemons @@ -0,0 +1,80 @@ +# 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 and zebra daemons are always started. +# +bgpd=yes +ospfd=no +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +ldpd=no +nhrpd=no +eigrpd=no +babeld=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" +ldpd_options=" -A 127.0.0.1" +nhrpd_options=" -A 127.0.0.1" +eigrpd_options=" -A 127.0.0.1" +babeld_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="" + +# 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. diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf new file mode 100644 index 0000000..2604261 --- /dev/null +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -0,0 +1,23 @@ +summary: It sets extcommunity and then list it +description: '' +contact: fhrdina@redhat.com +component: [] +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 25m +enabled: true +tag: + - NoRHEL4 + - NoRHEL5 + - TIPfail + - Tier1 +tier: '1' +adjust: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7 + continue: false +extra-nitrate: TC#0600617 +extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list +extra-task: /CoreOS/frr/Sanity/vtysh/extcommunity-list diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh new file mode 100755 index 0000000..232ae9f --- /dev/null +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/frr/Sanity/vtysh/extcommunity-list +# Description: It sets extcommunity and then list it +# Author: Daniel Rusek +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +# Include rhts environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlFileBackup --clean "/etc/frr/daemons" + rlFileBackup --clean "/etc/frr/bgpd.conf" + touch /etc/frr/bgpd.conf + touch /etc/frr/vtysh.conf + + rlRun "/bin/cp -f daemons /etc/frr/daemons" + + if rlIsRHEL '>=9' || rlIsFedora; then + rlRun "/bin/cp -f bgpd.conf /etc/frr/frr.conf" 0 + else + rlRun "/bin/cp -f bgpd.conf /etc/frr/bgpd.conf" 0 + fi + rlPhaseEnd + + rlPhaseStartTest "restart bgpd with changed configuration file" + rlServiceStop "frr" + sleep 2 + rlServiceStart "frr" + rlPhaseEnd + + rlPhaseStartTest "test the vtysh" + rlRun "vtysh -c 'show run'" + rlRun "vtysh -c 'show bgp extcommunity-list' | grep 'psklenar'" 0 "Checking if extcommunity is set" + rlRun "vtysh -c 'show bgp extcommunity-list psklenar detail' | grep '65001:80'" 0 "Checking details of testing extcommunity" + rlPhaseEnd + + rlPhaseStartCleanup "test the vtysh" + rlServiceRestore "frr" + rlFileRestore + rlPhaseEnd + +rlJournalPrintText +rlJournalEnd From 7e87715f0b8f60875d0b8f6b30d720a97083695f Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Tue, 10 May 2022 14:45:48 +0200 Subject: [PATCH 03/84] Updating working with backups and restore in tests --- Sanity/initscript/runtest.sh | 36 ++++++++++------------- Sanity/vtysh/extcommunity-list/runtest.sh | 7 ++--- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index 5a41d7a..01b12eb 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -37,7 +37,7 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun "useradd testuserqa" 0 "Add test user" - rlFileBackup --clean /etc/frr + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" rlPhaseEnd rlPhaseStartSetup "Prepare" @@ -45,19 +45,20 @@ rlJournalStart rlRun "systemctl start frr" 0 "Starting frr without config" rlRun "systemctl --no-pager status frr" 0 rlRun "systemctl stop frr" 0 - for SERVICE in bgpd ospf6d ospfd ripd ripngd zebra; do - CONF="/etc/frr/$SERVICE.conf" - SAMPLE="/usr/share/doc/frr/$SERVICE.conf.sample" - if [ -e $CONF ]; then - rlRun "rm $CONF" - fi + for SERVICE in bgpd ospf6d ospfd ripd ripngd zebra; do + CONF="/etc/frr/$SERVICE.conf" + SAMPLE="/usr/share/doc/frr/$SERVICE.conf.sample" - if [ -e $SAMPLE ]; then - rlRun "cp $SAMPLE $CONF" 0 - fi - rlRun "cp daemons /etc/frr/" 0 - done + if [ -e $CONF ]; then + rlRun "rm $CONF" + fi + + if [ -e $SAMPLE ]; then + rlRun "cp $SAMPLE $CONF" 0 + fi + rlRun "cp daemons /etc/frr/" 0 + done rlPhaseEnd rlPhaseStartTest "Mandatory actions" @@ -94,15 +95,10 @@ rlJournalStart rlRun "systemctl force-reload frr" 0 " Service have to implement force-reload function " rlPhaseEnd - rlPhaseStartCleanup "Restore" + rlPhaseStartCleanup rlServiceRestore frr + rlRun "rlFileRestore" 0 "Restoring original config files" + rlRun "userdel -fr testuserqa" 0 "Remove test user" rlPhaseEnd - -rlPhaseStartCleanup - rlRun "rlFileRestore" 0 "Restoring original config files" - rlRun "userdel -fr testuserqa" 0 "Remove test user" -rlPhaseEnd - - rlJournalPrintText rlJournalEnd diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh index 232ae9f..4ba4a8a 100755 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -35,8 +35,7 @@ PACKAGE="frr" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlFileBackup --clean "/etc/frr/daemons" - rlFileBackup --clean "/etc/frr/bgpd.conf" + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" touch /etc/frr/bgpd.conf touch /etc/frr/vtysh.conf @@ -61,9 +60,9 @@ rlJournalStart rlRun "vtysh -c 'show bgp extcommunity-list psklenar detail' | grep '65001:80'" 0 "Checking details of testing extcommunity" rlPhaseEnd - rlPhaseStartCleanup "test the vtysh" + rlPhaseStartCleanup rlServiceRestore "frr" - rlFileRestore + rlRun "rlFileRestore" 0 "Restoring original config files" rlPhaseEnd rlJournalPrintText From bdf9c2d99a81eda422ade2745cbbe5c75a2c14f7 Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Wed, 1 Jun 2022 10:36:19 +0200 Subject: [PATCH 04/84] Adding starting-daemons-test --- Sanity/starting-daemons-test/daemons | 83 +++++++++++++++++++++++++ Sanity/starting-daemons-test/main.fmf | 21 +++++++ Sanity/starting-daemons-test/runtest.sh | 63 +++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 Sanity/starting-daemons-test/daemons create mode 100644 Sanity/starting-daemons-test/main.fmf create mode 100755 Sanity/starting-daemons-test/runtest.sh diff --git a/Sanity/starting-daemons-test/daemons b/Sanity/starting-daemons-test/daemons new file mode 100644 index 0000000..04b0343 --- /dev/null +++ b/Sanity/starting-daemons-test/daemons @@ -0,0 +1,83 @@ +# 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=yes +ospf6d=yes +ripd=yes +ripngd=yes +isisd=yes +pimd=yes +nhrpd=yes +eigrpd=yes +sharpd=yes +pbrd=yes +bfdd=yes +fabricd=yes +vrrpd=yes +pathd=yes + +# +# 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" +pathd_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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf new file mode 100644 index 0000000..27d98be --- /dev/null +++ b/Sanity/starting-daemons-test/main.fmf @@ -0,0 +1,21 @@ +summary: The test enables frr daemons and checks, if they are run. +description: '' +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +extra-nitrate: TC#0611431 +extra-summary: /CoreOS/frr/Sanity/starting-daemons-test +extra-task: /CoreOS/frr/Sanity/starting-daemons-test diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh new file mode 100755 index 0000000..46fde3e --- /dev/null +++ b/Sanity/starting-daemons-test/runtest.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Sanity/starting-daemons-test +# Description: The test enables frr daemons and checks, if they are run. +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" +SERVICE_LOG="frr.log" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file" + rlPhaseEnd + + rlPhaseStartTest + if rlIsRHEL '>9' || rlIsFedora; then + daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" + else + daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd" + fi + rlRun "service frr start" 0 "Starting frr service" + sleep 10 + rlRun "service frr status &> $SERVICE_LOG" 0 "Creating service log" + rlRun "grep -i \"frr/watchfrr -d -F traditional $daemons\" $SERVICE_LOG" 0 "Checking if watchfrr is running" + + for i in $daemons; do + rlRun "grep -i \"frr/$i -d -F traditional -A\" $SERVICE_LOG" 0 "Checking if $i daemon started" + done; + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -f $SERVICE_LOG" 0 "Removing service log $SERVICE_LOG" + rlRun "service frr stop" 0 "Stopping frr service" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From dd929b894a6debb87fa07928f6546e01098bdd71 Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Wed, 1 Jun 2022 11:01:12 +0200 Subject: [PATCH 05/84] Updating main.fmf of tests --- Sanity/initscript/main.fmf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index 5668f93..5370590 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -10,16 +10,13 @@ recommend: duration: 5m enabled: true tag: -- NoRHEL4 -- NoRHEL5 -- TIPfail - Tier1 tier: '1' link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1776342 adjust: -- enabled: false - when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7 + - enabled: false + when: distro < rhel-8 continue: false extra-nitrate: TC#0600616 extra-summary: /CoreOS/frr/Sanity/initscript From a5aa4581c18221e0b74c1b3f3c1d83b115aa85d0 Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Wed, 1 Jun 2022 11:11:36 +0200 Subject: [PATCH 06/84] Updating main.fmf of tests --- Sanity/vtysh/extcommunity-list/main.fmf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index 2604261..afbd8a1 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -1,7 +1,8 @@ summary: It sets extcommunity and then list it description: '' contact: fhrdina@redhat.com -component: [] +component: + - frr test: ./runtest.sh framework: beakerlib recommend: @@ -9,14 +10,11 @@ recommend: duration: 25m enabled: true tag: - - NoRHEL4 - - NoRHEL5 - - TIPfail - Tier1 tier: '1' adjust: - enabled: false - when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7 + when: distro < rhel-8 continue: false extra-nitrate: TC#0600617 extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list From 78c9d1baf4ac819137def85b9fb3ecd4b12e2cc5 Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Wed, 1 Jun 2022 11:11:51 +0200 Subject: [PATCH 07/84] Adding FRR-Unable-to-configure-OSPF-in-multi-instance test --- .../daemons | 54 ++++++++++++++ .../main.fmf | 26 +++++++ .../runtest.sh | 72 +++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons create mode 100644 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf create mode 100755 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons new file mode 100644 index 0000000..8096246 --- /dev/null +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons @@ -0,0 +1,54 @@ +# 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=no +ospfd=yes +ospfd_instances=1,2 +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" diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf new file mode 100644 index 0000000..28f21d8 --- /dev/null +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -0,0 +1,26 @@ +summary: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) +description: | + Bug summary: FRR: Unable to configure OSPF in multi-instance mode + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 + - customer_scenario +tier: '1' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 +adjust: + - enabled: false + when: distro ~< rhel-8.6 + continue: false +extra-nitrate: TC#0611598 +extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance +extra-task: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh new file mode 100755 index 0000000..2093288 --- /dev/null +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance +# Description: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemon file" + rlServiceStart "frr" + sleep 5 + rlRun "vtysh -c \"conf t\" -c \"router ospf 1\" -c \"ospf router-id 1.2.3.4\"" 0 "Setting up router ospf 1 instance" + rlRun "vtysh -c \"conf t\" -c \"router ospf 2\" -c \"ospf router-id 5.6.7.8\"" 0 "Setting up router ospf 2 instance" + rlRun "vtysh -c \"write file\"" 0 "Saving router configuration into file" + rlPhaseEnd + + rlPhaseStartTest "Testing running configuration of router" + rlRun "vtysh -c \"sh ru\" | grep \"router ospf 1\"" 0 "Router ospf 1 in running configuration of router" + rlRun "vtysh -c \"sh ru\" | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in running configuration of router" + rlRun "vtysh -c \"sh ru\" | grep \"router ospf 2\"" 0 "Router ospf 2 in running configuration of router" + rlRun "vtysh -c \"sh ru\" | grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in running configuration of router" + rlPhaseEnd + + rlPhaseStartTest "Testing saved configuration of router" + if rlIsRHEL '>=9' || rlIsFedora; then + ospf1_config="frr.conf" + ospf2_config=$ospf1_config + else + ospf1_config="ospfd-1.conf" + ospf2_config="ospfd-2.conf" + fi + + rlRun "cat /etc/frr/$ospf1_config | grep \"router ospf 1\"" 0 "Router ospf 1 in saved configuration of router" + rlRun "cat /etc/frr/$ospf1_config | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in saved configuration of router" + rlRun "cat /etc/frr/$ospf2_config | grep \"router ospf 2\"" 0 "Router ospf 2 in saved configuration of router" + rlRun "cat /etc/frr/$ospf2_config | grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in saved configuration of router" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 4af2ee3718a0a746f7be23912a5a0b0013a2652a Mon Sep 17 00:00:00 2001 From: Frantisek Hrdina Date: Mon, 6 Jun 2022 15:02:22 +0200 Subject: [PATCH 08/84] Adjusting tests to work on centos-stream --- .../FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh | 2 +- Sanity/initscript/runtest.sh | 2 +- Sanity/vtysh/extcommunity-list/runtest.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh index 2093288..446e73f 100755 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh @@ -50,7 +50,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Testing saved configuration of router" - if rlIsRHEL '>=9' || rlIsFedora; then + if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then ospf1_config="frr.conf" ospf2_config=$ospf1_config else diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index 01b12eb..9a6d07f 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -80,7 +80,7 @@ rlJournalStart rlLog ">>>>>>>>> insufficient rights" # Polkit rpm installed is causing that running with insufficient rights returns 1 instead of 4 - if (rlIsRHEL '>=9' || rlIsFedora) && ! rlCheckRpm 'polkit'; then + if (rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9') && ! rlCheckRpm 'polkit'; then ACCESS_DENIED_EXIT_STATUS=4 else ACCESS_DENIED_EXIT_STATUS=1 diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh index 4ba4a8a..469bdad 100755 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -41,7 +41,7 @@ rlJournalStart rlRun "/bin/cp -f daemons /etc/frr/daemons" - if rlIsRHEL '>=9' || rlIsFedora; then + if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then rlRun "/bin/cp -f bgpd.conf /etc/frr/frr.conf" 0 else rlRun "/bin/cp -f bgpd.conf /etc/frr/bgpd.conf" 0 From e1a99645de4a1c1e3385a16d00d612a2872e6790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 15 Mar 2023 15:01:26 +0100 Subject: [PATCH 09/84] Adding test /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion --- .../main.fmf | 26 +++++++++ .../runtest.sh | 56 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf create mode 100755 Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf new file mode 100644 index 0000000..8fdfac5 --- /dev/null +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf @@ -0,0 +1,26 @@ +summary: Test for BZ#1983967 (ospfd crashes in route_node_delete with assertion) +description: | + Bug summary: ospfd crashes in route_node_delete with assertion fail + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1983967 +enabled: true +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1983967 +tag: + - Tier1 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +extra-nitrate: TC#0611179 +extra-summary: /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion +extra-task: /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion +id: 2506d962-71e4-4fb4-a53d-b605e77b2bc0 diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh new file mode 100755 index 0000000..b91871c --- /dev/null +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion +# Description: Test for BZ#1983967 (ospfd crashes in route_node_delete with assertion) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" +LOG="ospfd.log" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + rlRun "sed -i s/'ospfd=no'/'ospfd=yes'/g /etc/frr/daemons" 0 "Setting up ospfd daemon" + rlRun "systemctl start frr" 0 "Running frr service" + + rlPhaseEnd + rlPhaseStartTest + rlRun "vtysh -c \"conf t\" -c \"router ospf\" -c \"ospf router-id 10.10.10.10\" &>> $LOG" 0 "Setting up router-id" + rlRun "vtysh -c \"conf t\" -c \"router ospf\" -c \"network 10.10.10.10/8 area 0\" &>> $LOG" 0 "Setting up ospf network" + rlRun "vtysh -c \"sh ip ospf interface eth0\" &>> $LOG" 0 "Enabling interface" + rlRun "cat $LOG | grep \"error\"" 1 "Checking if configuration was successful without errors" + rlRun "coredumpctl list | grep ospfd" 1 "Check if coredump is without crash" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr" 0 "Stopping frr service" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlRun "rm -f $LOG" 0 "Removing log file" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From ed581e56868f4461d685ac535b4c403703aba132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 29 Mar 2023 12:27:34 +0200 Subject: [PATCH 10/84] Updating tests metadata --- .../main.fmf | 1 + Sanity/initscript/main.fmf | 9 +++++---- Sanity/starting-daemons-test/main.fmf | 1 + Sanity/vtysh/extcommunity-list/main.fmf | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index 28f21d8..db76f85 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -24,3 +24,4 @@ adjust: extra-nitrate: TC#0611598 extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance extra-task: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance +id: 71343b17-d936-4186-815d-4e5fea01fa92 diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index 5370590..59164b2 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -2,18 +2,18 @@ summary: Basic initscript test for frr description: '' contact: fhrdina@redhat.com component: -- frr + - frr test: ./runtest.sh framework: beakerlib recommend: -- frr + - frr duration: 5m enabled: true tag: -- Tier1 + - Tier1 tier: '1' link: -- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1776342 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1776342 adjust: - enabled: false when: distro < rhel-8 @@ -21,3 +21,4 @@ adjust: extra-nitrate: TC#0600616 extra-summary: /CoreOS/frr/Sanity/initscript extra-task: /CoreOS/frr/Sanity/initscript +id: d51035a1-5124-4f35-b06d-2dd800cdb452 diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf index 27d98be..3d283cb 100644 --- a/Sanity/starting-daemons-test/main.fmf +++ b/Sanity/starting-daemons-test/main.fmf @@ -19,3 +19,4 @@ adjust: extra-nitrate: TC#0611431 extra-summary: /CoreOS/frr/Sanity/starting-daemons-test extra-task: /CoreOS/frr/Sanity/starting-daemons-test +id: ebee256b-5193-49ad-9789-cd61552e18ab diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index afbd8a1..2127510 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -19,3 +19,4 @@ adjust: extra-nitrate: TC#0600617 extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list extra-task: /CoreOS/frr/Sanity/vtysh/extcommunity-list +id: 5a022745-ed90-4415-8a07-6317c3c169e2 From 9294b72cca64e4428cc07bb2fcc537ee9f92d162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 30 May 2023 10:50:08 +0200 Subject: [PATCH 11/84] Adding tests /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp --- .../main.fmf | 5 +- .../main.fmf | 26 ++++++ .../runtest.sh | 45 +++++++++++ .../daemons | 80 ++++++++++++++++++ .../frr.conf | 13 +++ .../main.fmf | 26 ++++++ .../runtest.sh | 65 +++++++++++++++ .../daemons | 81 +++++++++++++++++++ .../main.fmf | 28 +++++++ .../new-frr.conf | 35 ++++++++ .../runtest.sh | 62 ++++++++++++++ .../daemons | 81 +++++++++++++++++++ .../frr.conf | 26 ++++++ .../main.fmf | 26 ++++++ .../runtest.sh | 56 +++++++++++++ Sanity/starting-daemons-test/runtest.sh | 2 +- 16 files changed, 655 insertions(+), 2 deletions(-) create mode 100644 Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf create mode 100755 Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh create mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons create mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf create mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf create mode 100755 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh create mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons create mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf create mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf create mode 100755 Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh create mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/daemons create mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/frr.conf create mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/main.fmf create mode 100755 Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index db76f85..794b567 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -19,7 +19,10 @@ link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 adjust: - enabled: false - when: distro ~< rhel-8.6 + when: distro < rhel-8 + continue: false + - enabled: false + when: distro < rhel-8.6 continue: false extra-nitrate: TC#0611598 extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf new file mode 100644 index 0000000..b82f026 --- /dev/null +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -0,0 +1,26 @@ +summary: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) +description: | + Bug summary: frr scriptlet fails: line 15: hostname: command not found + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier3 +tier: '3' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 +adjust: + - enabled: false + when: distro < rhel-9 + continue: false +extra-nitrate: TC#0611715 +extra-summary: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command +extra-task: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command +id: 88887b40-49df-41a1-98b2-1362203b94ae diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh b/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh new file mode 100755 index 0000000..c0445b9 --- /dev/null +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command +# Description: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlPhaseEnd + + rlPhaseStartTest + rlRun "rpm -q --requires frr | grep \"hostname\"" 0 "Check if hostname is dependency of frr" + rlPhaseEnd + + rlPhaseStartCleanup + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons new file mode 100644 index 0000000..b8d45d4 --- /dev/null +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons @@ -0,0 +1,80 @@ +# 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 and zebra daemons are always started. +# +bgpd=no +ospfd=yes +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +ldpd=no +nhrpd=no +eigrpd=no +babeld=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" +ldpd_options=" -A 127.0.0.1" +nhrpd_options=" -A 127.0.0.1" +eigrpd_options=" -A 127.0.0.1" +babeld_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="" + +# 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. diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf new file mode 100644 index 0000000..6b42dc2 --- /dev/null +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf @@ -0,0 +1,13 @@ +hostname ROUTER1 +password zebra +log file /var/log/frr/ospfd.log +! +! +router ospf + ospf router-id ROUTER_ID + network 10.0.0.0/8 area 0 + network 192.168.101.0/24 area 1 + network 192.168.201.0/24 area 2 + ospf opaque-lsa +! +line vty \ No newline at end of file diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf new file mode 100644 index 0000000..6817c88 --- /dev/null +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf @@ -0,0 +1,26 @@ +summary: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) +description: | + Bug summary: ospfd not running with ospf opaque-lsa option used + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 +tier: '1' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +extra-nitrate: TC#0611420 +extra-summary: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option +extra-task: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option +id: bd411aed-c312-4da5-b817-39ed63624153 diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh new file mode 100755 index 0000000..fe8a441 --- /dev/null +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh @@ -0,0 +1,65 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option +# Description: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "ip link add dummy1 type dummy" 0 "Adding dummy1 interface" + rlRun "ip address add 192.168.101.1/24 dev dummy1" 0 "Setting up dummy1 interface" + rlRun "ip link set dummy1 up" 0 "Bring up dummy1 interface" + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + rlRun "cp -f daemons /etc/frr/daemons" 0 "Placing daemons configuration with ospfd enabled" + + ROUTER_ID=$(hostname -I | awk '{print $1}') + rlRun "sed -i \"s/ROUTER_ID/$ROUTER_ID/g\" frr.conf" 0 "Setting ospf router id" + if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then + + rlRun "cp -f frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf with ospf configuration" + else + rlRun "cp -f frr.conf /etc/frr/ospfd.conf" 0 "Placing ospf.conf with ospf configuration" + fi + rlPhaseEnd + + rlPhaseStartTest + rlRun "systemctl start frr" 0 "Starting frr service" + sleep 41 + rlRun "systemctl status frr | grep \"ospfd -d -F traditional -A 127.0.0.1\"" 0 "Check if ospfd is running" + rlRun "vtysh -c 'show ip ospf database' |& grep \"ospfd is not running\"" 1 "Test if showing ip ospf database not fail" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr" 0 "Stopping frr service" + rlRun "ip link del dummy1 type dummy" 0 "Removing dummy1 interface" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons b/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons new file mode 100644 index 0000000..7ec9086 --- /dev/null +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons @@ -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=yes +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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf new file mode 100644 index 0000000..fbc1569 --- /dev/null +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -0,0 +1,28 @@ +summary: Test for BZ#2029958 (FRR reloader generating invalid BFD) +description: | + Bug summary: FRR reloader generating invalid BFD configurations, exits with error + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 +tier: '1' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031076 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031077 +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +extra-nitrate: TC#0612674 +extra-summary: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error +extra-task: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error +id: d0fcbecb-b200-4448-a468-da5104f31f30 diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf new file mode 100644 index 0000000..0ad84f0 --- /dev/null +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf @@ -0,0 +1,35 @@ +frr version 7.5 +frr defaults traditional +hostname new.localdomain +service integrated-vtysh-config +! +router bgp 64512 + bgp router-id 10.10.10.0 + no bgp ebgp-requires-policy + no bgp default ipv4-unicast + no bgp network import-check + neighbor 192.168.111.1 remote-as 64512 + neighbor 192.168.111.1 bfd profile echo + neighbor 192.168.111.1 password ibgp-test + neighbor 192.168.111.1 timers 30 90 + ! + address-family ipv4 unicast + neighbor 192.168.111.1 activate + exit-address-family + ! + address-family ipv6 unicast + neighbor 192.168.111.1 activate + exit-address-family +! +line vty +! +bfd + profile echo + transmit-interval 81 + receive-interval 80 + echo-mode + echo-interval 82 + minimum-ttl 254 + ! +! +end \ No newline at end of file diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh new file mode 100755 index 0000000..ae93ffc --- /dev/null +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error +# Description: Test for BZ#2029958 (FRR reloader generating invalid BFD) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + TestDir=$(pwd) + rlAssertRpm $PACKAGE + rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons" + rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" + rlServiceStart "frr" + sleep 5 + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + DIR="libexec" + else + DIR="lib" + fi + rlRun "/usr/$DIR/frr/frr-reload.py --overwrite --reload $TestDir/new-frr.conf &> frr-reload.log" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/daemons b/Regression/vtysh-running-config-output-not-showing-bgp/daemons new file mode 100644 index 0000000..5174536 --- /dev/null +++ b/Regression/vtysh-running-config-output-not-showing-bgp/daemons @@ -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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf b/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf new file mode 100644 index 0000000..73fc82f --- /dev/null +++ b/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf @@ -0,0 +1,26 @@ +hostname ctrl-3-0 +log file /var/log/frr/frr.log debugging +service integrated-vtysh-config +line vty + +router bgp 64999 + bgp log-neighbor-changes + bgp graceful-shutdown + + neighbor uplink peer-group + neighbor uplink remote-as internal + neighbor uplink bfd + neighbor uplink ttl-security hops 1 + neighbor enp2s0 interface peer-group uplink + neighbor enp3s0 interface peer-group uplink + + address-family ipv4 unicast + redistribute connected + neighbor uplink allowas-in origin + exit-address-family + + address-family ipv6 unicast + redistribute connected + neighbor uplink activate + neighbor uplink allowas-in origin + exit-address-family \ No newline at end of file diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf new file mode 100644 index 0000000..84ce219 --- /dev/null +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -0,0 +1,26 @@ +summary: Test for BZ#1917269 (vtysh running-config output not showing bgp) +description: | + Bug summary: vtysh running-config output not showing bgp ttl-security hops option + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier2 +tier: '2' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +extra-nitrate: TC#0611713 +extra-summary: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp +extra-task: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp +id: bd0f6afa-1eaf-412b-9ad5-84664af133ff diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh b/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh new file mode 100755 index 0000000..bd07a73 --- /dev/null +++ b/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp +# Description: Test for BZ#1917269 (vtysh running-config output not showing bgp) +# Author: František Hrdina +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + rlRun "cp frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf file" + rlRun "cp daemons /etc/frr/daemons" 0 "Placing daemons file" + rlServiceStart "frr" + + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "vtysh -c \"sh ru\" | grep \"neighbor uplink ttl-security hops 1\"" 0 "Testing if configuration is in running config" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlServiceRestore "frr" + rlRun "rlFileRestore" 0 "Restoring original config files" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index 46fde3e..02f61c0 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -39,7 +39,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - if rlIsRHEL '>9' || rlIsFedora; then + if rlIsRHEL '>9' || rlIsFedora || rlIsCentOS '>9'; then daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" else daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd" From 7be9cf1de823711db61e42a3d1d920909cb326ce Mon Sep 17 00:00:00 2001 From: Bryan Mason Date: Tue, 5 Sep 2023 18:58:10 -0700 Subject: [PATCH 12/84] Disable AVC Checking in RHEL ~< 8.7 because BZ 1941765 - Regression/FRR-Unable-to-configure-OSPF-in-multi-instance - Regression/ospfd-crashes-in-route-node-delete-with-assertion - Regression/ospfd-not-running-with-ospf-opaque-lsa-option - Regression/reloader-generating-invalid-BFD-configurations-with-error - Regression/vtysh-running-config-output-not-showing-bgp - Sanity/initscript - Sanity/starting-daemons-test - Sanity/vtysh/extcommunity-list --- .../FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf | 3 +++ .../ospfd-crashes-in-route-node-delete-with-assertion/main.fmf | 3 +++ .../ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf | 3 +++ .../main.fmf | 3 +++ .../vtysh-running-config-output-not-showing-bgp/main.fmf | 3 +++ Sanity/initscript/main.fmf | 3 +++ Sanity/starting-daemons-test/main.fmf | 3 +++ Sanity/vtysh/extcommunity-list/main.fmf | 3 +++ 8 files changed, 24 insertions(+) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index 794b567..bd0bef3 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -24,6 +24,9 @@ adjust: - enabled: false when: distro < rhel-8.6 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0611598 extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance extra-task: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf index 8fdfac5..bfaf724 100644 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf @@ -12,6 +12,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 contact: František Hrdina component: - frr diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf index 6817c88..f3c4960 100644 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf @@ -20,6 +20,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0611420 extra-summary: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option extra-task: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf index fbc1569..2259694 100644 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -22,6 +22,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0612674 extra-summary: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error extra-task: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf index 84ce219..dfd9da9 100644 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -20,6 +20,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0611713 extra-summary: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp extra-task: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index 59164b2..104efcc 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -18,6 +18,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0600616 extra-summary: /CoreOS/frr/Sanity/initscript extra-task: /CoreOS/frr/Sanity/initscript diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf index 3d283cb..328df02 100644 --- a/Sanity/starting-daemons-test/main.fmf +++ b/Sanity/starting-daemons-test/main.fmf @@ -16,6 +16,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0611431 extra-summary: /CoreOS/frr/Sanity/starting-daemons-test extra-task: /CoreOS/frr/Sanity/starting-daemons-test diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index 2127510..4d70a2d 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -16,6 +16,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 extra-nitrate: TC#0600617 extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list extra-task: /CoreOS/frr/Sanity/vtysh/extcommunity-list From e7a89a462a6b09b2a037f6e7d765421d5af81597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 12 Sep 2023 10:26:01 +0200 Subject: [PATCH 13/84] Fixing failing initscript test /Sanity/initscript Return values differs because some systemd things and polkit (not)installed. The main idea of test is, that the return values should not be zero, so 1 or 4 occuring is fine. --- Sanity/initscript/runtest.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index 9a6d07f..b672dec 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -79,14 +79,10 @@ rlJournalStart rlRun "systemctl --no-pager status frr" 3 "Status of stopped service" rlLog ">>>>>>>>> insufficient rights" - # Polkit rpm installed is causing that running with insufficient rights returns 1 instead of 4 - if (rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9') && ! rlCheckRpm 'polkit'; then - ACCESS_DENIED_EXIT_STATUS=4 - else - ACCESS_DENIED_EXIT_STATUS=1 - fi + # Return values differs because some systemd things and polkit (not)installed. + # The main idea of test is, that the return values should not be zero, so 1 or 4 occuring is fine. rlRun "systemctl start frr " 0 " Starting service for restarting under nonpriv user " - rlRun "su testuserqa -c 'systemctl restart frr'" $ACCESS_DENIED_EXIT_STATUS "Insufficient rights, restarting service under nonprivileged user must fail" + rlRun "su testuserqa -c 'systemctl restart frr'" 1,4 "Insufficient rights, restarting service under nonprivileged user must fail" rlRun "systemctl stop frr " 0 rlLog ">>>>>>>>> operations" From c92ef24489c3e5c757a50ead0b40012123235f64 Mon Sep 17 00:00:00 2001 From: Bryan Mason Date: Tue, 12 Sep 2023 22:01:37 -0700 Subject: [PATCH 14/84] Fixing relevancy for test Disable Regression/vtysh-running-config-output-not-showing-bgp in RHEL-8 ~< 8.6 --- .../vtysh-running-config-output-not-showing-bgp/main.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf index dfd9da9..d33c131 100644 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -20,6 +20,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - enabled: false + when: distro < rhel-8.6 + continue: false - environment+: AVC_ERROR: +no_avc_check when: distro ~< rhel-8.7 From 40363c09a26e4e978ab7ffc4b5886849ddf0baf0 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Tue, 12 Sep 2023 17:54:42 +0200 Subject: [PATCH 15/84] Sanity/starting-daemons-test fix for < RHEL-8.4 - watchfrr does not run by default, do not test - zebra and staticd do not run by default - sharpd and vrrpd do not exist --- Sanity/starting-daemons-test/runtest.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index 02f61c0..2bfdac8 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -35,22 +35,36 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + if rlIsRHEL '<8.4'; then + # zebra is not started by default until RHEL-8.4 + # staticd is not started by default until RHEL-8.4 + # vrrpd is not present until RHEL-8.4 + # sharpd is not present until RHEL-8.4 + sed -i 's/sharpd=yes/zebra=yes/' daemons + sed -i 's/vrrpd=yes/staticd=yes/' daemons + fi rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file" rlPhaseEnd rlPhaseStartTest if rlIsRHEL '>9' || rlIsFedora || rlIsCentOS '>9'; then daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" + elif rlIsRHEL '<8.4'; then + daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd" else daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd" fi rlRun "service frr start" 0 "Starting frr service" sleep 10 rlRun "service frr status &> $SERVICE_LOG" 0 "Creating service log" - rlRun "grep -i \"frr/watchfrr -d -F traditional $daemons\" $SERVICE_LOG" 0 "Checking if watchfrr is running" + + # No watchfrr by default until RHEL-8.4 + if rlIsRHEL '>8.4' || rlIsFedora || rlIsCentOS; then + rlRun "grep -i \"frr/watchfrr -d -F traditional $daemons\" $SERVICE_LOG" 0 "Checking if watchfrr is running" + fi for i in $daemons; do - rlRun "grep -i \"frr/$i -d -F traditional -A\" $SERVICE_LOG" 0 "Checking if $i daemon started" + rlRun "grep -i \"frr/$i -d.*-A\" $SERVICE_LOG" 0 "Checking if $i daemon started" done; rlPhaseEnd From 1a0cca22a24448331c3ddebf66eaa0c666875563 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Wed, 13 Sep 2023 11:16:40 +0200 Subject: [PATCH 16/84] Fix Sanity/initscript start w/o config for RHEL<8.4 --- Sanity/initscript/runtest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index b672dec..2d5cf75 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -42,8 +42,13 @@ rlJournalStart rlPhaseStartSetup "Prepare" rlServiceStop frr + rlRun "systemctl start frr" 0 "Starting frr without config" - rlRun "systemctl --no-pager status frr" 0 + if rlIsRHEL '<8.4'; then + rlRun "systemctl --no-pager status frr" 3 + else + rlRun "systemctl --no-pager status frr" 0 + fi rlRun "systemctl stop frr" 0 for SERVICE in bgpd ospf6d ospfd ripd ripngd zebra; do From f7df655e054cabf20efe2384ab5e3d265fe4ed6a Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Wed, 13 Sep 2023 12:13:51 +0200 Subject: [PATCH 17/84] Fix Sanity/vtysh/extcommunity-list for RHEL<8.4 --- Sanity/vtysh/extcommunity-list/runtest.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh index 469bdad..9d4f9b2 100755 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -57,7 +57,11 @@ rlJournalStart rlPhaseStartTest "test the vtysh" rlRun "vtysh -c 'show run'" rlRun "vtysh -c 'show bgp extcommunity-list' | grep 'psklenar'" 0 "Checking if extcommunity is set" - rlRun "vtysh -c 'show bgp extcommunity-list psklenar detail' | grep '65001:80'" 0 "Checking details of testing extcommunity" + if rlIsRHEL '<8.4'; then + rlRun "vtysh -c 'show bgp extcommunity-list psklenar' | grep '65001:80'" 0 "Checking details of testing extcommunity" + else + rlRun "vtysh -c 'show bgp extcommunity-list psklenar detail' | grep '65001:80'" 0 "Checking details of testing extcommunity" + fi rlPhaseEnd rlPhaseStartCleanup From 2b75ee79e18f4b55a8468352642c4df99b0a4d52 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Wed, 13 Sep 2023 12:54:09 +0200 Subject: [PATCH 18/84] Relax option check in Regression/ospfd-not-running The '-F traditional' option is used in RHEL-8.4 and beyond, this change allows this test to be used for earlier versions too. --- .../ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh index fe8a441..6182aea 100755 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh @@ -52,7 +52,7 @@ rlJournalStart rlPhaseStartTest rlRun "systemctl start frr" 0 "Starting frr service" sleep 41 - rlRun "systemctl status frr | grep \"ospfd -d -F traditional -A 127.0.0.1\"" 0 "Check if ospfd is running" + rlRun "systemctl status frr | grep \"ospfd -d.*-A 127.0.0.1\"" 0 "Check if ospfd is running" rlRun "vtysh -c 'show ip ospf database' |& grep \"ospfd is not running\"" 1 "Test if showing ip ospf database not fail" rlPhaseEnd From 75efbb2044b8b9c418e5e50a61fcfbdfcf902df8 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Wed, 13 Sep 2023 13:37:27 +0200 Subject: [PATCH 19/84] Adjust relevancy of Regression/reloader-generating... The bug was fixed in RHEL-8.4, do not run the test for earlier versions. --- .../main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf index 2259694..eccdb3c 100644 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -20,7 +20,7 @@ link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031077 adjust: - enabled: false - when: distro < rhel-8 + when: distro < rhel-8.4 continue: false - environment+: AVC_ERROR: +no_avc_check From 91853c20428b6f449bddc2ce222648f7e9aeb40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 6 Oct 2023 10:45:15 +0200 Subject: [PATCH 20/84] Adding tests /Regression/bfd-crash-in-MetalLB /Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration --- Regression/bfd-crash-in-MetalLB/daemons | 81 +++++++++++++++++++ Regression/bfd-crash-in-MetalLB/main.fmf | 33 ++++++++ .../bfd-crash-in-MetalLB/reproducer-1.conf | 27 +++++++ .../bfd-crash-in-MetalLB/reproducer-2.conf | 12 +++ Regression/bfd-crash-in-MetalLB/test.sh | 54 +++++++++++++ .../daemons | 81 +++++++++++++++++++ .../frr.conf | 10 +++ .../main.fmf | 36 +++++++++ .../test.sh | 39 +++++++++ 9 files changed, 373 insertions(+) create mode 100644 Regression/bfd-crash-in-MetalLB/daemons create mode 100644 Regression/bfd-crash-in-MetalLB/main.fmf create mode 100644 Regression/bfd-crash-in-MetalLB/reproducer-1.conf create mode 100644 Regression/bfd-crash-in-MetalLB/reproducer-2.conf create mode 100755 Regression/bfd-crash-in-MetalLB/test.sh create mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons create mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf create mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf create mode 100755 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh diff --git a/Regression/bfd-crash-in-MetalLB/daemons b/Regression/bfd-crash-in-MetalLB/daemons new file mode 100644 index 0000000..9f92b22 --- /dev/null +++ b/Regression/bfd-crash-in-MetalLB/daemons @@ -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=no +ospfd=no +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=yes +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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf new file mode 100644 index 0000000..4b3e294 --- /dev/null +++ b/Regression/bfd-crash-in-MetalLB/main.fmf @@ -0,0 +1,33 @@ +summary: Testing if frr not crash when reloading with specific configs +description: 'Reloading frr with specific bfd configs caused segfaults' +contact: František Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 + - Acceptance +link: + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231831 + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231830 + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231829 + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2226803 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-8 + continue: false + - 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-8.4 + continue: false +extra-nitrate: TC#0615745 +id: d3c14b89-3674-4cb5-a479-b8f76836c430 diff --git a/Regression/bfd-crash-in-MetalLB/reproducer-1.conf b/Regression/bfd-crash-in-MetalLB/reproducer-1.conf new file mode 100644 index 0000000..0321f0d --- /dev/null +++ b/Regression/bfd-crash-in-MetalLB/reproducer-1.conf @@ -0,0 +1,27 @@ +frr version 7.5.1-20210328-00-g1ce35e3b5 +frr defaults traditional +hostname LR1.wue3 +log syslog +log facility local7 +#agentx +service integrated-vtysh-config +! +line vty +! +bfd + profile bar + detect-multiplier 102 + receive-interval 444 + ! + profile foo + detect-multiplier 101 + transmit-interval 333 + receive-interval 222 + shutdown + echo-mode + echo-interval 100 + ! + peer 192.0.2.10 + ! +! +end \ No newline at end of file diff --git a/Regression/bfd-crash-in-MetalLB/reproducer-2.conf b/Regression/bfd-crash-in-MetalLB/reproducer-2.conf new file mode 100644 index 0000000..88960b6 --- /dev/null +++ b/Regression/bfd-crash-in-MetalLB/reproducer-2.conf @@ -0,0 +1,12 @@ +! +frr version 7.5.1-20210328-00-g1ce35e3b5 +frr defaults traditional +hostname LR1.wue3 +log syslog +log facility local7 +#agentx +service integrated-vtysh-config +! +line vty +! +end \ No newline at end of file diff --git a/Regression/bfd-crash-in-MetalLB/test.sh b/Regression/bfd-crash-in-MetalLB/test.sh new file mode 100755 index 0000000..516b601 --- /dev/null +++ b/Regression/bfd-crash-in-MetalLB/test.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons" + cat /etc/frr/daemons + rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" + rlPhaseEnd + + rlPhaseStartTest + rlServiceStart "frr" + sleep 5 + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + DIR="libexec" + else + DIR="lib" + fi + + counter=0 + while [ $counter -lt 5 ]; do + rlRun "/usr/$DIR/frr/frr-reload.py --reload --debug --stdout $TestDir/reproducer-1.conf &>> test_log.txt" + sleep 5 + rlRun "/usr/$DIR/frr/frr-reload.py --reload --debug --stdout $TestDir/reproducer-2.conf &>> test_log.txt" + sleep 5 + counter=$(( $counter + 1 )) + done + + if rlIsFedora; then + journalctl -b > fedora.log + LOG_LOCATION="fedora.log" + else + LOG_LOCATION="/var/log/messages" + fi + + rlAssertNotGrep "\[EC 4043309122\] Client 'bfd' encountered an error and is shutting down" $LOG_LOCATION + rlRun "grep \"BFD\" $LOG_LOCATION | grep \"Received signal 11\"" 1 "Checking if bfd segfault not presented in log" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlFileRestore + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd + diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons new file mode 100644 index 0000000..8f44289 --- /dev/null +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons @@ -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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf new file mode 100644 index 0000000..7629173 --- /dev/null +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf @@ -0,0 +1,10 @@ +frr version 7.5 +frr defaults traditional +hostname centos8.localdomain +no ip forwarding +no ipv6 forwarding +service integrated-vtysh-config +line vty +router bgp 4250001000 +neighbor 192.168.122.207 remote-as 65512 +neighbor 192.168.122.207 ebgp-multihop \ No newline at end of file diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf new file mode 100644 index 0000000..4fdfaa7 --- /dev/null +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -0,0 +1,36 @@ +summary: eBGP multihop peer flapping due to delta miscalculation of new configuration +description: The FRR reloader causes eBGP connection flapping when eBGP multihop peer + with default TTL (255) is unchanged. When creating an eBGP multihop without TTL, + FRR will default the TTL to 255 and show it in a vtysh "running-configuration" + command which is used by the frr-reload script to calculate new configuration + deltas. +contact: František Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Tier1 + - Acceptance +link: + - verifies: https://issues.redhat.com/browse/RHEL-11666 + - verifies: https://issues.redhat.com/browse/RHEL-11667 + - verifies: https://issues.redhat.com/browse/RHEL-11668 + - verifies: https://issues.redhat.com/browse/RHEL-11669 + - verifies: https://issues.redhat.com/browse/RHEL-2263 + - verifies: https://issues.redhat.com/browse/RHEL-11670 + - verifies: https://issues.redhat.com/browse/RHEL-11671 + - verifies: https://issues.redhat.com/browse/RHEL-11672 + - verifies: https://issues.redhat.com/browse/RHEL-11673 + - verifies: https://issues.redhat.com/browse/RHEL-11665 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-8 + continue: false +extra-nitrate: TC#0615876 +id: 2eaa7b0e-f27b-4950-9f6b-102d85f20100 diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh new file mode 100755 index 0000000..6c63682 --- /dev/null +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons" + rlRun "cp -f $TestDir/frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf" + rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" + rlPhaseEnd + + rlPhaseStartTest + rlServiceStart "frr" + sleep 5 + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + DIR="libexec" + else + DIR="lib" + fi + rlRun "cp $TestDir/frr.conf $TestDir/frr.conf.new" + rlRun "/usr/$DIR/frr/frr-reload.py --test $TestDir/frr.conf.new > reload.log" + + # Check if reload does not try to change ebpg-multihop configuration + rlAssertNotGrep "no neighbor 192.168.122.207 ebgp-multihop 255" reload.log + rlAssertNotGrep "neighbor 192.168.122.207 ebgp-multihop" reload.log + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlFileRestore + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From e4597c99bb8d5e4a33fe6c2b470ff640e4f71c41 Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Mon, 9 Oct 2023 13:02:19 +0000 Subject: [PATCH 21/84] Update Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf Do not fail on SELinux issues on ~< rhel-8.7 --- .../main.fmf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index 4fdfaa7..36dbd5c 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -32,5 +32,9 @@ adjust: - enabled: false when: distro < rhel-8 continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 + because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7' extra-nitrate: TC#0615876 id: 2eaa7b0e-f27b-4950-9f6b-102d85f20100 From 44075e18e57be04d3241593c41bae626d5a603eb Mon Sep 17 00:00:00 2001 From: Stepan Broz Date: Mon, 9 Oct 2023 13:12:41 +0000 Subject: [PATCH 22/84] Update Regression/bfd-crash-in-MetalLB/main.fmf Remove the Acceptance tag --- Regression/bfd-crash-in-MetalLB/main.fmf | 1 - 1 file changed, 1 deletion(-) diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf index 4b3e294..291d388 100644 --- a/Regression/bfd-crash-in-MetalLB/main.fmf +++ b/Regression/bfd-crash-in-MetalLB/main.fmf @@ -11,7 +11,6 @@ duration: 15m enabled: true tag: - Tier1 - - Acceptance link: - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231831 - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231830 From a50c94969fb748cca2b15059e28755f835e05fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 11 Oct 2023 11:54:32 +0200 Subject: [PATCH 23/84] Updating tests for centos-stream --- Regression/bfd-crash-in-MetalLB/test.sh | 2 +- .../test.sh | 2 +- .../frr-scriptlet-fails-line-15-hostname-command/main.fmf | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Regression/bfd-crash-in-MetalLB/test.sh b/Regression/bfd-crash-in-MetalLB/test.sh index 516b601..403e58b 100755 --- a/Regression/bfd-crash-in-MetalLB/test.sh +++ b/Regression/bfd-crash-in-MetalLB/test.sh @@ -18,7 +18,7 @@ rlJournalStart rlPhaseStartTest rlServiceStart "frr" sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then DIR="libexec" else DIR="lib" diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh index 6c63682..d0f1529 100755 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh @@ -17,7 +17,7 @@ rlJournalStart rlPhaseStartTest rlServiceStart "frr" sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then DIR="libexec" else DIR="lib" diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf index b82f026..d2dd0a3 100644 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -20,6 +20,9 @@ adjust: - enabled: false when: distro < rhel-9 continue: false + - enabled: false + when: distro < centos-9 + continue: false extra-nitrate: TC#0611715 extra-summary: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command extra-task: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command From 827f7b926e162a59bc50234426060261dccf80a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 11 Oct 2023 12:01:13 +0200 Subject: [PATCH 24/84] Tag update of test Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/ --- .../main.fmf | 2 -- 1 file changed, 2 deletions(-) diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index 36dbd5c..241fe47 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -14,7 +14,6 @@ recommend: duration: 15m enabled: true tag: - - Tier1 - Acceptance link: - verifies: https://issues.redhat.com/browse/RHEL-11666 @@ -27,7 +26,6 @@ link: - verifies: https://issues.redhat.com/browse/RHEL-11672 - verifies: https://issues.redhat.com/browse/RHEL-11673 - verifies: https://issues.redhat.com/browse/RHEL-11665 -tier: '1' adjust: - enabled: false when: distro < rhel-8 From 770bffbbfec286e3d600440f563b8308254d43a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 11 Oct 2023 12:39:22 +0200 Subject: [PATCH 25/84] Updating tests for centos-stream --- .../frr-scriptlet-fails-line-15-hostname-command/main.fmf | 2 +- .../runtest.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf index d2dd0a3..9e13125 100644 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -21,7 +21,7 @@ adjust: when: distro < rhel-9 continue: false - enabled: false - when: distro < centos-9 + when: distro < centos-stream-9 continue: false extra-nitrate: TC#0611715 extra-summary: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh index ae93ffc..1a73cba 100755 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh @@ -44,7 +44,7 @@ rlJournalStart rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" rlServiceStart "frr" sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8.7'; then + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then DIR="libexec" else DIR="lib" From 99610fa2d45572d2ae045f581359b2ad658c91b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 17 Oct 2023 15:44:12 +0200 Subject: [PATCH 26/84] Adding test /Regression/duplicated-prefix-lists-when-no-seq-is-specified --- .../frr-pref-lists.conf | 39 +++++++++++++++++ .../main.fmf | 30 +++++++++++++ .../test.sh | 42 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf create mode 100644 Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf create mode 100755 Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf new file mode 100644 index 0000000..e2a9f4b --- /dev/null +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf @@ -0,0 +1,39 @@ +log 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 \ No newline at end of file diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf new file mode 100644 index 0000000..aa87c3a --- /dev/null +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -0,0 +1,30 @@ +summary: Duplicated prefix lists when no seq is specified +description: 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. +contact: František Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Acceptance +link: + - verifies: https://issues.redhat.com/browse/RHEL-5116 +adjust: + - enabled: false + when: distro < rhel-8 + continue: false + - enabled: false + when: distro < rhel-8.6 + continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 + because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 +extra-nitrate: TC#0615909 +id: 9d459511-e8d6-4f0c-962f-b9f051cd1715 diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh new file mode 100755 index 0000000..44a72d0 --- /dev/null +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + rlRun "touch /etc/frr/frr.conf" 0 "Creating empty config" + rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" + rlPhaseEnd + + rlPhaseStartTest + rlServiceStart "frr" + sleep 5 + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then + DIR="libexec" + else + DIR="lib" + fi + rlRun "/usr/$DIR/frr/frr-reload.py --reload $TestDir/frr-pref-lists.conf &> reload.log" + rlRun "vtysh -c \"show run\" > running.log" + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.0" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.1" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.2" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.3" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.0" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.1" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.2" | wc -l) 1 + rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.3" | wc -l) 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlFileRestore + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 7af5976ce516bcd1e68e34c743d736c2c1a0a0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 20 Oct 2023 13:19:35 +0200 Subject: [PATCH 27/84] Adding test /Regression/crash-in-plist-update --- Regression/crash-in-plist-update/1.conf | 109 ++++++++++++++++++++++ Regression/crash-in-plist-update/2.conf | 103 ++++++++++++++++++++ Regression/crash-in-plist-update/daemons | 81 ++++++++++++++++ Regression/crash-in-plist-update/main.fmf | 33 +++++++ Regression/crash-in-plist-update/run.sh | 3 + Regression/crash-in-plist-update/test.sh | 58 ++++++++++++ 6 files changed, 387 insertions(+) create mode 100644 Regression/crash-in-plist-update/1.conf create mode 100644 Regression/crash-in-plist-update/2.conf create mode 100644 Regression/crash-in-plist-update/daemons create mode 100644 Regression/crash-in-plist-update/main.fmf create mode 100644 Regression/crash-in-plist-update/run.sh create mode 100755 Regression/crash-in-plist-update/test.sh diff --git a/Regression/crash-in-plist-update/1.conf b/Regression/crash-in-plist-update/1.conf new file mode 100644 index 0000000..775e233 --- /dev/null +++ b/Regression/crash-in-plist-update/1.conf @@ -0,0 +1,109 @@ +ip prefix-list 192.168.18.24-pl-ipv4 seq 20 permit 192.168.18.95/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 21 permit 192.168.18.99/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 22 permit 192.168.18.110/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 23 permit 192.168.18.39/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 24 permit 192.168.18.52/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 25 permit 192.168.18.61/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 26 permit 192.168.18.81/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 27 permit 192.168.18.102/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 28 permit 192.168.18.58/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 29 permit 192.168.18.77/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 40 permit 192.168.18.43/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 41 permit 192.168.18.55/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 42 permit 192.168.18.87/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 43 permit 192.168.18.101/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 44 permit 192.168.18.44/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 45 permit 192.168.18.46/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 46 permit 192.168.18.82/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 47 permit 192.168.18.63/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 48 permit 192.168.18.93/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 49 permit 192.168.18.98/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 50 permit 192.168.18.35/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 51 permit 192.168.18.94/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 52 permit 192.168.18.100/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 53 permit 192.168.18.103/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 54 permit 192.168.18.108/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 55 permit 192.168.18.78/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 56 permit 192.168.18.88/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 57 permit 192.168.18.91/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 58 permit 192.168.18.41/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 59 permit 192.168.18.74/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 60 permit 192.168.18.64/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 61 permit 192.168.18.66/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 62 permit 192.168.18.70/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 63 permit 192.168.18.72/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 64 permit 192.168.18.97/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 65 permit 192.168.18.32/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 66 permit 192.168.18.42/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 67 permit 192.168.18.56/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 68 permit 192.168.18.37/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 69 permit 192.168.18.60/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 70 permit 192.168.18.33/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 71 permit 192.168.18.75/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 72 permit 192.168.18.76/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 73 permit 192.168.18.105/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 74 permit 192.168.18.109/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 75 permit 192.168.18.38/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 76 permit 192.168.18.47/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 77 permit 192.168.18.80/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 78 permit 192.168.18.40/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 79 permit 192.168.18.54/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 80 deny any +ipv6 prefix-list 192.168.18.24-pl-ipv4 seq 81 deny any +ip prefix-list 192.168.18.25-pl-ipv4 seq 20 permit 192.168.18.95/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 21 permit 192.168.18.99/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 22 permit 192.168.18.110/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 23 permit 192.168.18.39/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 24 permit 192.168.18.52/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 25 permit 192.168.18.61/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 26 permit 192.168.18.81/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 27 permit 192.168.18.102/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 28 permit 192.168.18.58/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 29 permit 192.168.18.77/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 35 permit 192.168.18.57/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 36 permit 192.168.18.62/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 37 permit 192.168.18.71/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 38 permit 192.168.18.96/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 39 permit 192.168.18.34/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 40 permit 192.168.18.43/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 41 permit 192.168.18.55/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 42 permit 192.168.18.87/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 43 permit 192.168.18.101/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 44 permit 192.168.18.44/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 45 permit 192.168.18.46/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 46 permit 192.168.18.82/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 47 permit 192.168.18.63/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 48 permit 192.168.18.93/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 49 permit 192.168.18.98/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 50 permit 192.168.18.35/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 51 permit 192.168.18.94/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 52 permit 192.168.18.100/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 53 permit 192.168.18.103/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 54 permit 192.168.18.108/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 55 permit 192.168.18.78/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 56 permit 192.168.18.88/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 57 permit 192.168.18.91/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 58 permit 192.168.18.41/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 59 permit 192.168.18.74/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 60 permit 192.168.18.64/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 61 permit 192.168.18.66/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 62 permit 192.168.18.70/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 63 permit 192.168.18.72/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 64 permit 192.168.18.97/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 65 permit 192.168.18.32/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 66 permit 192.168.18.42/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 67 permit 192.168.18.56/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 68 permit 192.168.18.37/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 69 permit 192.168.18.60/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 70 permit 192.168.18.33/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 71 permit 192.168.18.75/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 72 permit 192.168.18.76/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 73 permit 192.168.18.105/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 74 permit 192.168.18.109/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 75 permit 192.168.18.38/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 76 permit 192.168.18.47/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 77 permit 192.168.18.80/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 78 permit 192.168.18.40/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 79 permit 192.168.18.54/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 80 deny any +ipv6 prefix-list 192.168.18.25-pl-ipv4 seq 81 deny any \ No newline at end of file diff --git a/Regression/crash-in-plist-update/2.conf b/Regression/crash-in-plist-update/2.conf new file mode 100644 index 0000000..86bf89f --- /dev/null +++ b/Regression/crash-in-plist-update/2.conf @@ -0,0 +1,103 @@ +ip prefix-list 192.168.18.24-pl-ipv4 seq 20 permit 192.168.18.47/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 21 permit 192.168.18.80/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 22 permit 192.168.18.40/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 23 permit 192.168.18.54/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 24 permit 192.168.18.89/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 25 permit 192.168.18.68/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 26 permit 192.168.18.69/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 27 permit 192.168.18.83/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 28 permit 192.168.18.48/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 29 permit 192.168.18.107/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 40 permit 192.168.18.92/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 41 permit 192.168.18.95/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 42 permit 192.168.18.99/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 43 permit 192.168.18.110/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 44 permit 192.168.18.39/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 45 permit 192.168.18.61/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 46 permit 192.168.18.81/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 47 permit 192.168.18.102/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 48 permit 192.168.18.58/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 49 permit 192.168.18.77/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 50 permit 192.168.18.79/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 51 permit 192.168.18.84/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 52 permit 192.168.18.86/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 53 permit 192.168.18.90/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 54 permit 192.168.18.30/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 55 permit 192.168.18.57/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 56 permit 192.168.18.62/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 57 permit 192.168.18.71/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 58 permit 192.168.18.96/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 59 permit 192.168.18.34/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 60 permit 192.168.18.43/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 61 permit 192.168.18.55/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 62 permit 192.168.18.87/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 63 permit 192.168.18.101/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 64 permit 192.168.18.44/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 65 permit 192.168.18.46/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 66 permit 192.168.18.82/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 67 permit 192.168.18.63/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 68 permit 192.168.18.93/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 69 permit 192.168.18.98/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 70 permit 192.168.18.35/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 71 permit 192.168.18.94/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 72 permit 192.168.18.100/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 73 permit 192.168.18.103/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 74 permit 192.168.18.108/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 75 permit 192.168.18.78/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 76 permit 192.168.18.88/32 +ip prefix-list 192.168.18.24-pl-ipv4 seq 77 deny any +ipv6 prefix-list 192.168.18.24-pl-ipv4 seq 78 deny any +ip prefix-list 192.168.18.25-pl-ipv4 seq 20 permit 192.168.18.47/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 21 permit 192.168.18.80/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 22 permit 192.168.18.40/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 23 permit 192.168.18.54/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 24 permit 192.168.18.89/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 25 permit 192.168.18.68/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 26 permit 192.168.18.69/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 27 permit 192.168.18.83/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 28 permit 192.168.18.48/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 29 permit 192.168.18.107/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 35 permit 192.168.18.106/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 36 permit 192.168.18.31/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 37 permit 192.168.18.45/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 38 permit 192.168.18.65/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 39 permit 192.168.18.67/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 40 permit 192.168.18.92/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 41 permit 192.168.18.95/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 42 permit 192.168.18.99/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 43 permit 192.168.18.110/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 44 permit 192.168.18.39/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 45 permit 192.168.18.61/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 46 permit 192.168.18.81/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 47 permit 192.168.18.102/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 48 permit 192.168.18.58/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 49 permit 192.168.18.77/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 50 permit 192.168.18.79/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 51 permit 192.168.18.84/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 52 permit 192.168.18.86/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 53 permit 192.168.18.90/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 54 permit 192.168.18.30/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 55 permit 192.168.18.57/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 56 permit 192.168.18.62/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 57 permit 192.168.18.71/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 58 permit 192.168.18.96/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 59 permit 192.168.18.34/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 60 permit 192.168.18.43/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 61 permit 192.168.18.55/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 62 permit 192.168.18.87/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 63 permit 192.168.18.101/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 64 permit 192.168.18.44/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 65 permit 192.168.18.46/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 66 permit 192.168.18.82/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 67 permit 192.168.18.63/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 68 permit 192.168.18.93/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 69 permit 192.168.18.98/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 70 permit 192.168.18.35/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 71 permit 192.168.18.94/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 72 permit 192.168.18.100/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 73 permit 192.168.18.103/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 74 permit 192.168.18.108/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 75 permit 192.168.18.78/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 76 permit 192.168.18.88/32 +ip prefix-list 192.168.18.25-pl-ipv4 seq 77 deny any +ipv6 prefix-list 192.168.18.25-pl-ipv4 seq 78 deny any \ No newline at end of file diff --git a/Regression/crash-in-plist-update/daemons b/Regression/crash-in-plist-update/daemons new file mode 100644 index 0000000..754897b --- /dev/null +++ b/Regression/crash-in-plist-update/daemons @@ -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=yes +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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. \ No newline at end of file diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf new file mode 100644 index 0000000..a8a0ad1 --- /dev/null +++ b/Regression/crash-in-plist-update/main.fmf @@ -0,0 +1,33 @@ +summary: crash in plist update +description: '' +contact: František Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +duration: 15m +enabled: true +tag: + - Acceptance +link: + - verifies: https://issues.redhat.com/browse/RHEL-12039 + - verifies: https://issues.redhat.com/browse/RHEL-13873 + - verifies: https://issues.redhat.com/browse/RHEL-13872 + - verifies: https://issues.redhat.com/browse/RHEL-13871 + - verifies: https://issues.redhat.com/browse/RHEL-13870 + - verifies: https://issues.redhat.com/browse/RHEL-13869 + - verifies: https://issues.redhat.com/browse/RHEL-13868 +tier: '1' +adjust: + - enabled: false + when: distro < rhel-8 + continue: false + - enabled: false + when: distro < rhel-8.6 + continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 + because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7' \ No newline at end of file diff --git a/Regression/crash-in-plist-update/run.sh b/Regression/crash-in-plist-update/run.sh new file mode 100644 index 0000000..376dddd --- /dev/null +++ b/Regression/crash-in-plist-update/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +for j in {0..1}; do for f in *.conf; do echo; echo; echo; echo === $f ===; date; python3 /usr/$DIR/frr/frr-reload.py --reload --overwrite --stdout $f; sleep 1; done; done \ No newline at end of file diff --git a/Regression/crash-in-plist-update/test.sh b/Regression/crash-in-plist-update/test.sh new file mode 100755 index 0000000..84931dc --- /dev/null +++ b/Regression/crash-in-plist-update/test.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + TestDir=$(pwd) + rlAssertRpm frr + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + rlRun "cp $TestDir/daemons /etc/frr/" + rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" + cp $TestDir/run.sh ./ + cp $TestDir//1.conf ./ + cp $TestDir/2.conf ./ + rlRun "chmod +x run.sh" + + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then + DIR="libexec" + else + DIR="lib" + fi + + rlRun "sed -i 's/\$DIR/$DIR/g' run.sh" + rlPhaseEnd + + rlPhaseStartTest + rlServiceStart "frr" + sleep 5 + for i in {1..10} + do + ./run.sh &>> run.log & + PID=$! + sleep 30s + + # First check vtysh + rlRun "ps aux | grep \"vtysh\" | grep \"reload\" | grep -v \"grep\"" 1 "Checking if vtysh stuck" + # Second check if run script still running + if ps -p $PID > /dev/null + then + rlFail "Stucked after $i. run" + break + fi + done + rlPhaseEnd + + rlPhaseStartCleanup + if ps -p $PID > /dev/null + then + kill -9 $PID + fi + rlServiceRestore "frr" + rlFileRestore + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 0eff2b20a2cb5aa10f7d1c1cb481d45cf4ecbbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 20 Oct 2023 13:45:30 +0200 Subject: [PATCH 28/84] Metadata update /Regression/crash-in-plist-update --- Regression/crash-in-plist-update/main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf index a8a0ad1..063f7f3 100644 --- a/Regression/crash-in-plist-update/main.fmf +++ b/Regression/crash-in-plist-update/main.fmf @@ -30,4 +30,6 @@ 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' \ No newline at end of file + because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 +extra-nitrate: TC#0615911 +id: 9e06b496-08da-4f13-91d8-655729c0b2b3 From a8930abcd91558af9a18abb12961670e90497ca7 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 15 Nov 2023 12:16:19 +0100 Subject: [PATCH 29/84] Adding a new test with network namespaces --- .../daemons-vnc | 121 ++++++++++ .../daemons-vns | 121 ++++++++++ .../frr-vnc-reload.conf | 20 ++ .../frr-vnc.conf | 19 ++ .../frr-vnc.service | 25 ++ .../frr-vns.conf | 23 ++ .../frr-vns.service | 25 ++ .../main.fmf | 11 + .../runtest.sh | 225 ++++++++++++++++++ .../vtysh-vnc.conf | 1 + .../vtysh-vns.conf | 1 + 11 files changed, 592 insertions(+) create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf create mode 100755 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf create mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc new file mode 100644 index 0000000..b93dd82 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc @@ -0,0 +1,121 @@ +# 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=yes +ospf6d=yes +ripd=yes +ripngd=yes +isisd=yes +pimd=yes +pim6d=yes +nhrpd=yes +eigrpd=yes +sharpd=yes +pbrd=yes +bfdd=yes +fabricd=yes +vrrpd=yes +pathd=yes + +# +# 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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns new file mode 100644 index 0000000..ebaa519 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns @@ -0,0 +1,121 @@ +# 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=yes +ospf6d=yes +ripd=yes +ripngd=yes +isisd=yes +pimd=yes +pim6d=yes +nhrpd=yes +eigrpd=yes +sharpd=yes +pbrd=yes +bfdd=yes +fabricd=yes +vrrpd=yes +pathd=yes + +# +# 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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf new file mode 100644 index 0000000..1d77df3 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf @@ -0,0 +1,20 @@ +hostname RouterVNC + +log file debug +! -*- bgp -*- +! +router bgp 7676 + bgp router-id + neighbor remote-as 7676 + neighbor timers 10 60 + ! + address-family ipv4 unicast + neighbor route-map deny-all-in in + exit-address-family +! +! +route-map deny-all-in deny 20 +route-map deny-all-in permit 20 +! +line vty +! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf new file mode 100644 index 0000000..cef7364 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf @@ -0,0 +1,19 @@ +hostname RouterVNC + +log file debug +! -*- bgp -*- +! +router bgp 7676 + bgp router-id + neighbor remote-as 7676 + neighbor timers 10 60 + ! + address-family ipv4 unicast + neighbor route-map deny-all-in in + exit-address-family +! +! +route-map deny-all-in deny 20 +! +line vty +! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service new file mode 100644 index 0000000..8ce3c85 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc + +[Install] +WantedBy=multi-user.target diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf new file mode 100644 index 0000000..fb5e9b4 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf @@ -0,0 +1,23 @@ +frr version 7.5.1 +frr defaults traditional +hostname RouterVNS +! +log file debug +! +! Interface's description. +! +interface + link-detect + +interface + link-detect +! +router bgp 7676 + bgp router-id + network / + neighbor remote-as 7676 + neighbor timers 10 60 +! +line vty +! +! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service new file mode 100644 index 0000000..d9fa54f --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns + +[Install] +WantedBy=multi-user.target diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf new file mode 100644 index 0000000..16483f7 --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -0,0 +1,11 @@ +summary: Testing netns for multiple BGP instances when testing FRR +description: '' +component: + - frr +test: ./runtest.sh +framework: beakerlib +require: + - frr +duration: 5m +link: + - relates: https://issues.redhat.com/browse/RHEL-6583 diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh new file mode 100755 index 0000000..1f7526c --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -0,0 +1,225 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of +# Description: Test that frr correctly changes inbound route filter after a config reload +# Author: Michal Ruprich +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +vnSIDE='server' +vnSERVER_IFACE='VNS' +vnCLIENT_IFACE='VNC' +vnSERVER_NAMESPACE='vns' +vnCLIENT_NAMESPACE='vnc' + +#Very simple case where we need two routers R1 and R2 to establish neighborship and send some data +SRV_DUMMY1_IF_NAME="dummy1" +SRV_DUMMY1_IF_ADDR="192.168.212.1" +SRV_DUMMY1_IF_NETWORK="192.168.212.0" +SRV_DUMMY1_IF_PREFIX="24" +SRV_DUMMY1_IF_BCAST="192.168.212.255" + +SERVER_IF_ADDR="192.168.222.240" +SERVER_IF_PREFIX="31" +SERVER_IF_BCAST="255.255.255.255" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.241" +CLIENT_IF_PREFIX="31" +CLIENT_IF_BCAST="255.255.255.255" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +#These functions help with setting up the network namespaces +vnCreateServerClientNetwork() +{ + rlRun "ip link add ${vnSERVER_IFACE} type veth peer name ${vnCLIENT_IFACE}" 0 "Creating network ifaces for SERVER: '${vnSERVER_IFACE}' and CLIENT: '${vnCLIENT_IFACE}'." + + rlRun "ip netns add ${vnSERVER_NAMESPACE}" 0 "Creating SERVER namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip netns add ${vnCLIENT_NAMESPACE}" 0 "Creating CLIENT namespace: '${vnCLIENT_NAMESPACE}'." + + rlRun "ip link set ${vnSERVER_IFACE} netns ${vnSERVER_NAMESPACE}" 0 "Adding iface: '${vnSERVER_IFACE}' into the namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip link set ${vnCLIENT_IFACE} netns ${vnCLIENT_NAMESPACE}" 0 "Adding iface: '${vnCLIENT_IFACE}' into the namespace: '${vnCLIENT_NAMESPACE}'." +} + +vnRemoveServerClientNetwork() +{ + rlRun "ip netns exec ${vnSERVER_NAMESPACE} ip link del ${vnSERVER_IFACE}" 0 "Removing network for SERVER and CLIENT." + + rlRun "ip netns del ${vnSERVER_NAMESPACE}" 0 "Removing SERVER namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip netns del ${vnCLIENT_NAMESPACE}" 0 "Removing CLIENT namespace: '${vnCLIENT_NAMESPACE}'." +} + +vnRunServer() +{ + local command="$1" + local ret_val="${2:-0}" + local message="${3:-Running command on the SERVER: '${command}'}" + + rlRun "ip netns exec ${vnSERVER_NAMESPACE} ${command}" "$ret_val" "$message" +} + +vnRunClient() +{ + local command="$1" + local ret_val="${2:-0}" + local message="${3:-Running command on the CLIENT: '${command}'}" + + rlRun "ip netns exec ${vnCLIENT_NAMESPACE} ${command}" "$ret_val" "$message" +} + +vnRun() +{ + if [ "$vnSIDE" = 'server' ]; then + vnRunServer "$1" "$2" "$3" + elif [ "$vnSIDE" = 'client' ]; then + vnRunClient "$1" "$2" "$3" + else + rlLogError "'vnSIDE' variable is not set properly." + fi +} + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + # set up network + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + # client IP is not configured here, as the only way how to trigger warning is to configure the IP while zebra is already running + vnRunServer "ip link add ${SRV_DUMMY1_IF_NAME} type dummy" 0 "Adding dummy interface on the SERVER side" + vnRunServer "ip link set ${SRV_DUMMY1_IF_NAME} up" 0 "Setting the dummy interface UP" + vnRunServer "ip addr add ${SRV_DUMMY1_IF_ADDR}/${SRV_DUMMY1_IF_PREFIX} dev ${SRV_DUMMY1_IF_NAME}" 0 "Configuring IPv4 address on dummy interface of the SERVER side" + + rlFileBackup --clean "/etc/frr/" + rlFileBackup --clean "/etc/systemd/system/" + rlFileBackup --clean "/var/log/frr/" + rlRun "mkdir /etc/frr/{vns,vnc}" + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f frr-vnc-reload.conf ${CLIENT_CONF_DIR}frr-vnc-reload.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${vnSERVER_IFACE}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SRV_DUMMY1_IF_NAME}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SRV_DUMMY1_IF_NETWORK}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SRV_DUMMY1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr-vnc-reload.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" + + vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" + vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" + # THIS IS THE ONLY BUG THAT CAN BE REPRODUCED, everything else works... + rlAssertNotGrep "warning: interface ${vnCLIENT_IFACE} broadcast addr ${CLIENT_IF_BCAST}/${CLIENT_IF_PREFIX} != calculated ${SERVER_IF_ADDR}, routing protocols may malfunction" "${CLIENT_FRR_LOG}" + + rlRun "sleep 30" 0 "Waiting for BGP peers to exchange routes and converge" + + #First let's see that the neighborship is established + rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP neighbor is ${CLIENT_IF_ADDR}\"" 0 "Show BGP neighborship on SERVER" + rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "BGP neighborship on SERVER is Established" + rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP neighbor is ${SERVER_IF_ADDR}\"" 0 "Show BGP neighborship on CLIENT" + rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "GP neighborship on CLIENT is Established" + + #At first, the route to the advertised network should be visible ONLY on the SERVER, CLIENT has filter + rlRun -s "vtysh -N vns -c 'show ip route' | grep \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX} is directly connected\"" 0 "Show routes on SERVER" + rlRun -s "vtysh -N vnc -c 'show ip route' | grep -v \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX}\"" 0 "Show routes on CLIENT" + + #Reload CLIENT config with permit clause in the prefix-list + rlRun "/usr/libexec/frr/frr-reload.py -N vnc --reload ${CLIENT_CONF_DIR}frr-vnc-reload.conf" + + rlRun "vtysh -N vnc -c 'sh ip route'" + rlRun "sleep 30" 0 "Waiting for the routes to exchange" + rlRun "vtysh -N vnc -c 'sh ip route'" + + #Check that the route from SERVER is available + rlRun -s "vtysh -N vnc -c 'show ip route' | grep \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX}\"" 0 "Show routes on CLIENT" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRunServer "ip link del ${SRV_DUMMY1_IF_NAME} type dummy" + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config From 624eb94b5ec0b91512dbd90b9300e0508bc380ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 15 Nov 2023 14:10:10 +0100 Subject: [PATCH 30/84] Metadata update /Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit --- .../main.fmf | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index 16483f7..44a1036 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -1,11 +1,25 @@ summary: Testing netns for multiple BGP instances when testing FRR -description: '' +description: 'Test that frr correctly changes inbound route filter after a config reload' +contact: František Hrdina component: - frr test: ./runtest.sh framework: beakerlib -require: +recommend: - frr duration: 5m +enabled: true +tag: + - Acceptance link: - - relates: https://issues.redhat.com/browse/RHEL-6583 + - verifies: https://issues.redhat.com/browse/RHEL-6583 +adjust: + - enabled: false + when: distro < rhel-8 + continue: false + - environment+: + AVC_ERROR: +no_avc_check + when: distro ~< rhel-8.7 + because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7' +extra-nitrate: TC#0615943 +id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 From 1e8b6c1eed982a3c24576b242d2f7b7b744cd0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 27 Nov 2023 14:11:22 +0100 Subject: [PATCH 31/84] Tag update /Regression/duplicated-prefix-lists-when-no-seq-is-specified --- .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index aa87c3a..49fe422 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -12,7 +12,8 @@ recommend: duration: 15m enabled: true tag: - - Acceptance + - Tier1 +tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-5116 adjust: From 7dc77afa89961c5d8d57081edd4f465e538c6307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 27 Nov 2023 12:23:15 +0100 Subject: [PATCH 32/84] Updating test and metadata updating test, disabling avc check, updating relevancy /Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit --- .../daemons-vnc | 30 +++++++++---------- .../daemons-vns | 30 +++++++++---------- .../main.fmf | 8 ++--- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc index b93dd82..3b386ba 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc @@ -15,21 +15,21 @@ # The watchfrr, zebra and staticd daemons are always started. # bgpd=yes -ospfd=yes -ospf6d=yes -ripd=yes -ripngd=yes -isisd=yes -pimd=yes -pim6d=yes -nhrpd=yes -eigrpd=yes -sharpd=yes -pbrd=yes -bfdd=yes -fabricd=yes -vrrpd=yes -pathd=yes +ospfd=no +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=no # # If this option is set the /etc/init.d/frr script automatically loads diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns index ebaa519..7a5ec3f 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns @@ -15,21 +15,21 @@ # The watchfrr, zebra and staticd daemons are always started. # bgpd=yes -ospfd=yes -ospf6d=yes -ripd=yes -ripngd=yes -isisd=yes -pimd=yes -pim6d=yes -nhrpd=yes -eigrpd=yes -sharpd=yes -pbrd=yes -bfdd=yes -fabricd=yes -vrrpd=yes -pathd=yes +ospfd=no +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=no # # If this option is set the /etc/init.d/frr script automatically loads diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index 44a1036..3bc1d1b 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -13,13 +13,11 @@ tag: - Acceptance link: - verifies: https://issues.redhat.com/browse/RHEL-6583 +environment: + AVC_ERROR: +no_avc_check adjust: - enabled: false - when: distro < rhel-8 + when: distro < rhel-9 continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 - because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7' extra-nitrate: TC#0615943 id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 From 6a24a3128707d2ffcbf6b646eca2d464db634485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 3 Jan 2024 15:39:39 +0100 Subject: [PATCH 33/84] Metadata update Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit --- .../main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index 3bc1d1b..c8b3159 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -17,7 +17,7 @@ environment: AVC_ERROR: +no_avc_check adjust: - enabled: false - when: distro < rhel-9 + when: distro < rhel-8.10 continue: false extra-nitrate: TC#0615943 id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 From 77bf48f8b546b46c9dc68cc9cdbd4d2e00e558b0 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 3 Jan 2024 14:31:02 +0100 Subject: [PATCH 34/84] Improving testing with new daemon --- Sanity/starting-daemons-test/runtest.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index 2bfdac8..e7a701a 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -42,13 +42,19 @@ rlJournalStart # sharpd is not present until RHEL-8.4 sed -i 's/sharpd=yes/zebra=yes/' daemons sed -i 's/vrrpd=yes/staticd=yes/' daemons + rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file" + else #later RHEL and Fedora + #let's not copy pre-prepared daemons file + #but rather enable all daemons here + sed -i 's/=no/=yes/gi' /etc/frr/daemons fi - rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file" rlPhaseEnd rlPhaseStartTest - if rlIsRHEL '>9' || rlIsFedora || rlIsCentOS '>9'; then - daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" + if rlIsRHEL '>9.3' || rlIsFedora || rlIsCentOS '>9.3'; then + daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pim6d nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" + elif (rlIsRHEL '>9' && rlIsRHEL '<9.4') || (rlIsCentOS '>9' && rlIsCentos '<9.4'); then + daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pim6d nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" elif rlIsRHEL '<8.4'; then daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd" else From ee448e6501c472ba51361035785f127c49276c3b Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Thu, 4 Jan 2024 08:55:30 +0100 Subject: [PATCH 35/84] Make the daemons selection more dynamic --- Sanity/starting-daemons-test/runtest.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index e7a701a..9eb691b 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -51,22 +51,16 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - if rlIsRHEL '>9.3' || rlIsFedora || rlIsCentOS '>9.3'; then - daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pim6d nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" - elif (rlIsRHEL '>9' && rlIsRHEL '<9.4') || (rlIsCentOS '>9' && rlIsCentos '<9.4'); then - daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pim6d nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd pathd" - elif rlIsRHEL '<8.4'; then - daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd" - else - daemons="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd nhrpd eigrpd pbrd staticd bfdd fabricd vrrpd" - fi + #take all daemons in the daemons file except for sharpd + daemons="zebra" + for daemon_name in `grep 'd=yes' /etc/frr/daemons | grep -v sharpd | cut -d '=' -f 1`; do daemons="$daemons $daemon_name"; done rlRun "service frr start" 0 "Starting frr service" sleep 10 rlRun "service frr status &> $SERVICE_LOG" 0 "Creating service log" # No watchfrr by default until RHEL-8.4 if rlIsRHEL '>8.4' || rlIsFedora || rlIsCentOS; then - rlRun "grep -i \"frr/watchfrr -d -F traditional $daemons\" $SERVICE_LOG" 0 "Checking if watchfrr is running" + rlRun "grep -i 'frr/watchfrr -d -F traditional.*zebra' $SERVICE_LOG" 0 "Checking if watchfrr is running" fi for i in $daemons; do From 1d7553dc1f373c22e6cf849140e96195f19cf1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 5 Feb 2024 08:52:12 +0100 Subject: [PATCH 36/84] Test fix Trying to fix the generating AVC's in /Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit, which causes AVC's occuring in following tests --- .../runtest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh index 1f7526c..d4b57fb 100755 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -109,7 +109,7 @@ vnRun() rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - + # Need to disable SeLinux, because it does not allow to start service via unit file # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. rlRun "setenforce 0" 0 "Disabling SELinux" @@ -131,6 +131,7 @@ rlJournalStart rlFileBackup --clean "/etc/frr/" rlFileBackup --clean "/etc/systemd/system/" rlFileBackup --clean "/var/log/frr/" + rlFileBackup --clean "/var/log/audit/audit.log" rlRun "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" From b4df5e25b0a8e4ab2f3448944a4c83cf382aa1a8 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 14 Feb 2024 12:18:49 +0100 Subject: [PATCH 37/84] Adding a test for issue RHEL-13756 --- Regression/set-src-ipv6/daemons-vnc | 121 +++++++++++++ Regression/set-src-ipv6/daemons-vns | 121 +++++++++++++ Regression/set-src-ipv6/frr-vnc.conf | 20 +++ Regression/set-src-ipv6/frr-vnc.service | 25 +++ Regression/set-src-ipv6/frr-vns.conf | 49 ++++++ Regression/set-src-ipv6/frr-vns.service | 25 +++ Regression/set-src-ipv6/main.fmf | 24 +++ Regression/set-src-ipv6/runtest.sh | 225 ++++++++++++++++++++++++ Regression/set-src-ipv6/vtysh-vnc.conf | 1 + Regression/set-src-ipv6/vtysh-vns.conf | 1 + 10 files changed, 612 insertions(+) create mode 100644 Regression/set-src-ipv6/daemons-vnc create mode 100644 Regression/set-src-ipv6/daemons-vns create mode 100644 Regression/set-src-ipv6/frr-vnc.conf create mode 100644 Regression/set-src-ipv6/frr-vnc.service create mode 100644 Regression/set-src-ipv6/frr-vns.conf create mode 100644 Regression/set-src-ipv6/frr-vns.service create mode 100644 Regression/set-src-ipv6/main.fmf create mode 100755 Regression/set-src-ipv6/runtest.sh create mode 100644 Regression/set-src-ipv6/vtysh-vnc.conf create mode 100644 Regression/set-src-ipv6/vtysh-vns.conf diff --git a/Regression/set-src-ipv6/daemons-vnc b/Regression/set-src-ipv6/daemons-vnc new file mode 100644 index 0000000..3b386ba --- /dev/null +++ b/Regression/set-src-ipv6/daemons-vnc @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Regression/set-src-ipv6/daemons-vns b/Regression/set-src-ipv6/daemons-vns new file mode 100644 index 0000000..7a5ec3f --- /dev/null +++ b/Regression/set-src-ipv6/daemons-vns @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Regression/set-src-ipv6/frr-vnc.conf b/Regression/set-src-ipv6/frr-vnc.conf new file mode 100644 index 0000000..9ae2a7c --- /dev/null +++ b/Regression/set-src-ipv6/frr-vnc.conf @@ -0,0 +1,20 @@ +hostname RouterVNC + +log file debugging +! -*- bgp -*- +! +router bgp 65001 + no bgp ebgp-requires-policy + neighbor remote-as external + neighbor ebgp-multihop + ! + address-family ipv6 unicast + neighbor activate + network /128 + network /128 + exit-address-family +exit +! +! +line vty +! diff --git a/Regression/set-src-ipv6/frr-vnc.service b/Regression/set-src-ipv6/frr-vnc.service new file mode 100644 index 0000000..8ce3c85 --- /dev/null +++ b/Regression/set-src-ipv6/frr-vnc.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc + +[Install] +WantedBy=multi-user.target diff --git a/Regression/set-src-ipv6/frr-vns.conf b/Regression/set-src-ipv6/frr-vns.conf new file mode 100644 index 0000000..d307561 --- /dev/null +++ b/Regression/set-src-ipv6/frr-vns.conf @@ -0,0 +1,49 @@ +frr defaults traditional +hostname RouterVNS +! +log file debugging +no ip forwarding +no ipv6 forwarding +! +debug bgp neighbor-events +debug bgp updates in +debug bgp updates out +debug bgp zebra +! +debug route-map +! +! +! +! +router bgp 65000 + no bgp ebgp-requires-policy + neighbor remote-as external + neighbor ebgp-multihop + ! + address-family ipv6 unicast + neighbor activate + exit-address-family +exit +! +ipv6 prefix-list prefix-list-for-datasync seq 5 permit fd00:268:70fd:1001::/64 le 128 +ipv6 prefix-list prefix-list-for-internal seq 15 permit fd00:268:70fd:1000::/64 le 128 +ipv6 prefix-list prefix-list-for-internal seq 20 permit ::/0 +! +route-map set_src_lo permit 5 + match ipv6 address prefix-list prefix-list-for-datasync + set src +exit +! +route-map set_src_lo permit 10 + match ipv6 address prefix-list prefix-list-for-internal + set src +exit +! +route-map set_src_lo permit 20 +exit +! +ipv6 protocol bgp route-map set_src_lo +! +line vty +! +! diff --git a/Regression/set-src-ipv6/frr-vns.service b/Regression/set-src-ipv6/frr-vns.service new file mode 100644 index 0000000..d9fa54f --- /dev/null +++ b/Regression/set-src-ipv6/frr-vns.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns + +[Install] +WantedBy=multi-user.target diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf new file mode 100644 index 0000000..5e67a45 --- /dev/null +++ b/Regression/set-src-ipv6/main.fmf @@ -0,0 +1,24 @@ +summary: Testing the set src clause capability for IPv6 route-map +description: 'Tests whether different set src clauses in one IPv6 route-map command work correctly' +contact: František Hrdina +component: + - frr +test: ./runtest.sh +framework: beakerlib +recommend: + - frr + - tcpdump +duration: 5m +enabled: true +tag: + - Acceptance +link: + - verifies: https://issues.redhat.com/browse/RHEL-13756 +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-8.10 + continue: false +extra-nitrate: TC#0615943 +id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh new file mode 100755 index 0000000..85e8e75 --- /dev/null +++ b/Regression/set-src-ipv6/runtest.sh @@ -0,0 +1,225 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of +# Description: Test that frr correctly changes inbound route filter after a config reload +# Author: Michal Ruprich +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="frr" + +vnSIDE='server' +vnSERVER_IFACE='VNS' +vnCLIENT_IFACE='VNC' +vnSERVER_NAMESPACE='vns' +vnCLIENT_NAMESPACE='vnc' + +SERVER_IF_ADDR="192.168.222.240" +SERVER_IF_PREFIX="31" +SERVER_IF_BCAST="255.255.255.255" + +SERVER_IF_IPV6_ADDR_1="fd00:268:70fd:1000::3:e003" +SERVER_IF_IPV6_ADDR_2="fd00:268:70fd:1001::3:e003" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.241" +CLIENT_IF_PREFIX="31" +CLIENT_IF_BCAST="255.255.255.255" + +CLIENT_IF_IPV6_ADDR_1="fd00:268:70fd:1000::3:e001" +CLIENT_IF_IPV6_ADDR_2="fd00:268:70fd:1001::3:e001" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +MAIN_LOG="/tmp/log_routes" + +#These functions help with setting up the network namespaces +vnCreateServerClientNetwork() +{ + rlRun "ip link add ${vnSERVER_IFACE} type veth peer name ${vnCLIENT_IFACE}" 0 "Creating network ifaces for SERVER: '${vnSERVER_IFACE}' and CLIENT: '${vnCLIENT_IFACE}'." + + rlRun "ip netns add ${vnSERVER_NAMESPACE}" 0 "Creating SERVER namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip netns add ${vnCLIENT_NAMESPACE}" 0 "Creating CLIENT namespace: '${vnCLIENT_NAMESPACE}'." + + rlRun "ip link set ${vnSERVER_IFACE} netns ${vnSERVER_NAMESPACE}" 0 "Adding iface: '${vnSERVER_IFACE}' into the namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip link set ${vnCLIENT_IFACE} netns ${vnCLIENT_NAMESPACE}" 0 "Adding iface: '${vnCLIENT_IFACE}' into the namespace: '${vnCLIENT_NAMESPACE}'." +} + +vnRemoveServerClientNetwork() +{ + rlRun "ip netns exec ${vnSERVER_NAMESPACE} ip link del ${vnSERVER_IFACE}" 0 "Removing network for SERVER and CLIENT." + + rlRun "ip netns del ${vnSERVER_NAMESPACE}" 0 "Removing SERVER namespace: '${vnSERVER_NAMESPACE}'." + rlRun "ip netns del ${vnCLIENT_NAMESPACE}" 0 "Removing CLIENT namespace: '${vnCLIENT_NAMESPACE}'." +} + +vnRunServer() +{ + local command="$1" + local ret_val="${2:-0}" + local message="${3:-Running command on the SERVER: '${command}'}" + + rlRun "ip netns exec ${vnSERVER_NAMESPACE} ${command}" "$ret_val" "$message" +} + +vnRunClient() +{ + local command="$1" + local ret_val="${2:-0}" + local message="${3:-Running command on the CLIENT: '${command}'}" + + rlRun "ip netns exec ${vnCLIENT_NAMESPACE} ${command}" "$ret_val" "$message" +} + +vnRun() +{ + if [ "$vnSIDE" = 'server' ]; then + vnRunServer "$1" "$2" "$3" + elif [ "$vnSIDE" = 'client' ]; then + vnRunClient "$1" "$2" "$3" + else + rlLogError "'vnSIDE' variable is not set properly." + fi +} + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunServer "ip addr add ${SERVER_IF_IPV6_ADDR_1}/128 dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" + vnRunServer "ip addr add ${SERVER_IF_IPV6_ADDR_2}/128 dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" + + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + vnRunClient "ip addr add ${CLIENT_IF_IPV6_ADDR_1}/128 dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + vnRunClient "ip addr add ${CLIENT_IF_IPV6_ADDR_2}/128 dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + rlRun "ip a" + vnRunClient "ip a" + vnRunServer "ip a" + + rlFileBackup --clean "/etc/frr/" + rlFileBackup --clean "/etc/systemd/system/" + rlFileBackup --clean "/var/log/frr/" + rlFileBackup --clean "/var/log/audit/audit.log" + rlRun "mkdir /etc/frr/{vns,vnc}" + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_IPV6_ADDR_1}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_IPV6_ADDR_2}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "cat ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_IPV6_ADDR_1}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_IPV6_ADDR_2}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "cat ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" + vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" + + rlRun "sleep 30" 0 "Waiting for BGP peers to exchange routes and converge" + + #First let's see that the neighborship is established + rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP neighbor is ${CLIENT_IF_ADDR}\"" 0 "Show BGP neighborship on SERVER" + rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "BGP neighborship on SERVER is Established" + rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP neighbor is ${SERVER_IF_ADDR}\"" 0 "Show BGP neighborship on CLIENT" + rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "GP neighborship on CLIENT is Established" + + #Both CLIENT IPv6 addresses should have been propagated to the SERVER + rlRun -s "vtysh -N vns -c 'show ipv6 route'" + rlRun -s "vtysh -N vns -c 'show ipv6 route' | grep \"B>\* ${CLIENT_IF_IPV6_ADDR_1}\"" 0 "Show routes on SERVER" + rlRun -s "vtysh -N vns -c 'show ipv6 route' | grep \"B>\* ${CLIENT_IF_IPV6_ADDR_2}\"" 0 "Show routes on SERVER" + + # route to client should have a proper src set + vnRunServer "ip -6 route" &> ${MAIN_LOG} + + rlRun "grep \"${CLIENT_IF_IPV6_ADDR_1}.*bgp src ${SERVER_IF_IPV6_ADDR_1}\" ${MAIN_LOG}" + rlRun "grep \"${CLIENT_IF_IPV6_ADDR_2}.*bgp src ${SERVER_IF_IPV6_ADDR_2}\" ${MAIN_LOG}" + cat ${MAIN_LOG} + + + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/set-src-ipv6/vtysh-vnc.conf b/Regression/set-src-ipv6/vtysh-vnc.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Regression/set-src-ipv6/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config diff --git a/Regression/set-src-ipv6/vtysh-vns.conf b/Regression/set-src-ipv6/vtysh-vns.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Regression/set-src-ipv6/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config From 4fa225028c5548ae7d4cd5e41a8b934632429e6f Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 14 Feb 2024 12:25:04 +0100 Subject: [PATCH 38/84] Removing data from main.fmf --- Regression/set-src-ipv6/main.fmf | 2 -- 1 file changed, 2 deletions(-) diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 5e67a45..28a5e83 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -20,5 +20,3 @@ adjust: - enabled: false when: distro < rhel-8.10 continue: false -extra-nitrate: TC#0615943 -id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 From d2e5ead33fbd2692c7b1af9961352d2ad90abe7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 2 Apr 2024 15:54:15 +0200 Subject: [PATCH 39/84] Fixing backup files in namespace test --- .../runtest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh index d4b57fb..630c9f6 100755 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -132,6 +132,8 @@ rlJournalStart rlFileBackup --clean "/etc/systemd/system/" rlFileBackup --clean "/var/log/frr/" rlFileBackup --clean "/var/log/audit/audit.log" + rlFileBackup --clean "/var/run/frr" + rlFileBackup --clean "/run/frr" rlRun "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" From ae4e4206ddf9c907a0fee0b55bdf9cbbce380261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 9 Apr 2024 13:43:02 +0200 Subject: [PATCH 40/84] Updating tags --- Regression/crash-in-plist-update/main.fmf | 2 +- .../main.fmf | 3 ++- .../main.fmf | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf index 063f7f3..753669c 100644 --- a/Regression/crash-in-plist-update/main.fmf +++ b/Regression/crash-in-plist-update/main.fmf @@ -10,7 +10,7 @@ recommend: duration: 15m enabled: true tag: - - Acceptance + - Tier1 link: - verifies: https://issues.redhat.com/browse/RHEL-12039 - verifies: https://issues.redhat.com/browse/RHEL-13873 diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index 241fe47..fb14a07 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -14,7 +14,8 @@ recommend: duration: 15m enabled: true tag: - - Acceptance + - Tier1 +tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-11666 - verifies: https://issues.redhat.com/browse/RHEL-11667 diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index c8b3159..af88382 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -10,7 +10,8 @@ recommend: duration: 5m enabled: true tag: - - Acceptance + - Tier1 +tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-6583 environment: From 7cb4a6bc7a88a12ede08c82dda4bb874a9671f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 11 Apr 2024 14:22:15 +0200 Subject: [PATCH 41/84] Update of set-src-ipv6 test /Regression/set-src-ipv6 Update of backup before the test metadata update --- Regression/set-src-ipv6/main.fmf | 3 ++- Regression/set-src-ipv6/runtest.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 28a5e83..4b5767a 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -11,7 +11,8 @@ recommend: duration: 5m enabled: true tag: - - Acceptance + - Tier1 +tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-13756 environment: diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh index 85e8e75..5a056ef 100755 --- a/Regression/set-src-ipv6/runtest.sh +++ b/Regression/set-src-ipv6/runtest.sh @@ -140,6 +140,8 @@ rlJournalStart rlFileBackup --clean "/etc/systemd/system/" rlFileBackup --clean "/var/log/frr/" rlFileBackup --clean "/var/log/audit/audit.log" + rlFileBackup --clean "/var/run/frr" + rlFileBackup --clean "/run/frr" rlRun "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" From 57f9d5bb24eeb91bc4a818e083061de7ad35c1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 11 Apr 2024 14:44:18 +0200 Subject: [PATCH 42/84] Updating relevancy of duplicated-prefix-lists test /Regression/duplicated-prefix-lists-when-no-seq-is-specified --- .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index 49fe422..ac4d989 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -23,6 +23,9 @@ adjust: - enabled: false when: distro < rhel-8.6 continue: false + - enabled: false + when: distro >= fedora-40 + continue: false - environment+: AVC_ERROR: +no_avc_check when: distro ~< rhel-8.7 From f4bec752c2dd8e4c894a3aada580fdeb7a558a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 11 Apr 2024 14:50:03 +0200 Subject: [PATCH 43/84] Metadata update /Regression/set-src-ipv6 --- Regression/set-src-ipv6/main.fmf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 4b5767a..bc6bd79 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -1,5 +1,6 @@ summary: Testing the set src clause capability for IPv6 route-map -description: 'Tests whether different set src clauses in one IPv6 route-map command work correctly' +description: Tests whether different set src clauses in one IPv6 route-map command + work correctly contact: František Hrdina component: - frr @@ -21,3 +22,5 @@ adjust: - enabled: false when: distro < rhel-8.10 continue: false +extra-nitrate: TC#0617416 +id: 669cf94c-af1b-4d3f-8ef2-23835cfcb01f \ No newline at end of file From fd3ba14f79453e9193a2cb7863e2cc82fee85a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 16 Apr 2024 13:26:30 +0200 Subject: [PATCH 44/84] Disabling tests Regression/duplicated-prefix-lists-when-no-seq-is-specified Regression/set-src-ipv6 --- .../main.fmf | 6 ++++++ Regression/set-src-ipv6/main.fmf | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index ac4d989..8d46684 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -23,6 +23,12 @@ adjust: - enabled: false when: distro < rhel-8.6 continue: false + - enabled: false + when: distro == rhel-10 + continue: false + - enabled: false + when: distro == centos-stream-10 + continue: false - enabled: false when: distro >= fedora-40 continue: false diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index bc6bd79..7ed5fdd 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -10,7 +10,7 @@ recommend: - frr - tcpdump duration: 5m -enabled: true +enabled: false tag: - Tier1 tier: '1' From 92a5772d73440e546c2f4d2fed320812e1987222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 2 May 2024 13:30:28 +0200 Subject: [PATCH 45/84] Adjusting relevancy /Regression/duplicated-prefix-lists-when-no-seq-is-specified --- .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index 8d46684..97914b8 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -24,10 +24,10 @@ adjust: when: distro < rhel-8.6 continue: false - enabled: false - when: distro == rhel-10 + when: distro >= rhel-10 continue: false - enabled: false - when: distro == centos-stream-10 + when: distro >= centos-stream-10 continue: false - enabled: false when: distro >= fedora-40 From da031a163dd130483c72b7306d9fb2856a598b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 22 May 2024 09:33:46 +0200 Subject: [PATCH 46/84] Add fmf plans --- plans/others.fmf | 20 ++++++++++++++++++++ plans/tier1.fmf | 20 ++++++++++++++++++++ plans/tier2-tier3.fmf | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 plans/others.fmf create mode 100644 plans/tier1.fmf create mode 100644 plans/tier2-tier3.fmf diff --git a/plans/others.fmf b/plans/others.fmf new file mode 100644 index 0000000..81e3703 --- /dev/null +++ b/plans/others.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: "https://src.fedoraproject.org/tests/frr.git" + execute: + how: tmt + +/internal: + summary: Internal other tests + discover: + how: fmf + filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' + url: git://pkgs.devel.redhat.com/tests/frr + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt \ No newline at end of file diff --git a/plans/tier1.fmf b/plans/tier1.fmf new file mode 100644 index 0000000..b803303 --- /dev/null +++ b/plans/tier1.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: "https://src.fedoraproject.org/tests/frr.git" + execute: + how: tmt + +/internal: + summary: Internal Tier1 tests + discover: + how: fmf + filter: 'tier: 1' + url: git://pkgs.devel.redhat.com/tests/frr + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf new file mode 100644 index 0000000..0bfd8f5 --- /dev/null +++ b/plans/tier2-tier3.fmf @@ -0,0 +1,20 @@ +/public: + summary: Public Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: "https://src.fedoraproject.org/tests/frr.git" + execute: + how: tmt + +/internal: + summary: Internal Tier2 and Tier3 tests + discover: + how: fmf + filter: 'tier: 2 | tier: 3' + url: git://pkgs.devel.redhat.com/tests/frr + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt From 0929391cb3c3d03e6363eafe0850529e8c0c673c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 13 Jun 2024 13:59:42 +0200 Subject: [PATCH 47/84] Improve of FileBackups --- .../runtest.sh | 8 +++++++- Regression/bfd-crash-in-MetalLB/test.sh | 8 +++++++- Regression/crash-in-plist-update/test.sh | 8 +++++++- .../test.sh | 8 +++++++- .../test.sh | 8 +++++++- .../runtest.sh | 8 +++++++- .../runtest.sh | 8 +++++++- .../runtest.sh | 8 +++++++- .../runtest.sh | 13 +++++++------ Regression/set-src-ipv6/runtest.sh | 13 +++++++------ .../runtest.sh | 8 +++++++- Sanity/initscript/runtest.sh | 8 +++++++- Sanity/starting-daemons-test/runtest.sh | 8 +++++++- Sanity/vtysh/extcommunity-list/runtest.sh | 8 +++++++- 14 files changed, 98 insertions(+), 24 deletions(-) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh index 446e73f..73fe284 100755 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh @@ -33,7 +33,13 @@ PACKAGE="frr" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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 daemons /etc/frr/daemons" 0 "Placing frr daemon file" rlServiceStart "frr" sleep 5 diff --git a/Regression/bfd-crash-in-MetalLB/test.sh b/Regression/bfd-crash-in-MetalLB/test.sh index 403e58b..5248c1b 100755 --- a/Regression/bfd-crash-in-MetalLB/test.sh +++ b/Regression/bfd-crash-in-MetalLB/test.sh @@ -9,7 +9,13 @@ rlJournalStart TestDir=$(pwd) rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" - rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + 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/daemons /etc/frr/daemons" 0 "Placing daemons" cat /etc/frr/daemons rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" diff --git a/Regression/crash-in-plist-update/test.sh b/Regression/crash-in-plist-update/test.sh index 84931dc..9e4a873 100755 --- a/Regression/crash-in-plist-update/test.sh +++ b/Regression/crash-in-plist-update/test.sh @@ -8,7 +8,13 @@ rlJournalStart rlAssertRpm frr rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" - rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + 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 $TestDir/daemons /etc/frr/" rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" cp $TestDir/run.sh ./ diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh index 44a72d0..2facc8f 100755 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh @@ -8,7 +8,13 @@ rlJournalStart TestDir=$(pwd) rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" - rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + 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 "touch /etc/frr/frr.conf" 0 "Creating empty config" rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" rlPhaseEnd diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh index d0f1529..8929373 100755 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh @@ -8,7 +8,13 @@ rlJournalStart TestDir=$(pwd) rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" rlRun "pushd $tmp" - rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + 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/daemons /etc/frr/daemons" 0 "Placing daemons" rlRun "cp -f $TestDir/frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf" rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh index b91871c..97d9a14 100755 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh @@ -34,7 +34,13 @@ LOG="ospfd.log" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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 "sed -i s/'ospfd=no'/'ospfd=yes'/g /etc/frr/daemons" 0 "Setting up ospfd daemon" rlRun "systemctl start frr" 0 "Running frr service" diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh index 6182aea..7750ed1 100755 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh @@ -36,7 +36,13 @@ rlJournalStart rlRun "ip link add dummy1 type dummy" 0 "Adding dummy1 interface" rlRun "ip address add 192.168.101.1/24 dev dummy1" 0 "Setting up dummy1 interface" rlRun "ip link set dummy1 up" 0 "Bring up dummy1 interface" - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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 daemons /etc/frr/daemons" 0 "Placing daemons configuration with ospfd enabled" ROUTER_ID=$(hostname -I | awk '{print $1}') diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh index 1a73cba..8d5d058 100755 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh @@ -34,7 +34,13 @@ rlJournalStart rlPhaseStartSetup TestDir=$(pwd) rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr" 0 "Backuping current configuration" + 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 "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" rlPhaseEnd diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh index 630c9f6..36e6d86 100755 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -128,12 +128,13 @@ rlJournalStart vnRunServer "ip link set ${SRV_DUMMY1_IF_NAME} up" 0 "Setting the dummy interface UP" vnRunServer "ip addr add ${SRV_DUMMY1_IF_ADDR}/${SRV_DUMMY1_IF_PREFIX} dev ${SRV_DUMMY1_IF_NAME}" 0 "Configuring IPv4 address on dummy interface of the SERVER side" - rlFileBackup --clean "/etc/frr/" - rlFileBackup --clean "/etc/systemd/system/" - rlFileBackup --clean "/var/log/frr/" - rlFileBackup --clean "/var/log/audit/audit.log" - rlFileBackup --clean "/var/run/frr" - rlFileBackup --clean "/run/frr" + 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 "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh index 5a056ef..828593a 100755 --- a/Regression/set-src-ipv6/runtest.sh +++ b/Regression/set-src-ipv6/runtest.sh @@ -136,12 +136,13 @@ rlJournalStart vnRunClient "ip a" vnRunServer "ip a" - rlFileBackup --clean "/etc/frr/" - rlFileBackup --clean "/etc/systemd/system/" - rlFileBackup --clean "/var/log/frr/" - rlFileBackup --clean "/var/log/audit/audit.log" - rlFileBackup --clean "/var/run/frr" - rlFileBackup --clean "/run/frr" + 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 "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh b/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh index bd07a73..0964b22 100755 --- a/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh +++ b/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh @@ -33,7 +33,13 @@ PACKAGE="frr" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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 frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf file" rlRun "cp daemons /etc/frr/daemons" 0 "Placing daemons file" rlServiceStart "frr" diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh index 2d5cf75..0644001 100755 --- a/Sanity/initscript/runtest.sh +++ b/Sanity/initscript/runtest.sh @@ -37,7 +37,13 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun "useradd testuserqa" 0 "Add test user" - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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" rlPhaseEnd rlPhaseStartSetup "Prepare" diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index 9eb691b..ca1e436 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -34,7 +34,13 @@ SERVICE_LOG="frr.log" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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" if rlIsRHEL '<8.4'; then # zebra is not started by default until RHEL-8.4 # staticd is not started by default until RHEL-8.4 diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh index 9d4f9b2..a2e9268 100755 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -35,7 +35,13 @@ PACKAGE="frr" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" 0 "Backup of original config files" + 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" touch /etc/frr/bgpd.conf touch /etc/frr/vtysh.conf From 676a67f9c95f76a431f5726d54e04a9b94a67fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 24 Jun 2024 10:50:30 +0200 Subject: [PATCH 48/84] Update fmf plans --- plans/others.fmf | 2 +- plans/selinux.fmf | 23 +++++++++++++++++++++++ plans/tier1.fmf | 2 +- plans/tier2-tier3.fmf | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 plans/selinux.fmf diff --git a/plans/others.fmf b/plans/others.fmf index 81e3703..d286b8f 100644 --- a/plans/others.fmf +++ b/plans/others.fmf @@ -12,7 +12,7 @@ discover: how: fmf filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' - url: git://pkgs.devel.redhat.com/tests/frr + url: https://gitlab.com/redhat/rhel/tests/frr adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/selinux.fmf b/plans/selinux.fmf new file mode 100644 index 0000000..a656200 --- /dev/null +++ b/plans/selinux.fmf @@ -0,0 +1,23 @@ +/frr-selinux: + summary: FRR selinux test + discover: + how: fmf + filter: '/Sanity/Selinux-sanity-test' + url: https://gitlab.com/redhat/rhel/tests/frr + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt + +/selinux-policy: + summary: FRR selinux-policy test + discover: + how: fmf + filter: '/Regression/frr-and-similar' + url: https://gitlab.com/redhat/rhel/tests/frr + adjust: + enabled: false + when: distro == centos-stream or distro == fedora + execute: + how: tmt diff --git a/plans/tier1.fmf b/plans/tier1.fmf index b803303..3a32ba9 100644 --- a/plans/tier1.fmf +++ b/plans/tier1.fmf @@ -12,7 +12,7 @@ discover: how: fmf filter: 'tier: 1' - url: git://pkgs.devel.redhat.com/tests/frr + url: https://gitlab.com/redhat/rhel/tests/frr adjust: enabled: false when: distro == centos-stream or distro == fedora diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf index 0bfd8f5..419521c 100644 --- a/plans/tier2-tier3.fmf +++ b/plans/tier2-tier3.fmf @@ -12,7 +12,7 @@ discover: how: fmf filter: 'tier: 2 | tier: 3' - url: git://pkgs.devel.redhat.com/tests/frr + url: https://gitlab.com/redhat/rhel/tests/frr adjust: enabled: false when: distro == centos-stream or distro == fedora From 81fe2bcf2a065bb3164eff2bf80a13bbe22fd927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 10 Oct 2024 16:32:18 +0200 Subject: [PATCH 49/84] Add test for RHEL-59899 --- .../main.fmf | 20 +++++++++ .../test.sh | 42 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 Regression/replace-network-manager-patch-in-the-current-version/main.fmf create mode 100755 Regression/replace-network-manager-patch-in-the-current-version/test.sh diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf new file mode 100644 index 0000000..f76d348 --- /dev/null +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -0,0 +1,20 @@ +summary: Replace NetworkManager patch in the current version +description: '' +contact: František Hrdina +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-59899 +adjust: + - enabled: false + when: distro < rhel-7 + continue: false diff --git a/Regression/replace-network-manager-patch-in-the-current-version/test.sh b/Regression/replace-network-manager-patch-in-the-current-version/test.sh new file mode 100755 index 0000000..5af602e --- /dev/null +++ b/Regression/replace-network-manager-patch-in-the-current-version/test.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + 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 "systemctl start frr" 0 "Starting frr" + rlServiceStart "frr" + rlRun "nmcli connection add type dummy ifname dummy0 ipv4.method manual ipv4.method manual ipv4.addresses 192.168.44.1/24" 0 "Create dummy interface" + + rlPhaseEnd + + rlPhaseStartTest + rlRun "vtysh -c 'sh ip route' &> routes.log" + + rlAssertGrep "C>\* 192.168.44.0/24" routes.log + if rlIsFedora || rlIsRHELLike '>=10'; then + rlAssertGrep "L>\* 192.168.44.1/32" routes.log + fi + + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "frr" + rlFileRestore + rlRun "nmcli connection delete dummy-dummy0" 0 "Remove dummy interface" + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 1ec5fa16cc180865b70d8ffcdd23362443099487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 10 Oct 2024 17:32:35 +0200 Subject: [PATCH 50/84] Metadata update of test for RHEL-59899 --- .../main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf index f76d348..33e641d 100644 --- a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -16,5 +16,7 @@ link: - verifies: https://issues.redhat.com/browse/RHEL-59899 adjust: - enabled: false - when: distro < rhel-7 + when: distro < rhel-8 continue: false +extra-nitrate: TC#0617903 +id: 0215332f-4f51-4e88-8881-9deea50404bd \ No newline at end of file From e9d48a1ace6bd828347cfe9edbf16ca7b8d9ee9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 26 Nov 2024 15:06:32 +0100 Subject: [PATCH 51/84] QE owner format update --- .../FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf | 2 +- Regression/bfd-crash-in-MetalLB/main.fmf | 2 +- Regression/crash-in-plist-update/main.fmf | 2 +- .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 2 +- .../main.fmf | 2 +- .../frr-scriptlet-fails-line-15-hostname-command/main.fmf | 2 +- .../ospfd-crashes-in-route-node-delete-with-assertion/main.fmf | 2 +- .../ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf | 2 +- .../main.fmf | 2 +- .../main.fmf | 2 +- .../main.fmf | 2 +- Regression/set-src-ipv6/main.fmf | 2 +- Regression/vtysh-running-config-output-not-showing-bgp/main.fmf | 2 +- Sanity/initscript/main.fmf | 2 +- Sanity/starting-daemons-test/main.fmf | 2 +- Sanity/vtysh/extcommunity-list/main.fmf | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index bd0bef3..c4996e4 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) description: | Bug summary: FRR: Unable to configure OSPF in multi-instance mode Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf index 291d388..95cce51 100644 --- a/Regression/bfd-crash-in-MetalLB/main.fmf +++ b/Regression/bfd-crash-in-MetalLB/main.fmf @@ -1,6 +1,6 @@ summary: Testing if frr not crash when reloading with specific configs description: 'Reloading frr with specific bfd configs caused segfaults' -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf index 753669c..8924cb4 100644 --- a/Regression/crash-in-plist-update/main.fmf +++ b/Regression/crash-in-plist-update/main.fmf @@ -1,6 +1,6 @@ summary: crash in plist update description: '' -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index 97914b8..484d2fe 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -2,7 +2,7 @@ summary: Duplicated prefix lists when no seq is specified description: 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. -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index fb14a07..1632a2a 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -4,7 +4,7 @@ description: The FRR reloader causes eBGP connection flapping when eBGP multihop FRR will default the TTL to 255 and show it in a vtysh "running-configuration" command which is used by the frr-reload script to calculate new configuration deltas. -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf index 9e13125..780e5f8 100644 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) description: | Bug summary: frr scriptlet fails: line 15: hostname: command not found Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf index bfaf724..d7a7640 100644 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf @@ -15,7 +15,7 @@ adjust: - environment+: AVC_ERROR: +no_avc_check when: distro ~< rhel-8.7 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf index f3c4960..6c7e817 100644 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) description: | Bug summary: ospfd not running with ospf opaque-lsa option used Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf index eccdb3c..98aa80a 100644 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#2029958 (FRR reloader generating invalid BFD) description: | Bug summary: FRR reloader generating invalid BFD configurations, exits with error Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf index 33e641d..3768e78 100644 --- a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -1,6 +1,6 @@ summary: Replace NetworkManager patch in the current version description: '' -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index af88382..66166b5 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -1,6 +1,6 @@ summary: Testing netns for multiple BGP instances when testing FRR description: 'Test that frr correctly changes inbound route filter after a config reload' -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 7ed5fdd..9aa6dc1 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -1,7 +1,7 @@ summary: Testing the set src clause capability for IPv6 route-map description: Tests whether different set src clauses in one IPv6 route-map command work correctly -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf index d33c131..f3a2569 100644 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -2,7 +2,7 @@ summary: Test for BZ#1917269 (vtysh running-config output not showing bgp) description: | Bug summary: vtysh running-config output not showing bgp ttl-security hops option Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index 104efcc..076cfe7 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -1,6 +1,6 @@ summary: Basic initscript test for frr description: '' -contact: fhrdina@redhat.com +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf index 328df02..d2bfaae 100644 --- a/Sanity/starting-daemons-test/main.fmf +++ b/Sanity/starting-daemons-test/main.fmf @@ -1,6 +1,6 @@ summary: The test enables frr daemons and checks, if they are run. description: '' -contact: František Hrdina +contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index 4d70a2d..c084817 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -1,6 +1,6 @@ summary: It sets extcommunity and then list it description: '' -contact: fhrdina@redhat.com +contact: Frantisek Hrdina component: - frr test: ./runtest.sh From 3cb1cade2fceaa27dfa807264d6b233569309f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 28 Nov 2024 13:42:43 +0100 Subject: [PATCH 52/84] Use virtual-network library in related tests --- .../main.fmf | 2 + .../runtest.sh | 58 ++----------------- Regression/set-src-ipv6/main.fmf | 2 + Regression/set-src-ipv6/runtest.sh | 58 ++----------------- 4 files changed, 12 insertions(+), 108 deletions(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index 66166b5..9762e39 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -5,6 +5,8 @@ component: - frr test: ./runtest.sh framework: beakerlib +require: + - library(virtual-network/virtual-network) recommend: - frr duration: 5m diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh index 36e6d86..5e814fa 100755 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -30,12 +30,6 @@ PACKAGE="frr" -vnSIDE='server' -vnSERVER_IFACE='VNS' -vnCLIENT_IFACE='VNC' -vnSERVER_NAMESPACE='vns' -vnCLIENT_NAMESPACE='vnc' - #Very simple case where we need two routers R1 and R2 to establish neighborship and send some data SRV_DUMMY1_IF_NAME="dummy1" SRV_DUMMY1_IF_ADDR="192.168.212.1" @@ -57,56 +51,12 @@ CLIENT_IF_BCAST="255.255.255.255" CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" CLIENT_CONF_DIR="/etc/frr/vnc/" -#These functions help with setting up the network namespaces -vnCreateServerClientNetwork() -{ - rlRun "ip link add ${vnSERVER_IFACE} type veth peer name ${vnCLIENT_IFACE}" 0 "Creating network ifaces for SERVER: '${vnSERVER_IFACE}' and CLIENT: '${vnCLIENT_IFACE}'." - - rlRun "ip netns add ${vnSERVER_NAMESPACE}" 0 "Creating SERVER namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip netns add ${vnCLIENT_NAMESPACE}" 0 "Creating CLIENT namespace: '${vnCLIENT_NAMESPACE}'." - - rlRun "ip link set ${vnSERVER_IFACE} netns ${vnSERVER_NAMESPACE}" 0 "Adding iface: '${vnSERVER_IFACE}' into the namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip link set ${vnCLIENT_IFACE} netns ${vnCLIENT_NAMESPACE}" 0 "Adding iface: '${vnCLIENT_IFACE}' into the namespace: '${vnCLIENT_NAMESPACE}'." -} - -vnRemoveServerClientNetwork() -{ - rlRun "ip netns exec ${vnSERVER_NAMESPACE} ip link del ${vnSERVER_IFACE}" 0 "Removing network for SERVER and CLIENT." - - rlRun "ip netns del ${vnSERVER_NAMESPACE}" 0 "Removing SERVER namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip netns del ${vnCLIENT_NAMESPACE}" 0 "Removing CLIENT namespace: '${vnCLIENT_NAMESPACE}'." -} - -vnRunServer() -{ - local command="$1" - local ret_val="${2:-0}" - local message="${3:-Running command on the SERVER: '${command}'}" - - rlRun "ip netns exec ${vnSERVER_NAMESPACE} ${command}" "$ret_val" "$message" -} - -vnRunClient() -{ - local command="$1" - local ret_val="${2:-0}" - local message="${3:-Running command on the CLIENT: '${command}'}" - - rlRun "ip netns exec ${vnCLIENT_NAMESPACE} ${command}" "$ret_val" "$message" -} - -vnRun() -{ - if [ "$vnSIDE" = 'server' ]; then - vnRunServer "$1" "$2" "$3" - elif [ "$vnSIDE" = 'client' ]; then - vnRunClient "$1" "$2" "$3" - else - rlLogError "'vnSIDE' variable is not set properly." - fi -} rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + rlPhaseStartSetup rlAssertRpm $PACKAGE diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 9aa6dc1..020a1d2 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -6,6 +6,8 @@ component: - frr test: ./runtest.sh framework: beakerlib +require: + - library(virtual-network/virtual-network) recommend: - frr - tcpdump diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh index 828593a..abe66da 100755 --- a/Regression/set-src-ipv6/runtest.sh +++ b/Regression/set-src-ipv6/runtest.sh @@ -30,12 +30,6 @@ PACKAGE="frr" -vnSIDE='server' -vnSERVER_IFACE='VNS' -vnCLIENT_IFACE='VNC' -vnSERVER_NAMESPACE='vns' -vnCLIENT_NAMESPACE='vnc' - SERVER_IF_ADDR="192.168.222.240" SERVER_IF_PREFIX="31" SERVER_IF_BCAST="255.255.255.255" @@ -58,56 +52,12 @@ CLIENT_CONF_DIR="/etc/frr/vnc/" MAIN_LOG="/tmp/log_routes" -#These functions help with setting up the network namespaces -vnCreateServerClientNetwork() -{ - rlRun "ip link add ${vnSERVER_IFACE} type veth peer name ${vnCLIENT_IFACE}" 0 "Creating network ifaces for SERVER: '${vnSERVER_IFACE}' and CLIENT: '${vnCLIENT_IFACE}'." - - rlRun "ip netns add ${vnSERVER_NAMESPACE}" 0 "Creating SERVER namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip netns add ${vnCLIENT_NAMESPACE}" 0 "Creating CLIENT namespace: '${vnCLIENT_NAMESPACE}'." - - rlRun "ip link set ${vnSERVER_IFACE} netns ${vnSERVER_NAMESPACE}" 0 "Adding iface: '${vnSERVER_IFACE}' into the namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip link set ${vnCLIENT_IFACE} netns ${vnCLIENT_NAMESPACE}" 0 "Adding iface: '${vnCLIENT_IFACE}' into the namespace: '${vnCLIENT_NAMESPACE}'." -} - -vnRemoveServerClientNetwork() -{ - rlRun "ip netns exec ${vnSERVER_NAMESPACE} ip link del ${vnSERVER_IFACE}" 0 "Removing network for SERVER and CLIENT." - - rlRun "ip netns del ${vnSERVER_NAMESPACE}" 0 "Removing SERVER namespace: '${vnSERVER_NAMESPACE}'." - rlRun "ip netns del ${vnCLIENT_NAMESPACE}" 0 "Removing CLIENT namespace: '${vnCLIENT_NAMESPACE}'." -} - -vnRunServer() -{ - local command="$1" - local ret_val="${2:-0}" - local message="${3:-Running command on the SERVER: '${command}'}" - - rlRun "ip netns exec ${vnSERVER_NAMESPACE} ${command}" "$ret_val" "$message" -} - -vnRunClient() -{ - local command="$1" - local ret_val="${2:-0}" - local message="${3:-Running command on the CLIENT: '${command}'}" - - rlRun "ip netns exec ${vnCLIENT_NAMESPACE} ${command}" "$ret_val" "$message" -} - -vnRun() -{ - if [ "$vnSIDE" = 'server' ]; then - vnRunServer "$1" "$2" "$3" - elif [ "$vnSIDE" = 'client' ]; then - vnRunClient "$1" "$2" "$3" - else - rlLogError "'vnSIDE' variable is not set properly." - fi -} rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + rlPhaseStartSetup rlAssertRpm $PACKAGE From 1fa77b0eddaa4ccbc192345170756a8653345e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 6 Jan 2025 16:02:26 +0100 Subject: [PATCH 53/84] Add test for RIP Testing RIP functionality without multihosts using virtual networks --- Sanity/basic-rip/daemons-vnc | 121 +++++++++++++++++++++ Sanity/basic-rip/daemons-vns | 121 +++++++++++++++++++++ Sanity/basic-rip/frr-vnc.conf | 11 ++ Sanity/basic-rip/frr-vnc.service | 23 ++++ Sanity/basic-rip/frr-vns.conf | 11 ++ Sanity/basic-rip/frr-vns.service | 23 ++++ Sanity/basic-rip/main.fmf | 22 ++++ Sanity/basic-rip/test.sh | 181 +++++++++++++++++++++++++++++++ Sanity/basic-rip/vtysh-vnc.conf | 1 + Sanity/basic-rip/vtysh-vns.conf | 1 + 10 files changed, 515 insertions(+) create mode 100644 Sanity/basic-rip/daemons-vnc create mode 100644 Sanity/basic-rip/daemons-vns create mode 100644 Sanity/basic-rip/frr-vnc.conf create mode 100644 Sanity/basic-rip/frr-vnc.service create mode 100644 Sanity/basic-rip/frr-vns.conf create mode 100644 Sanity/basic-rip/frr-vns.service create mode 100644 Sanity/basic-rip/main.fmf create mode 100755 Sanity/basic-rip/test.sh create mode 100644 Sanity/basic-rip/vtysh-vnc.conf create mode 100644 Sanity/basic-rip/vtysh-vns.conf diff --git a/Sanity/basic-rip/daemons-vnc b/Sanity/basic-rip/daemons-vnc new file mode 100644 index 0000000..c38eb43 --- /dev/null +++ b/Sanity/basic-rip/daemons-vnc @@ -0,0 +1,121 @@ +# 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=no +ospfd=no +ospf6d=no +ripd=yes +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-rip/daemons-vns b/Sanity/basic-rip/daemons-vns new file mode 100644 index 0000000..6097300 --- /dev/null +++ b/Sanity/basic-rip/daemons-vns @@ -0,0 +1,121 @@ +# 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=no +ospfd=no +ospf6d=no +ripd=yes +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vnc.conf b/Sanity/basic-rip/frr-vnc.conf new file mode 100644 index 0000000..81689da --- /dev/null +++ b/Sanity/basic-rip/frr-vnc.conf @@ -0,0 +1,11 @@ +hostname RouterVNC +! +log file debugging +! +router rip + version 2 + network / + network / +! +line vty +! \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vnc.service b/Sanity/basic-rip/frr-vnc.service new file mode 100644 index 0000000..9decd6e --- /dev/null +++ b/Sanity/basic-rip/frr-vnc.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vns.conf b/Sanity/basic-rip/frr-vns.conf new file mode 100644 index 0000000..ddc0b06 --- /dev/null +++ b/Sanity/basic-rip/frr-vns.conf @@ -0,0 +1,11 @@ +hostname RouterVNS +! +log file debugging +! +router rip + version 2 + network / + network / +! +line vty +! \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vns.service b/Sanity/basic-rip/frr-vns.service new file mode 100644 index 0000000..9ed4bb1 --- /dev/null +++ b/Sanity/basic-rip/frr-vns.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf new file mode 100644 index 0000000..735acad --- /dev/null +++ b/Sanity/basic-rip/main.fmf @@ -0,0 +1,22 @@ +summary: Basic rip test +description: 'Testing RIP functionality without multihosts using virtual networks' +contact: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +require: + - library(virtual-network/virtual-network) +duration: 5m +enabled: true +tag: + - Tier1 +tier: '1' +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-8 + continue: false diff --git a/Sanity/basic-rip/test.sh b/Sanity/basic-rip/test.sh new file mode 100755 index 0000000..e08e116 --- /dev/null +++ b/Sanity/basic-rip/test.sh @@ -0,0 +1,181 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +PACKAGE="frr" + +SERVER_CLIENT_IF_ADDR="192.168.222.0" +SERVER_CLIENT_IF_PREFIX="24" + +SERVER_IF_ADDR="192.168.222.1" +SERVER_IF_PREFIX="24" +SERVER_IF_BCAST="192.168.222.255" + +SERVER_STUB_IF_ADDR="192.168.100.0" +SERVER_STUB_IF_PREFIX="24" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.2" +CLIENT_IF_PREFIX="24" +CLIENT_IF_BCAST="192.168.222.255" + +CLIENT_STUB_IF_ADDR="192.168.200.0" +CLIENT_STUB_IF_PREFIX="24" + + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +MAIN_LOG="/tmp/log_routes" + + +rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + + # Create isolated stub network available only from SERVER network + vnRunServer "ip link add VNS_STUB type veth peer name VNS_STUB_PEER" + vnRunServer "ip link set VNS_STUB netns ${vnSERVER_NAMESPACE}" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX} dev VNS_STUB" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB up" + vnRunServer "ip link set VNS_STUB_PEER up" + + + # Create isolated stub network available only from CLIENT network + vnRunClient "ip link add VNC_STUB type veth peer name VNC_STUB_PEER" + vnRunClient "ip link set VNC_STUB netns ${vnCLIENT_NAMESPACE}" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX} dev VNC_STUB" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB up" + vnRunClient "ip link set VNC_STUB_PEER up" + + rlRun "ip a" + vnRunClient "ip a" + vnRunServer "ip a" + + 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 "mkdir /etc/frr/{vns,vnc}" + + rm -rf /etc/frr/frr.conf + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "cat ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "cat ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + vnRunServer "ping -c 1 ${SERVER_STUB_IF_ADDR}" 0 "Server should be capable to ping its stub" + vnRunServer "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub before FRR with RIP is run" + + vnRunClient "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 0 "Client should be capable to ping its stub" + vnRunClient "ping -c 1 ${SERVER_STUB_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub before FRR with RIP is run" + + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + + vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" + vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" + + rlRun "sleep 30" 0 "Waiting for peers to exchange routes and converge" + + # check server + rlRun "vtysh -N vns -c 'show ip rip status' | grep \"${CLIENT_IF_ADDR}\"" 0 Check if client is set as gateway for server + rlRun "vtysh -N vns -c 'show ip rip' | grep \"C(i) ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if server's stub is connected to rip" + rlRun "vtysh -N vns -c 'show ip rip' | grep \"${SERVER_CLIENT_IF_ADDR}\"" 0 "Check if server-client network connected to rip" + rlRun "vtysh -N vns -c 'show ip rip' | grep \"R(n) ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if RIP connected client's stub" + rlRun "vtysh -N vns -c 'show ip route' | grep \"R>\* ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if RIP connected client's stub" + + # check client + rlRun "vtysh -N vnc -c 'show ip rip status' | grep \"${SERVER_IF_ADDR}\"" 0 Check if server is set as gateway for client + rlRun "vtysh -N vnc -c 'show ip rip' | grep \"C(i) ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if client's stub connected to rip" + rlRun "vtysh -N vnc -c 'show ip rip' | grep \"${SERVER_CLIENT_IF_ADDR}\"" 0 "Check if server-client network connected to rip" + rlRun "vtysh -N vnc -c 'show ip rip' | grep \"R(n) ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if RIP connected server's stub" + rlRun "vtysh -N vnc -c 'show ip route' | grep \"R>\* ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if RIP connected server's stub" + + vnRunServer "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 0 "Server should be capable to ping client's stub since FRR with RIP is run" + vnRunClient "ping -c 1 ${SERVER_STUB_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with RIP is run" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/basic-rip/vtysh-vnc.conf b/Sanity/basic-rip/vtysh-vnc.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Sanity/basic-rip/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/basic-rip/vtysh-vns.conf b/Sanity/basic-rip/vtysh-vns.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Sanity/basic-rip/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file From b7d073d9e1ff34d746205471cdc48cf2a39db3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 6 Jan 2025 17:08:55 +0100 Subject: [PATCH 54/84] Metadata update of test for RIP --- Sanity/basic-rip/main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf index 735acad..833a8df 100644 --- a/Sanity/basic-rip/main.fmf +++ b/Sanity/basic-rip/main.fmf @@ -1,5 +1,5 @@ summary: Basic rip test -description: 'Testing RIP functionality without multihosts using virtual networks' +description: Testing RIP functionality without multihosts using virtual networks contact: Frantisek Hrdina component: - frr @@ -20,3 +20,5 @@ adjust: - enabled: false when: distro < rhel-8 continue: false +extra-nitrate: TC#0618011 +id: 98702b5f-d651-4d47-8a44-383ffa02eaed \ No newline at end of file From 5c2165ecdb6703dc76bad81f239cca30513c6bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 7 Jan 2025 14:04:00 +0100 Subject: [PATCH 55/84] Metadata update of test for RIP increased TestTime cosmetic changes --- Sanity/basic-rip/main.fmf | 4 ++-- Sanity/basic-rip/test.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf index 833a8df..2bf19eb 100644 --- a/Sanity/basic-rip/main.fmf +++ b/Sanity/basic-rip/main.fmf @@ -1,4 +1,4 @@ -summary: Basic rip test +summary: Basic RIP test description: Testing RIP functionality without multihosts using virtual networks contact: Frantisek Hrdina component: @@ -9,7 +9,7 @@ recommend: - frr require: - library(virtual-network/virtual-network) -duration: 5m +duration: 10m enabled: true tag: - Tier1 diff --git a/Sanity/basic-rip/test.sh b/Sanity/basic-rip/test.sh index e08e116..9a7100a 100755 --- a/Sanity/basic-rip/test.sh +++ b/Sanity/basic-rip/test.sh @@ -94,7 +94,7 @@ rlJournalStart #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - + #I need separate daemons files as well for watchfrr options rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" @@ -169,7 +169,7 @@ rlJournalStart rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" vnRemoveServerClientNetwork - + rlFileRestore rlRun "systemctl daemon-reload" From ab0ad716248cfd389838a841d72f27581f3b84bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 7 Jan 2025 15:03:14 +0100 Subject: [PATCH 56/84] Add test for OSPF Testing OSPF functionality without multihosts using virtual networks --- Sanity/basic-ospf/daemons-vnc | 121 ++++++++++++++++ Sanity/basic-ospf/daemons-vns | 121 ++++++++++++++++ Sanity/basic-ospf/frr-vnc.conf | 13 ++ Sanity/basic-ospf/frr-vnc.service | 23 +++ Sanity/basic-ospf/frr-vns.conf | 14 ++ Sanity/basic-ospf/frr-vns.service | 23 +++ Sanity/basic-ospf/main.fmf | 22 +++ Sanity/basic-ospf/test.sh | 231 ++++++++++++++++++++++++++++++ Sanity/basic-ospf/vtysh-vnc.conf | 1 + Sanity/basic-ospf/vtysh-vns.conf | 1 + 10 files changed, 570 insertions(+) create mode 100644 Sanity/basic-ospf/daemons-vnc create mode 100644 Sanity/basic-ospf/daemons-vns create mode 100644 Sanity/basic-ospf/frr-vnc.conf create mode 100644 Sanity/basic-ospf/frr-vnc.service create mode 100644 Sanity/basic-ospf/frr-vns.conf create mode 100644 Sanity/basic-ospf/frr-vns.service create mode 100644 Sanity/basic-ospf/main.fmf create mode 100755 Sanity/basic-ospf/test.sh create mode 100644 Sanity/basic-ospf/vtysh-vnc.conf create mode 100644 Sanity/basic-ospf/vtysh-vns.conf diff --git a/Sanity/basic-ospf/daemons-vnc b/Sanity/basic-ospf/daemons-vnc new file mode 100644 index 0000000..6fc1008 --- /dev/null +++ b/Sanity/basic-ospf/daemons-vnc @@ -0,0 +1,121 @@ +# 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=no +ospfd=yes +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-ospf/daemons-vns b/Sanity/basic-ospf/daemons-vns new file mode 100644 index 0000000..b77b9c8 --- /dev/null +++ b/Sanity/basic-ospf/daemons-vns @@ -0,0 +1,121 @@ +# 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=no +ospfd=yes +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vnc.conf b/Sanity/basic-ospf/frr-vnc.conf new file mode 100644 index 0000000..329cfec --- /dev/null +++ b/Sanity/basic-ospf/frr-vnc.conf @@ -0,0 +1,13 @@ +hostname RouterVNC +! +log file debugging +! +router ospf + ospf router-id + network / area 0 + network / area 1 + network / area 2 + ospf opaque-lsa +! +line vty +! \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vnc.service b/Sanity/basic-ospf/frr-vnc.service new file mode 100644 index 0000000..9decd6e --- /dev/null +++ b/Sanity/basic-ospf/frr-vnc.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vns.conf b/Sanity/basic-ospf/frr-vns.conf new file mode 100644 index 0000000..a20b79a --- /dev/null +++ b/Sanity/basic-ospf/frr-vns.conf @@ -0,0 +1,14 @@ +hostname RouterVNS +! +log file debugging +! +router ospf + ospf router-id + network / area 0 + network / area 1 + network / area 2 + ospf opaque-lsa + +! +line vty +! \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vns.service b/Sanity/basic-ospf/frr-vns.service new file mode 100644 index 0000000..9ed4bb1 --- /dev/null +++ b/Sanity/basic-ospf/frr-vns.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-ospf/main.fmf b/Sanity/basic-ospf/main.fmf new file mode 100644 index 0000000..7e749d7 --- /dev/null +++ b/Sanity/basic-ospf/main.fmf @@ -0,0 +1,22 @@ +summary: Basic OSPF test +description: Testing OSPF functionality without multihosts using virtual networks +contact: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +require: + - library(virtual-network/virtual-network) +duration: 10m +enabled: true +tag: + - Tier1 +tier: '1' +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-8 + continue: false \ No newline at end of file diff --git a/Sanity/basic-ospf/test.sh b/Sanity/basic-ospf/test.sh new file mode 100755 index 0000000..c3c5d7b --- /dev/null +++ b/Sanity/basic-ospf/test.sh @@ -0,0 +1,231 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +PACKAGE="frr" + +SERVER_CLIENT_IF_ADDR="192.168.222.0" +SERVER_CLIENT_IF_PREFIX="24" + +SERVER_IF_ADDR="192.168.222.1" +SERVER_IF_PREFIX="24" +SERVER_IF_BCAST="192.168.222.255" + +SERVER_STUB_1_IF_ADDR="192.168.101.0" +SERVER_STUB_1_IF_PREFIX="24" + +SERVER_STUB_2_IF_ADDR="192.168.102.0" +SERVER_STUB_2_IF_PREFIX="24" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.2" +CLIENT_IF_PREFIX="24" +CLIENT_IF_BCAST="192.168.222.255" + +CLIENT_STUB_1_IF_ADDR="192.168.201.0" +CLIENT_STUB_1_IF_PREFIX="24" +CLIENT_STUB_2_IF_ADDR="192.168.202.0" +CLIENT_STUB_2_IF_PREFIX="24" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +MAIN_LOG="/tmp/log_routes" + + +rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + + # Create isolated stub 1 network available only from SERVER network + vnRunServer "ip link add VNS_STUB_1 type veth peer name VNS_STUB_PEER_1" + vnRunServer "ip link set VNS_STUB_1 netns ${vnSERVER_NAMESPACE}" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} dev VNS_STUB_1" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_1 up" + vnRunServer "ip link set VNS_STUB_PEER_1 up" + + # Create isolated stub 2 network available only from SERVER network + vnRunServer "ip link add VNS_STUB_2 type veth peer name VNS_STUB_PEER_2" + vnRunServer "ip link set VNS_STUB_2 netns ${vnSERVER_NAMESPACE}" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} dev VNS_STUB_2" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_2 up" + vnRunServer "ip link set VNS_STUB_PEER_2 up" + + # Create isolated stub 1 network available only from CLIENT network + vnRunClient "ip link add VNC_STUB_1 type veth peer name VNC_STUB_PEER_1" + vnRunClient "ip link set VNC_STUB_1 netns ${vnCLIENT_NAMESPACE}" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} dev VNC_STUB_1" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_1 up" + vnRunClient "ip link set VNC_STUB_PEER_1 up" + + # Create isolated stub 2 network available only from CLIENT network + vnRunClient "ip link add VNC_STUB_2 type veth peer name VNC_STUB_PEER_2" + vnRunClient "ip link set VNC_STUB_2 netns ${vnCLIENT_NAMESPACE}" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} dev VNC_STUB_2" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_2 up" + vnRunClient "ip link set VNC_STUB_PEER_2 up" + + rlRun "ip a" + vnRunClient "ip a" + vnRunServer "ip a" + + 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 "mkdir /etc/frr/{vns,vnc}" + + rm -rf /etc/frr/frr.conf + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "cat ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_1_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_1_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "cat ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + vnRunServer "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Server should be capable to ping its stub 1" + vnRunServer "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Server should be capable to ping its stub 2" + + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 before FRR with OSPF is run" + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 before FRR with OSPF is run" + + vnRunClient "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Client should be capable to ping its stub 1" + vnRunClient "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Client should be capable to ping its stub 2" + + vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 before FRR with OSPF is run" + vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 before FRR with OSPF is run" + + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" + vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" + + rlRun "sleep 60" 0 "Waiting for peers to exchange routes and converge" + + # check server + rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"OSPF Router with ID (${SERVER_IF_ADDR})\"" 0 "Checking if server with its router-id is in ospf database" + rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"${CLIENT_IP_ADDR}\"" 0 "Check if client's ip is in ospf database of server" + rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"Area 0.0.0.1\"" 0 "Check if area 1 is loaded in ospf" + rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"Area 0.0.0.2\"" 0 "Check if area 2 is loaded in ospf" + + rlRun "vtysh -N vns -c 'show ip ospf' | grep \"OSPF Routing Process, Router ID: $ROUTER_ID\"" 0 "Check if server with its router-id is in show ip ospf" + rlRun "vtysh -N vns -c 'show ip ospf' | grep \"Area ID: 0.0.0.1\"" 0 "Check if area 1 in show ip ospf" + rlRun "vtysh -N vns -c 'show ip ospf' | grep \"Area ID: 0.0.0.2\"" 0 "Check if area 2 in show ip ospf" + + rlRun "vtysh -N vns -c 'show ip ospf neighbor' | grep \"${CLIENT_IF_ADDR}\"" 0 "Check if server has client's ip in ospf neighbor" + rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"${CLIENT_IF_ADDR}\"" 0 "Check if server has client's ip in ip ospf routes" + + rlRun "vtysh -N vns -c 'show ip route' | grep \"O>\* ${CLIENT_STUB_1_IF_ADDR}\"" 0 "Check if client's stub 1 in ip routes of server" + rlRun "vtysh -N vns -c 'show ip route' | grep \"O>\* ${CLIENT_STUB_2_IF_ADDR}\"" 0 "Check if client's stub 2 in ip routes of server" + + rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"IA ${CLIENT_STUB_1_IF_ADDR}\"" 0 "Check if client's stub 1 is in ip ospf routes of server" + rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"IA ${CLIENT_STUB_2_IF_ADDR}\"" 0 "Check if client's stub 2 is in ip ospf routes of server" + + # check client} + rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"OSPF Router with ID (${CLIENT_IF_ADDR})\"" 0 "Checking if client with its router-id is in ospf database" + rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"${SERVER_IP_ADDR}\"" 0 "Check if server's ip is in ospf database of client" + rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"Area 0.0.0.1\"" 0 "Check if area 1 is loaded in ospf" + rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"Area 0.0.0.2\"" 0 "Check if area 2 is loaded in ospf" + + rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"OSPF Routing Process, Router ID: $ROUTER_ID\"" 0 "Check if client with its router-id is in show ip ospf" + rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"Area ID: 0.0.0.1\"" 0 "Check if area 1 in show ip ospf" + rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"Area ID: 0.0.0.2\"" 0 "Check if area 2 in show ip ospf" + + rlRun "vtysh -N vnc -c 'show ip ospf neighbor' | grep \"${SERVER_IF_ADDR}\"" 0 "Check if client has server's ip in ospf neighbor" + rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"${SERVER_IF_ADDR}\"" 0 "Check if server has server's ip in ip ospf routes" + + rlRun "vtysh -N vnc -c 'show ip route' | grep \"O>\* ${SERVER_STUB_1_IF_ADDR}\"" 0 "Check if server's stub 1 in ip routes of client" + rlRun "vtysh -N vnc -c 'show ip route' | grep \"O>\* ${SERVER_STUB_2_IF_ADDR}\"" 0 "Check if server's stub 2 in ip routes of client" + + rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"IA ${SERVER_STUB_1_IF_ADDR}\"" 0 "Check if server's stub 1 is in ip ospf routes of client" + rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"IA ${SERVER_STUB_2_IF_ADDR}\"" 0 "Check if server's stub 2 is in ip ospf routes of client" + + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Server should be capable to ping client's stub 1 since FRR with OSPF is run" + vnRunServer "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Server should be capable to ping client's stub 2 since FRR with OSPF is run" + vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with OSPF is run" + vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with OSPF is run" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/basic-ospf/vtysh-vnc.conf b/Sanity/basic-ospf/vtysh-vnc.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Sanity/basic-ospf/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/basic-ospf/vtysh-vns.conf b/Sanity/basic-ospf/vtysh-vns.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Sanity/basic-ospf/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file From a68fd88145bb59c90993571d3ba494a353069263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 10 Jan 2025 13:14:30 +0100 Subject: [PATCH 57/84] Metadata update of test for OSPF --- Sanity/basic-ospf/main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/basic-ospf/main.fmf b/Sanity/basic-ospf/main.fmf index 7e749d7..7702e83 100644 --- a/Sanity/basic-ospf/main.fmf +++ b/Sanity/basic-ospf/main.fmf @@ -19,4 +19,6 @@ environment: adjust: - enabled: false when: distro < rhel-8 - continue: false \ No newline at end of file + continue: false +extra-nitrate: TC#0618017 +id: 7e3f00cc-8e85-4a47-8f06-2d1edd35904d \ No newline at end of file From ebc0835e4b061c6e5fec1c20a39868dcdc346486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 21 Jan 2025 13:02:46 +0100 Subject: [PATCH 58/84] Add test for RHEL-67011 /Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established --- .../daemons-vnc | 121 +++++++++++++++ .../daemons-vns | 121 +++++++++++++++ .../frr-vnc.conf | 27 ++++ .../frr-vnc.service | 23 +++ .../frr-vns.conf | 39 +++++ .../frr-vns.service | 23 +++ .../main.fmf | 31 ++++ .../test.sh | 145 ++++++++++++++++++ .../vtysh-vnc.conf | 1 + .../vtysh-vns.conf | 1 + 10 files changed, 532 insertions(+) create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf create mode 100755 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf create mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc new file mode 100644 index 0000000..ee66012 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=yes +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns new file mode 100644 index 0000000..ebd3f68 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=yes +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf new file mode 100644 index 0000000..ace1b80 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf @@ -0,0 +1,27 @@ +hostname RouterVNC +! +log file debugging +! +router bgp + bgp router-id + no bgp ebgp-requires-policy + no bgp default ipv4-unicast + no bgp network import-check + neighbor remote-as + neighbor bfd + neighbor passive + ! + address-family ipv4 unicast + neighbor activate + neighbor next-hop-self + exit-address-family +exit +! +route-map RMAP permit 10 + set ipv6 next-hop prefer-global +exit +! +line vty +! +! +end diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service new file mode 100644 index 0000000..9decd6e --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf new file mode 100644 index 0000000..b362ff3 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf @@ -0,0 +1,39 @@ +hostname RouterVNS +log file +log timestamp precision 3 +no ipv6 forwarding +service integrated-vtysh-config +! +debug bgp keepalives +debug bgp neighbor-events +debug bgp nht +debug bgp updates in +debug bgp updates out +debug bgp zebra +debug bgp bfd +debug bfd distributed +debug bfd peer +debug bfd zebra +debug bfd network +! +router bgp + no bgp ebgp-requires-policy + no bgp hard-administrative-reset + no bgp default ipv4-unicast + no bgp graceful-restart notification + no bgp network import-check + neighbor remote-as + neighbor bfd + ! + address-family ipv4 unicast + network 5.5.5.5/32 + neighbor activate + exit-address-family + ! + address-family ipv6 unicast + neighbor activate + exit-address-family +! +line vty +! +exit \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service new file mode 100644 index 0000000..9ed4bb1 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf new file mode 100644 index 0000000..a8792df --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf @@ -0,0 +1,31 @@ +summary: BGP with BFD has a dropped Connection before peering established +description: 'When doing a BGP Peering with BFD between two FRR peers (peer A and peer B), the BGP is established but the peering takes place twice.' +contact: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +require: + - library(virtual-network/virtual-network) +duration: 10m +enabled: true +tag: + - Tier1 +tier: '1' +link: + - verifies: https://issues.redhat.com/browse/RHEL-67011 +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-9.6 + continue: false + - enabled: false + when: distro < centos-stream-9 + continue: false + - enabled: false + when: distro < fedora-42 + continue: false + diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh new file mode 100755 index 0000000..3a4cf53 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh @@ -0,0 +1,145 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +PACKAGE="frr" + +SERVER_CLIENT_IF_ADDR="192.168.222.0" +SERVER_CLIENT_IF_PREFIX="24" + +SERVER_IF_ADDR="192.168.222.1" +SERVER_IF_PREFIX="24" +SERVER_IF_BCAST="192.168.222.255" + +SERVER_BGP_AS="64512" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.2" +CLIENT_IF_PREFIX="24" +CLIENT_IF_BCAST="192.168.222.255" + +CLIENT_BGP_AS="4200000000" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +MAIN_LOG="/tmp/log_routes" + + +rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + + rlRun "ip a" + vnRunClient "ip a" + vnRunServer "ip a" + + 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 "mkdir /etc/frr/{vns,vnc}" + + rm -rf /etc/frr/frr.conf + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "cat ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "cat ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + vnRunServer "/usr/libexec/frr/frr-reload.py -N vns --debug --reload --overwrite --stdout /etc/frr/vns/frr.conf &> reload.log" + + rlRun "sleep 5m" 0 "Waiting for peers to exchange routes and converge" + + rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" + rlAssertGrep "BGP state = Established" show-bgp-neighbors.log + rlAssertNotGrep "Connections established 2; dropped 1" show-bgp-neighbors.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file From b03ecd48359e5fcab2b9e7f3e4941f2267352402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 21 Jan 2025 15:34:51 +0100 Subject: [PATCH 59/84] Metadata update of test for RHEL-67011 --- .../main.fmf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf index a8792df..5041710 100644 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf @@ -1,5 +1,6 @@ summary: BGP with BFD has a dropped Connection before peering established -description: 'When doing a BGP Peering with BFD between two FRR peers (peer A and peer B), the BGP is established but the peering takes place twice.' +description: When doing a BGP Peering with BFD between two FRR peers (peer A and peer + B), the BGP is established but the peering takes place twice. contact: Frantisek Hrdina component: - frr @@ -28,4 +29,5 @@ adjust: - enabled: false when: distro < fedora-42 continue: false - +extra-nitrate: TC#0618306 +id: 4fea83b6-a358-403b-b533-3dc55cdbfbcc From 91d4463c86b31fb41dfba511f448fceac4e6deba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 21 Jan 2025 14:20:56 +0100 Subject: [PATCH 60/84] Add test for RHEL-68432 /Regression/gracefull-restart --- Regression/gracefull-restart/daemons | 81 +++++++++++++++++++++++++++ Regression/gracefull-restart/frr.conf | 25 +++++++++ Regression/gracefull-restart/main.fmf | 24 ++++++++ Regression/gracefull-restart/test.sh | 44 +++++++++++++++ 4 files changed, 174 insertions(+) create mode 100644 Regression/gracefull-restart/daemons create mode 100644 Regression/gracefull-restart/frr.conf create mode 100644 Regression/gracefull-restart/main.fmf create mode 100755 Regression/gracefull-restart/test.sh diff --git a/Regression/gracefull-restart/daemons b/Regression/gracefull-restart/daemons new file mode 100644 index 0000000..ed4961f --- /dev/null +++ b/Regression/gracefull-restart/daemons @@ -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//daemons, and you need to +# start FRR with "/usr/lib/frr/frrinit.sh start ". + +# 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. \ No newline at end of file diff --git a/Regression/gracefull-restart/frr.conf b/Regression/gracefull-restart/frr.conf new file mode 100644 index 0000000..4c983fc --- /dev/null +++ b/Regression/gracefull-restart/frr.conf @@ -0,0 +1,25 @@ +hostname Router-CLIENT +! +log file debugging +! +router bgp 50000 + bgp router-id + 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 \ No newline at end of file diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf new file mode 100644 index 0000000..de58885 --- /dev/null +++ b/Regression/gracefull-restart/main.fmf @@ -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 +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 diff --git a/Regression/gracefull-restart/test.sh b/Regression/gracefull-restart/test.sh new file mode 100755 index 0000000..484508e --- /dev/null +++ b/Regression/gracefull-restart/test.sh @@ -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}|g' /etc/frr/frr.conf" + rlRun "sed -i 's||${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 From 4a7fe3ab0e8319ea2fa4b17b242b407e96c4c10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 22 Jan 2025 12:50:53 +0100 Subject: [PATCH 61/84] Metadata update of test for RHEL-68432 --- Regression/gracefull-restart/main.fmf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf index de58885..efa8b3d 100644 --- a/Regression/gracefull-restart/main.fmf +++ b/Regression/gracefull-restart/main.fmf @@ -1,5 +1,7 @@ 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.' +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 component: - frr @@ -18,7 +20,12 @@ 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' + because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 - enabled: false - when: distro < rhel-7 + when: distro < rhel-9 continue: false + - enabled: false + when: distro < centos-stream-9 + continue: false +extra-nitrate: TC#0618307 +id: b53842a0-d920-47f2-903c-57a951346023 From b2ddd1bd391d889c5999259f76e727994ee9fda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 30 Jan 2025 18:00:58 +0100 Subject: [PATCH 62/84] Enable avc check --- main.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.fmf b/main.fmf index 3c48c8f..3da3438 100644 --- a/main.fmf +++ b/main.fmf @@ -1,2 +1,5 @@ # QE owner contact: Frantisek Hrdina +component: frr +check: + - how: avc \ No newline at end of file From 5595e3b95edbdce582d6b2f4150ac34ac19e196b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 4 Feb 2025 17:30:44 +0100 Subject: [PATCH 63/84] Temporary disable of avc checks --- main.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.fmf b/main.fmf index 3da3438..0cb4e83 100644 --- a/main.fmf +++ b/main.fmf @@ -1,5 +1,5 @@ # QE owner contact: Frantisek Hrdina component: frr -check: - - how: avc \ No newline at end of file +#check: +# - how: avc \ No newline at end of file From 63cd3181ecc68e9ec8d0e5368b15c0415e8c63cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 5 Feb 2025 09:10:30 +0100 Subject: [PATCH 64/84] Update of filebackups do not backup /var/log/audit/audit.log for tests that don't use virtual networks --- .../FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh | 1 - Regression/bfd-crash-in-MetalLB/test.sh | 1 - Regression/crash-in-plist-update/test.sh | 1 - .../duplicated-prefix-lists-when-no-seq-is-specified/test.sh | 1 - Regression/gracefull-restart/test.sh | 1 - .../ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh | 1 - .../ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh | 1 - .../runtest.sh | 1 - .../replace-network-manager-patch-in-the-current-version/test.sh | 1 - Sanity/starting-daemons-test/runtest.sh | 1 - Sanity/vtysh/extcommunity-list/runtest.sh | 1 - 11 files changed, 11 deletions(-) diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh index 73fe284..ceab4ba 100755 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh @@ -36,7 +36,6 @@ rlJournalStart 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" diff --git a/Regression/bfd-crash-in-MetalLB/test.sh b/Regression/bfd-crash-in-MetalLB/test.sh index 5248c1b..c542883 100755 --- a/Regression/bfd-crash-in-MetalLB/test.sh +++ b/Regression/bfd-crash-in-MetalLB/test.sh @@ -12,7 +12,6 @@ rlJournalStart 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" diff --git a/Regression/crash-in-plist-update/test.sh b/Regression/crash-in-plist-update/test.sh index 9e4a873..fd34868 100755 --- a/Regression/crash-in-plist-update/test.sh +++ b/Regression/crash-in-plist-update/test.sh @@ -11,7 +11,6 @@ rlJournalStart 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" diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh index 2facc8f..7eb2838 100755 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh @@ -11,7 +11,6 @@ rlJournalStart 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" diff --git a/Regression/gracefull-restart/test.sh b/Regression/gracefull-restart/test.sh index 484508e..78bd7f1 100755 --- a/Regression/gracefull-restart/test.sh +++ b/Regression/gracefull-restart/test.sh @@ -14,7 +14,6 @@ rlJournalStart 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" diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh index 97d9a14..a3d0b7e 100755 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh @@ -37,7 +37,6 @@ rlJournalStart 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" diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh index 7750ed1..3483dc0 100755 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh @@ -39,7 +39,6 @@ rlJournalStart 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" diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh index 8d5d058..fccc20d 100755 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh @@ -37,7 +37,6 @@ rlJournalStart 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" diff --git a/Regression/replace-network-manager-patch-in-the-current-version/test.sh b/Regression/replace-network-manager-patch-in-the-current-version/test.sh index 5af602e..479c1a0 100755 --- a/Regression/replace-network-manager-patch-in-the-current-version/test.sh +++ b/Regression/replace-network-manager-patch-in-the-current-version/test.sh @@ -11,7 +11,6 @@ rlJournalStart 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" diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh index ca1e436..fe6ae11 100755 --- a/Sanity/starting-daemons-test/runtest.sh +++ b/Sanity/starting-daemons-test/runtest.sh @@ -37,7 +37,6 @@ rlJournalStart 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" diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh index a2e9268..21769c7 100755 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ b/Sanity/vtysh/extcommunity-list/runtest.sh @@ -38,7 +38,6 @@ rlJournalStart 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" From e6252c88029a78e09b3fb310677d6390db414fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 5 Feb 2025 13:11:13 +0100 Subject: [PATCH 65/84] Cleanup improvement prevent propagating AVCs to the tests, that are following --- .../test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh index 3a4cf53..a399572 100755 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh @@ -138,6 +138,10 @@ rlJournalStart rlRun "setenforce 1" 0 "re-Enabling SELinux" rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + rlRun "popd" rlRun "rm -r $tmp" 0 "Remove tmp directory" rlPhaseEnd From 4c90131510aa1affe7d96c46a79fd37b37fe2c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 5 Feb 2025 15:20:27 +0100 Subject: [PATCH 66/84] Cleanup improvements prevent propagating AVCs to the tests, that are following --- .../runtest.sh | 29 ++++++++++++------- Regression/set-src-ipv6/runtest.sh | 25 +++++++++++----- Sanity/basic-ospf/test.sh | 25 +++++++++++----- Sanity/basic-rip/test.sh | 25 +++++++++++----- 4 files changed, 72 insertions(+), 32 deletions(-) diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh index 5e814fa..2197d67 100755 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh @@ -60,6 +60,10 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + # Need to disable SeLinux, because it does not allow to start service via unit file # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. rlRun "setenforce 0" 0 "Disabling SELinux" @@ -87,20 +91,20 @@ rlJournalStart rlRun "rlFileBackup --clean /root/.history_frr" rlRun "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - rlRun "cp -f frr-vnc-reload.conf ${CLIENT_CONF_DIR}frr-vnc-reload.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc-reload.conf ${CLIENT_CONF_DIR}frr-vnc-reload.conf" 0 "Copying frr configuration for the CLIENT" #I need separate daemons files as well for watchfrr options - rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" rlRun "ls -lR /etc/frr/*" - rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" # /etc/frr/vns/frr.conf rlRun "sed -i 's||${vnSERVER_IFACE}|g' ${SERVER_CONF_DIR}frr.conf" @@ -171,9 +175,12 @@ rlJournalStart rlFileRestore rlRun "systemctl daemon-reload" - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh index abe66da..394b956 100755 --- a/Regression/set-src-ipv6/runtest.sh +++ b/Regression/set-src-ipv6/runtest.sh @@ -61,6 +61,10 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + # Need to disable SeLinux, because it does not allow to start service via unit file # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. rlRun "setenforce 0" 0 "Disabling SELinux" @@ -95,19 +99,19 @@ rlJournalStart rlRun "rlFileBackup --clean /root/.history_frr" rlRun "mkdir /etc/frr/{vns,vnc}" #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" #I need separate daemons files as well for watchfrr options - rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" rlRun "ls -lR /etc/frr/*" - rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" # /etc/frr/vns/frr.conf rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" @@ -173,6 +177,13 @@ rlJournalStart # restoring SELinux rlRun "setenforce 1" 0 "re-Enabling SELinux" rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd diff --git a/Sanity/basic-ospf/test.sh b/Sanity/basic-ospf/test.sh index c3c5d7b..4a3e6cb 100755 --- a/Sanity/basic-ospf/test.sh +++ b/Sanity/basic-ospf/test.sh @@ -44,6 +44,10 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + # Need to disable SeLinux, because it does not allow to start service via unit file # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. rlRun "setenforce 0" 0 "Disabling SELinux" @@ -105,19 +109,19 @@ rlJournalStart rm -rf /etc/frr/frr.conf #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" #I need separate daemons files as well for watchfrr options - rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" rlRun "ls -lR /etc/frr/*" - rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" # /etc/frr/vns/frr.conf rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" @@ -226,6 +230,13 @@ rlJournalStart # restoring SELinux rlRun "setenforce 1" 0 "re-Enabling SELinux" rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd diff --git a/Sanity/basic-rip/test.sh b/Sanity/basic-rip/test.sh index 9a7100a..c29a806 100755 --- a/Sanity/basic-rip/test.sh +++ b/Sanity/basic-rip/test.sh @@ -40,6 +40,10 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + # Need to disable SeLinux, because it does not allow to start service via unit file # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. rlRun "setenforce 0" 0 "Disabling SELinux" @@ -88,19 +92,19 @@ rlJournalStart rm -rf /etc/frr/frr.conf #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" #I need separate daemons files as well for watchfrr options - rlRun "cp -f daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" rlRun "ls -lR /etc/frr/*" - rlRun "cp -f frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" # /etc/frr/vns/frr.conf rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" @@ -176,6 +180,13 @@ rlJournalStart # restoring SELinux rlRun "setenforce 1" 0 "re-Enabling SELinux" rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd From d8fc503b74a9f80c671f29f8a7adf022d62a8e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 5 Feb 2025 16:11:41 +0100 Subject: [PATCH 67/84] Enable avc check --- main.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.fmf b/main.fmf index 0cb4e83..3da3438 100644 --- a/main.fmf +++ b/main.fmf @@ -1,5 +1,5 @@ # QE owner contact: Frantisek Hrdina component: frr -#check: -# - how: avc \ No newline at end of file +check: + - how: avc \ No newline at end of file From 1cffbc6db076d86ea99fdcea4b8e4510e6ad0e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 28 Jan 2025 15:30:16 +0100 Subject: [PATCH 68/84] Add test for RHEL-76401 --- .../daemons-vnc | 121 ++++++++++++++ .../daemons-vns | 121 ++++++++++++++ .../frr-vnc.conf | 31 ++++ .../frr-vnc.service | 23 +++ .../frr-vns.conf | 33 ++++ .../frr-vns.service | 23 +++ .../main.fmf | 30 ++++ .../test.sh | 152 ++++++++++++++++++ .../vtysh-vnc.conf | 1 + .../vtysh-vns.conf | 1 + 10 files changed, 536 insertions(+) create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf create mode 100755 Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf create mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc new file mode 100644 index 0000000..ee66012 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=yes +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns new file mode 100644 index 0000000..ebd3f68 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=yes +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf new file mode 100644 index 0000000..8a00480 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf @@ -0,0 +1,31 @@ +hostname RouterVNC +! +log file debugging +! +debug bgp keepalives +debug bgp neighbor-events +debug bgp nht +debug bgp updates in +debug bgp updates out +debug bgp zebra +debug bgp bfd +debug bfd distributed +debug bfd peer +debug bfd zebra +debug bfd network +! +router bgp + bgp router-id + no bgp ebgp-requires-policy + neighbor remote-as + neighbor bfd +exit +! +bfd + peer + exit + ! +exit +line vty +! +exit diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service new file mode 100644 index 0000000..9decd6e --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf new file mode 100644 index 0000000..20d8d0e --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf @@ -0,0 +1,33 @@ +hostname RouterVNS +log file +log timestamp precision 3 +no ipv6 forwarding +service integrated-vtysh-config +! +debug bgp keepalives +debug bgp neighbor-events +debug bgp nht +debug bgp updates in +debug bgp updates out +debug bgp zebra +debug bgp bfd +debug bfd distributed +debug bfd peer +debug bfd zebra +debug bfd network +! +router bgp + bgp router-id + no bgp ebgp-requires-policy + neighbor remote-as + neighbor bfd profile foo +exit +! +bfd + peer + exit + ! +exit +line vty +! +exit \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service new file mode 100644 index 0000000..9ed4bb1 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service @@ -0,0 +1,23 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf new file mode 100644 index 0000000..2196ee2 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf @@ -0,0 +1,30 @@ +summary: Test summary +description: '' +contact: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +require: + - library(virtual-network/virtual-network) +duration: 10m +enabled: true +tag: + - Tier1 +tier: '1' +link: + - verifies: https://issues.redhat.com/browse/RHEL-76401 +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-9.6 + continue: false + - enabled: false + when: distro < rhel-10.0 + continue: false + - enabled: false + when: distro < centos-stream-9 + continue: false \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh new file mode 100755 index 0000000..308f4ae --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh @@ -0,0 +1,152 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +PACKAGE="frr" + +SERVER_CLIENT_IF_ADDR="192.168.222.0" +SERVER_CLIENT_IF_PREFIX="24" + +SERVER_IF_ADDR="192.168.222.1" +SERVER_IF_PREFIX="24" +SERVER_IF_BCAST="192.168.222.255" + +SERVER_BGP_AS="65000" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.2" +CLIENT_IF_PREFIX="24" +CLIENT_IF_BCAST="192.168.222.255" + +CLIENT_BGP_AS="65001" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +MAIN_LOG="/tmp/log_routes" + + +rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + + rlRun "ip a" + vnRunClient "ip a" + vnRunServer "ip a" + + 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 "mkdir /etc/frr/{vns,vnc}" + + rm -rf /etc/frr/frr.conf + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "cat ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "cat ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run'" + rlRun "vtysh -N vnc -c 'sh run'" + + # Check that BGP was established + rlRun "sleep 5m" 0 "Waiting for peers to exchange routes and converge" + rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" + rlAssertGrep "BGP state = Established" show-bgp-neighbors.log + + # The shutdown of BFD should set BGP's status to idle. + rlRun "vtysh -N vns -c 'conf t' -c 'bfd' -c 'profile foo' -c 'shutdown'" + sleep 5s + rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" + rlAssertNotGrep "BGP state = Established" show-bgp-neighbors.log + rlAssertGrep "BGP state = Idle" show-bgp-neighbors.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf new file mode 100644 index 0000000..f863f56 --- /dev/null +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config \ No newline at end of file From 787bcd076aa81f601cfb0141a8d36fa6471db134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 6 Feb 2025 18:20:39 +0100 Subject: [PATCH 69/84] Metadata update of test for RHEL-76041 --- .../main.fmf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf index 2196ee2..486096b 100644 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf @@ -1,4 +1,4 @@ -summary: Test summary +summary: BFD status down in FRR does not bring down BGP description: '' contact: Frantisek Hrdina component: @@ -16,15 +16,20 @@ tag: tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-76401 + - verifies: https://issues.redhat.com/browse/RHEL-78318 + - verifies: https://issues.redhat.com/browse/RHEL-78319 + - verifies: https://issues.redhat.com/browse/RHEL-78324 environment: AVC_ERROR: +no_avc_check adjust: - enabled: false - when: distro < rhel-9.6 + when: distro < rhel-9.4 continue: false - enabled: false - when: distro < rhel-10.0 + when: distro < rhel-10 continue: false - enabled: false when: distro < centos-stream-9 - continue: false \ No newline at end of file + continue: false +extra-nitrate: TC#0618545 +id: 4428f64b-1038-4c38-b52d-7e788be96038 \ No newline at end of file From 93c4779a6fc2e62b29226458c4a0909e7ffda4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 10 Feb 2025 15:39:30 +0100 Subject: [PATCH 70/84] Add test for RHEL-78638 --- .../main.fmf | 24 ++++++++++++++++ .../test.sh | 28 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf create mode 100755 Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf new file mode 100644 index 0000000..ab93929 --- /dev/null +++ b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf @@ -0,0 +1,24 @@ +summary: frr-reload.py suffers from unescaped regex sequences +description: 'When running frr and trying to reload configuration, frr-reload.py will not work correctly and it will emit a lot of python SyntaxWarnings' +contact: Frantisek Hrdina +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-78638 +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-8 + continue: false diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh new file mode 100755 index 0000000..f696ea9 --- /dev/null +++ b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlPhaseEnd + + rlPhaseStartTest + if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then + DIR="libexec" + else + DIR="lib" + fi + rlRun "/usr/$DIR/frr/frr-reload.py &> reload.log --help" 0 + rlAssertNotGrep "SyntaxWarning" reload.log + rlAssertNotGrep "invalid escape sequence" reload.log + rlPhaseEnd + + rlPhaseStartCleanup + rlFileSubmit reload.log + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 3cf3c81f3bc9b892f833e0c2353baec6c11a7232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 11 Feb 2025 09:39:36 +0100 Subject: [PATCH 71/84] Fix relevancy of test for RHEL-76401 --- .../main.fmf | 3 --- 1 file changed, 3 deletions(-) diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf index 486096b..8c9d61b 100644 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf @@ -25,9 +25,6 @@ adjust: - enabled: false when: distro < rhel-9.4 continue: false - - enabled: false - when: distro < rhel-10 - continue: false - enabled: false when: distro < centos-stream-9 continue: false From 0785f7f7851133d4842eeb23c53c2b22594ff76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Mon, 10 Feb 2025 17:11:22 +0100 Subject: [PATCH 72/84] Metadata update of test for RHEL-78638 --- .../main.fmf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf index ab93929..c40cd86 100644 --- a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf +++ b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf @@ -1,5 +1,6 @@ summary: frr-reload.py suffers from unescaped regex sequences -description: 'When running frr and trying to reload configuration, frr-reload.py will not work correctly and it will emit a lot of python SyntaxWarnings' +description: When running frr and trying to reload configuration, frr-reload.py will + not work correctly and it will emit a lot of python SyntaxWarnings contact: Frantisek Hrdina component: - frr @@ -18,7 +19,9 @@ 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' + because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 - enabled: false when: distro < rhel-8 continue: false +extra-nitrate: TC#0618556 +id: 5308d683-881a-4af4-889c-a1abea49a1a6 From c7897fc7d3ea6af2ea598467c6b61ba7dbfec737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 11 Feb 2025 14:23:56 +0100 Subject: [PATCH 73/84] Metadata update of test for RHEL-67011 --- .../main.fmf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf index 5041710..d1d6c25 100644 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf @@ -17,11 +17,14 @@ tag: tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-67011 + - verifies: https://issues.redhat.com/browse/RHEL-78354 + - verifies: https://issues.redhat.com/browse/RHEL-78356 + - verifies: https://issues.redhat.com/browse/RHEL-78357 environment: AVC_ERROR: +no_avc_check adjust: - enabled: false - when: distro < rhel-9.6 + when: distro < rhel-9.4 continue: false - enabled: false when: distro < centos-stream-9 From 24aedaf683a524eca1ab3235ea65feab80f54b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 14 Feb 2025 12:01:28 +0100 Subject: [PATCH 74/84] Metadata update of test for RHEL-68432 --- Regression/gracefull-restart/main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf index efa8b3d..80601bd 100644 --- a/Regression/gracefull-restart/main.fmf +++ b/Regression/gracefull-restart/main.fmf @@ -16,13 +16,15 @@ tag: tier: '1' link: - verifies: https://issues.redhat.com/browse/RHEL-68432 + - verifies: https://issues.redhat.com/browse/RHEL-78364 + - verifies: https://issues.redhat.com/browse/RHEL-78365 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-9 + when: distro < rhel-9.4 continue: false - enabled: false when: distro < centos-stream-9 From eb54f13dcde7d3aa34b798cf04a68b79a5b8c2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 14 Feb 2025 18:19:54 +0100 Subject: [PATCH 75/84] Improve bfd-session-down-does-not-trigger-bgp-session-down test --- .../bfd-session-down-does-not-trigger-bgp-session-down/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh index 308f4ae..36b7093 100755 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh @@ -135,6 +135,8 @@ rlJournalStart vnRemoveServerClientNetwork + rlFileSubmit show-bgp-neighbors.log + rlFileRestore rlRun "systemctl daemon-reload" From cc0bbdbb99eead694fbdb622a0e464a3fda61cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 14 Feb 2025 19:07:29 +0100 Subject: [PATCH 76/84] Improve bfd-session-down-does-not-trigger-bgp-session-down test Increase timeout before checking output --- .../bfd-session-down-does-not-trigger-bgp-session-down/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh index 36b7093..f56d0b9 100755 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh @@ -124,7 +124,7 @@ rlJournalStart # The shutdown of BFD should set BGP's status to idle. rlRun "vtysh -N vns -c 'conf t' -c 'bfd' -c 'profile foo' -c 'shutdown'" - sleep 5s + sleep 10s rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" rlAssertNotGrep "BGP state = Established" show-bgp-neighbors.log rlAssertGrep "BGP state = Idle" show-bgp-neighbors.log From 0d252ee799c8954f771616ea26f67eb5b8aaf4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 4 Mar 2025 17:08:22 +0100 Subject: [PATCH 77/84] Add test for BGP --- Sanity/basic-bgp/daemons-vnc | 121 ++++++++++ Sanity/basic-bgp/daemons-vns | 121 ++++++++++ Sanity/basic-bgp/frr-vnc.conf | 24 ++ Sanity/basic-bgp/frr-vnc.service | 25 ++ Sanity/basic-bgp/frr-vns.conf | 24 ++ Sanity/basic-bgp/frr-vns.service | 25 ++ Sanity/basic-bgp/main.fmf | 22 ++ Sanity/basic-bgp/test.sh | 388 +++++++++++++++++++++++++++++++ Sanity/basic-bgp/vtysh-vnc.conf | 1 + Sanity/basic-bgp/vtysh-vns.conf | 1 + 10 files changed, 752 insertions(+) create mode 100644 Sanity/basic-bgp/daemons-vnc create mode 100644 Sanity/basic-bgp/daemons-vns create mode 100644 Sanity/basic-bgp/frr-vnc.conf create mode 100644 Sanity/basic-bgp/frr-vnc.service create mode 100644 Sanity/basic-bgp/frr-vns.conf create mode 100644 Sanity/basic-bgp/frr-vns.service create mode 100644 Sanity/basic-bgp/main.fmf create mode 100755 Sanity/basic-bgp/test.sh create mode 100644 Sanity/basic-bgp/vtysh-vnc.conf create mode 100644 Sanity/basic-bgp/vtysh-vns.conf diff --git a/Sanity/basic-bgp/daemons-vnc b/Sanity/basic-bgp/daemons-vnc new file mode 100644 index 0000000..3b386ba --- /dev/null +++ b/Sanity/basic-bgp/daemons-vnc @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vnc" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Sanity/basic-bgp/daemons-vns b/Sanity/basic-bgp/daemons-vns new file mode 100644 index 0000000..7a5ec3f --- /dev/null +++ b/Sanity/basic-bgp/daemons-vns @@ -0,0 +1,121 @@ +# 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 +pim6d=no +nhrpd=no +eigrpd=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no +pathd=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" +pim6d_options=" -A ::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" +pathd_options=" -A 127.0.0.1" + + +# If you want to pass a common option to all daemons, you can use the +# "frr_global_options" variable. +# +#frr_global_options="" + + +# The list of daemons to watch is automatically generated by the init script. +# This variable can be used to pass options to watchfrr that will be passed +# prior to the daemon list. +# +# To make watchfrr create/join the specified netns, add the the "--netns" +# option here. It will only have an effect in /etc/frr//daemons, and +# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". +# +watchfrr_options="--netns=vns" + + +# 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 + +# Uncomment this option if you want to run FRR as a non-root user. Note that +# you should know what you are doing since most of the daemons need root +# to work. This could be useful if you want to run FRR in a container +# for instance. +# FRR_NO_ROOT="yes" + +# For any daemon, you can specify a "wrap" command to start instead of starting +# the daemon directly. This will simply be prepended to the daemon invocation. +# These variables have the form daemon_wrap, where 'daemon' is the name of the +# daemon (the same pattern as the daemon_options variables). +# +# Note that when daemons are started, they are told to daemonize with the `-d` +# option. This has several implications. For one, the init script expects that +# when it invokes a daemon, the invocation returns immediately. If you add a +# wrap command here, it must comply with this expectation and daemonize as +# well, or the init script will never return. Furthermore, because daemons are +# themselves daemonized with -d, you must ensure that your wrapper command is +# capable of following child processes after a fork() if you need it to do so. +# +# If your desired wrapper does not support daemonization, you can wrap it with +# a utility program that daemonizes programs, such as 'daemonize'. An example +# of this might look like: +# +# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" +# +# This is particularly useful for programs which record processes but lack +# daemonization options, such as perf and rr. +# +# If you wish to wrap all daemons in the same way, you may set the "all_wrap" +# variable. +# +#all_wrap="" diff --git a/Sanity/basic-bgp/frr-vnc.conf b/Sanity/basic-bgp/frr-vnc.conf new file mode 100644 index 0000000..d974838 --- /dev/null +++ b/Sanity/basic-bgp/frr-vnc.conf @@ -0,0 +1,24 @@ +hostname RouterVNC +! +log file debugging +! +router bgp + bgp router-id + no bgp default ipv4-unicast + neighbor remote-as + neighbor remote-as + ! + address-family ipv4 unicast + network / + network / + network / + neighbor activate + exit-address-family + ! + address-family ipv6 unicast + network / + network / + network / + neighbor activate + exit-address-family +exit \ No newline at end of file diff --git a/Sanity/basic-bgp/frr-vnc.service b/Sanity/basic-bgp/frr-vnc.service new file mode 100644 index 0000000..8ce3c85 --- /dev/null +++ b/Sanity/basic-bgp/frr-vnc.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc +ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc +ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc + +[Install] +WantedBy=multi-user.target diff --git a/Sanity/basic-bgp/frr-vns.conf b/Sanity/basic-bgp/frr-vns.conf new file mode 100644 index 0000000..1ff9c2d --- /dev/null +++ b/Sanity/basic-bgp/frr-vns.conf @@ -0,0 +1,24 @@ +hostname RouterVNS +! +log file debugging +! +router bgp + bgp router-id + no bgp default ipv4-unicast + neighbor remote-as + neighbor remote-as + ! + address-family ipv4 unicast + network / + network / + network / + neighbor activate + exit-address-family + ! + address-family ipv6 unicast + network / + network / + network / + neighbor activate + exit-address-family +exit \ No newline at end of file diff --git a/Sanity/basic-bgp/frr-vns.service b/Sanity/basic-bgp/frr-vns.service new file mode 100644 index 0000000..d9fa54f --- /dev/null +++ b/Sanity/basic-bgp/frr-vns.service @@ -0,0 +1,25 @@ +[Unit] +Description=FRRouting +Documentation=https://frrouting.readthedocs.io/en/latest/setup.html +Wants=network.target +After=network-pre.target systemd-sysctl.service +Before=network.target +OnFailure=heartbeat-failed@%n.service + +[Service] +Nice=-5 +Type=forking +NotifyAccess=all +StartLimitInterval=3m +StartLimitBurst=3 +TimeoutSec=2m +WatchdogSec=60s +RestartSec=5 +Restart=on-abnormal +LimitNOFILE=1024 +ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns +ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns +ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns + +[Install] +WantedBy=multi-user.target diff --git a/Sanity/basic-bgp/main.fmf b/Sanity/basic-bgp/main.fmf new file mode 100644 index 0000000..76651c9 --- /dev/null +++ b/Sanity/basic-bgp/main.fmf @@ -0,0 +1,22 @@ +summary: Basic BGP test +description: Testing BGP functionality without multihosts using virtual networks +contact: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr +require: + - library(virtual-network/virtual-network) +duration: 10m +enabled: true +tag: + - Tier1 +tier: '1' +environment: + AVC_ERROR: +no_avc_check +adjust: + - enabled: false + when: distro < rhel-8 + continue: false \ No newline at end of file diff --git a/Sanity/basic-bgp/test.sh b/Sanity/basic-bgp/test.sh new file mode 100755 index 0000000..94d1995 --- /dev/null +++ b/Sanity/basic-bgp/test.sh @@ -0,0 +1,388 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +PACKAGE="frr" + +SERVER_CLIENT_IF_ADDR="192.168.222.0" +SERVER_CLIENT_IF_PREFIX="24" + +SERVER_IF_ADDR="192.168.222.1" +SERVER_IF_PREFIX="24" +SERVER_IF_BCAST="192.168.222.255" + +SERVER_BGP_AS="65000" + +SERVER_STUB_1_IF_ADDR="192.168.101.0" +SERVER_STUB_1_IF_PREFIX="24" +SERVER_STUB_1_IF6_ADDR="2001:aaaa:bbbb:1000::" +SERVER_STUB_1_IF6_PREFIX="64" + +SERVER_STUB_2_IF_ADDR="192.168.102.0" +SERVER_STUB_2_IF_PREFIX="24" +SERVER_STUB_2_IF6_ADDR="2001:aaaa:bbbb:2000::" +SERVER_STUB_2_IF6_PREFIX="64" + +SERVER_FRR_LOG="/var/log/frr/frr-r1.log" +SERVER_CONF_DIR="/etc/frr/vns/" + +CLIENT_IF_ADDR="192.168.222.2" +CLIENT_IF_PREFIX="24" +CLIENT_IF_BCAST="192.168.222.255" + +CLIENT_BGP_AS="75000" + +CLIENT_STUB_1_IF_ADDR="192.168.201.0" +CLIENT_STUB_1_IF_PREFIX="24" +CLIENT_STUB_1_IF6_ADDR="2001:aaaa:bbbb:3000::" +CLIENT_STUB_1_IF6_PREFIX="64" + +CLIENT_STUB_2_IF_ADDR="192.168.202.0" +CLIENT_STUB_2_IF_PREFIX="24" +CLIENT_STUB_2_IF6_ADDR="2001:aaaa:bbbb:4000::" +CLIENT_STUB_2_IF6_PREFIX="64" + +CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" +CLIENT_CONF_DIR="/etc/frr/vnc/" + +SERVER_CLIENT_IF6_ADDR="2001:aaaa:bbbb:5000::" +SERVER_CLIENT_IF6_PREFIX="64" + +SERVER_IF6_ADDR="2001:aaaa:bbbb:5000::1" +SERVER_IF6_PREFIX="64" + +CLIENT_IF6_ADDR="2001:aaaa:bbbb:5000::2" +CLIENT_IF6_PREFIX="64" + + +MAIN_LOG="/tmp/log_routes" + + +rlJournalStart + rlPhaseStartSetup "import virtual-network library" + rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" + rlPhaseEnd + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + TestDir=$(pwd) + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + + # Need to disable SeLinux, because it does not allow to start service via unit file + # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. + rlRun "setenforce 0" 0 "Disabling SELinux" + rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" + rlRun "AVC_ERROR=+no_avc_check" + + # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses + # for the set src part of the configuration + vnCreateServerClientNetwork + vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" + vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" + vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" + vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" + + vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" + vnRunServer "ip addr add ${SERVER_IF6_ADDR}/${SERVER_IF6_PREFIX} dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" + vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" + vnRunClient "ip addr add ${CLIENT_IF6_ADDR}/${CLIENT_IF6_PREFIX} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv6 address on CLIENT side of veth" + + + # Create isolated stub 1 network available only from SERVER network + vnRunServer "ip link add VNS_STUB_1 type veth peer name VNS_STUB_PEER_1" + vnRunServer "ip link set VNS_STUB_1 netns ${vnSERVER_NAMESPACE}" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} dev VNS_STUB_1" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF6_ADDR}/${SERVER_STUB_1_IF6_PREFIX} dev VNS_STUB_1" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_1 up" + vnRunServer "ip link set VNS_STUB_PEER_1 up" + + # Create isolated stub 2 network available only from SERVER network + vnRunServer "ip link add VNS_STUB_2 type veth peer name VNS_STUB_PEER_2" + vnRunServer "ip link set VNS_STUB_2 netns ${vnSERVER_NAMESPACE}" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} dev VNS_STUB_2" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF6_ADDR}/${SERVER_STUB_2_IF6_PREFIX} dev VNS_STUB_2" + vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_2 up" + vnRunServer "ip link set VNS_STUB_PEER_2 up" + + # Create isolated stub 1 network available only from CLIENT network + vnRunClient "ip link add VNC_STUB_1 type veth peer name VNC_STUB_PEER_1" + vnRunClient "ip link set VNC_STUB_1 netns ${vnCLIENT_NAMESPACE}" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} dev VNC_STUB_1" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF6_ADDR}/${CLIENT_STUB_1_IF6_PREFIX} dev VNC_STUB_1" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_1 up" + vnRunClient "ip link set VNC_STUB_PEER_1 up" + + # Create isolated stub 2 network available only from CLIENT network + vnRunClient "ip link add VNC_STUB_2 type veth peer name VNC_STUB_PEER_2" + vnRunClient "ip link set VNC_STUB_2 netns ${vnCLIENT_NAMESPACE}" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} dev VNC_STUB_2" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF6_ADDR}/${CLIENT_STUB_2_IF6_PREFIX} dev VNC_STUB_2" + vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_2 up" + vnRunClient "ip link set VNC_STUB_PEER_2 up" + + rlRun "ip a &> ip.log" + vnRunServer "ip a &> server-ip.log" + vnRunClient "ip a &> client-ip.log" + + 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 "mkdir /etc/frr/{vns,vnc}" + + rm -rf /etc/frr/frr.conf + #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace + rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" + rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" + + #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace + rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" + rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" + + #I need separate daemons files as well for watchfrr options + rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" + rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" + + rlRun "ls -lR /etc/frr/*" + rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" + + # /etc/frr/vns/frr.conf + rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_1_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_STUB_2_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_CLIENT_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" + + # /etc/frr/vnc/frr.conf + rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_1_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_1_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${CLIENT_STUB_1_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_1_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${CLIENT_STUB_2_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "sed -i 's||${SERVER_CLIENT_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_CLIENT_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" + rlRun "sed -i 's||${SERVER_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" + + rlRun "systemctl daemon-reload" + rlPhaseEnd + + rlPhaseStartTest + vnRunServer "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Server should be capable to ping its stub 1 ipv4 address" + vnRunServer "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Server should be capable to ping its stub 2 ipv4 address" + + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 ipv4 address before FRR with BGP is run" + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 ipv4 address before FRR with BGP is run" + + vnRunClient "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Client should be capable to ping its stub 1 ipv4 address" + vnRunClient "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Client should be capable to ping its stub 2 ipv4 address" + + vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 ipv4 address before FRR with BGP is run" + vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 ipv4 address before FRR with BGP is run" + + vnRunServer "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 0 "Server should be capable to ping its stub 1 ipv6 address" + vnRunServer "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 0 "Server should be capable to ping its stub 2 ipv6 address" + + vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 ipv6 address before FRR with BGP is run" + vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 ipv6 address before FRR with BGP is run" + + vnRunClient "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 0 "Client should be capable to ping its stub 1 ipv6 address" + vnRunClient "ping6 -c 1 ${CLIENT_STUB_2_IF6_ADDR}" 0 "Client should be capable to ping its stub 2 ipv6 address" + + vnRunClient "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 ipv6 address before FRR with BGP is run" + vnRunClient "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 ipv6 address before FRR with BGP is run" + + rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" + rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" + + if rlIsRHEL ">8.3" || rlIsFedora || rlIsCentOS '>=8'; then + rlRun "vtysh -N vns -c 'configure terminal' -c 'router bgp $SERVER_BGP_AS' -c 'no bgp ebgp-requires-policy'" + rlRun "vtysh -N vnc -c 'configure terminal' -c 'router bgp $CLIENT_BGP_AS' -c 'no bgp ebgp-requires-policy'" + fi + + #vtysh also needs to run for a specific namespace + rlRun "vtysh -N vns -c 'sh run' &> server-show-running-config.log" + rlRun "vtysh -N vnc -c 'sh run' &> client-show-running-config.log" + + vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client ipv4 address" + vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server ipv4 address" + + vnRunServer "ping6 -c 1 ${CLIENT_IF6_ADDR}" 0 "Testing that server can ping client ipv6 address" + vnRunClient "ping6 -c 1 ${SERVER_IF6_ADDR}" 0 "Testing that client can ping server ipv6 address" + + rlRun "sleep 60" 0 "Waiting for peers to exchange routes and converge" + rlPhaseEnd + + rlPhaseStartTest "ipv4" + # check server + rlRun "vtysh -N vns -c 'show ip bgp ipv4 neighbors' &> server-show-ip-bgp-ipv4-neighbors.log" + rlAssertGrep "BGP state = Established" server-show-ip-bgp-ipv4-neighbors.log + rlAssertGrep "BGP neighbor is $CLIENT_IF_ADDR, remote AS $CLIENT_BGP_AS, local AS $SERVER_BGP_AS" server-show-ip-bgp-ipv4-neighbors.log + + rlRun "vtysh -N vns -c 'sh ip bgp ipv4' &> server-show-ip-bgp-ipv4.log" + rlAssertGrep "\*>\s*${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E + rlAssertGrep "\*>\s*${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E + if rlIsRHELLike '>=10' || rlIsFedora; then + rlAssertGrep "\*\s*${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E + else + rlAssertGrep "\*\s*${SERVER_CLIENT_IF_ADDR}/${SERVER_CLIENT_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E + fi + rlRun "vtysh -N vns -c 'show ip route' &> server-show-ip-route.log" + rlAssertGrep "B>\* ${CLIENT_STUB_1_IF_ADDR}" server-show-ip-route.log + rlAssertGrep "B>\* ${CLIENT_STUB_2_IF_ADDR}" server-show-ip-route.log + + + # check client + rlRun "vtysh -N vnc -c 'show ip bgp ipv4 neighbors' &> client-show-ip-bgp-ipv4-neighbors.log" + rlAssertGrep "BGP state = Established" client-show-ip-bgp-ipv4-neighbors.log + rlAssertGrep "BGP neighbor is $SERVER_IF_ADDR, remote AS $SERVER_BGP_AS, local AS $CLIENT_BGP_AS" client-show-ip-bgp-ipv4-neighbors.log + + rlRun "vtysh -N vnc -c 'sh ip bgp ipv4' &> client-show-ip-bgp-ipv4.log" + rlAssertGrep "\*>\s*${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E + rlAssertGrep "\*>\s*${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E + if rlIsRHELLike '>=10' || rlIsFedora; then + rlAssertGrep "\*\s*${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E + else + rlAssertGrep "\*\s*${SERVER_CLIENT_IF_ADDR}/${SERVER_CLIENT_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E + fi + + rlRun "vtysh -N vnc -c 'show ip route' &> client-show-ip-route.log" + rlAssertGrep "B>\* ${SERVER_STUB_1_IF_ADDR}" client-show-ip-route.log + rlAssertGrep "B>\* ${SERVER_STUB_2_IF_ADDR}" client-show-ip-route.log + + + vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Server should be capable to ping client's stub 1 ipv4 address since FRR with BGP is run" + vnRunServer "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Server should be capable to ping client's stub 2 ipv4 address since FRR with BGP is run" + vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Client should be capable to ping server's stub 1 ipv4 address since FRR with BGP is run" + vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Client should be capable to ping server's stub 2 ipv4 address since FRR with BGP is run" + rlPhaseEnd + + rlPhaseStartTest "ipv6" + # check server + rlRun "vtysh -N vns -c 'show ip bgp ipv6 neighbors' &> server-show-ip-bgp-ipv6-neighbors.log" + rlAssertGrep "BGP state = Established" server-show-ip-bgp-ipv6-neighbors.log + rlAssertGrep "BGP neighbor is $CLIENT_IF6_ADDR, remote AS $CLIENT_BGP_AS, local AS $SERVER_BGP_AS" server-show-ip-bgp-ipv6-neighbors.log + + rlRun "vtysh -N vns -c 'sh ip bgp ipv6 wide' &> server-show-ip-bgp-ipv6.log" + rlAssertGrep "\*>\s*${CLIENT_STUB_1_IF6_ADDR}/${CLIENT_STUB_1_IF6_PREFIX}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E + rlAssertGrep "\*>\s*${CLIENT_STUB_2_IF6_ADDR}/${CLIENT_STUB_2_IF6_PREFIX}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E + if rlIsRHELLike '>=10' || rlIsFedora; then + rlAssertGrep "\*\s*.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E + else + rlAssertGrep "\*\s*${SERVER_CLIENT_IF6_ADDR}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E + fi + + rlRun "vtysh -N vns -c 'show ipv6 route' &> server-show-ipv6-route.log" + rlAssertGrep "B>\* ${CLIENT_STUB_1_IF6_ADDR}" server-show-ipv6-route.log + rlAssertGrep "B>\* ${CLIENT_STUB_2_IF6_ADDR}" server-show-ipv6-route.log + + + # check client + rlRun "vtysh -N vnc -c 'show ip bgp ipv6 neighbors' &> client-show-ip-bgp-ipv6-neighbors.log" + rlAssertGrep "BGP state = Established" client-show-ip-bgp-ipv6-neighbors.log + rlAssertGrep "BGP neighbor is $SERVER_IF6_ADDR, remote AS $SERVER_BGP_AS, local AS $CLIENT_BGP_AS" client-show-ip-bgp-ipv6-neighbors.log + + rlRun "vtysh -N vnc -c 'sh ip bgp ipv6 wide' &> client-show-ip-bgp-ipv6.log" + rlAssertGrep "\*>\s*${SERVER_STUB_1_IF6_ADDR}/${SERVER_STUB_1_IF6_PREFIX}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E + rlAssertGrep "\*>\s*${SERVER_STUB_2_IF6_ADDR}/${SERVER_STUB_2_IF6_PREFIX}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E + if rlIsRHELLike '>=10' || rlIsFedora; then + rlAssertGrep "\*\s*.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E + else + rlAssertGrep "\*\s*${SERVER_CLIENT_IF6_ADDR}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E + fi + + rlRun "vtysh -N vnc -c 'show ipv6 route' &> client-show-ipv6-route.log" + rlAssertGrep "B>\* ${SERVER_STUB_1_IF6_ADDR}" client-show-ipv6-route.log + rlAssertGrep "B>\* ${SERVER_STUB_2_IF6_ADDR}" client-show-ipv6-route.log + + + vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 0 "Server should be capable to ping client's stub 1 ipv6 address since FRR with BGP is run" + vnRunServer "ping6 -c 1 ${CLIENT_STUB_2_IF6_ADDR}" 0 "Server should be capable to ping client's stub 2 ipv6 address since FRR with BGP is run" + vnRunClient "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 0 "Client should be capable to ping server's stub 1 ipv6 address since FRR with BGP is run" + vnRunClient "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 0 "Client should be capable to ping server's stub 2 ipv6 address since FRR with BGP is run" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" + + rlFileSubmit "ip.log" + rlFileSubmit "server-ip.log" + rlFileSubmit "client-ip.log" + + rlFileSubmit "${SERVER_CONF_DIR}frr.conf" + rlFileSubmit "server-show-running-config.log" + rlFileSubmit "server-show-ip-bgp-ipv4-neighbors.log" + rlFileSubmit "server-show-ip-bgp-ipv4.log" + rlFileSubmit "server-show-ip-route.log" + rlFileSubmit "server-show-ip-bgp-ipv6-neighbors.log" + rlFileSubmit "server-show-ip-bgp-ipv6.log" + rlFileSubmit "server-show-ipv6-route.log" + rlFileSubmit $SERVER_FRR_LOG + + rlFileSubmit "${CLIENT_CONF_DIR}frr.conf" + rlFileSubmit "client-show-running-config.log" + rlFileSubmit "client-show-ip-bgp-ipv4-neighbors.log" + rlFileSubmit "client-show-ip-bgp-ipv4.log" + rlFileSubmit "client-show-ip-route.log" + rlFileSubmit "client-show-ip-bgp-ipv6-neighbors.log" + rlFileSubmit "client-show-ip-bgp-ipv6.log" + rlFileSubmit "client-show-ipv6-route.log" + rlFileSubmit $CLIENT_FRR_LOG + + vnRemoveServerClientNetwork + + rlFileRestore + rlRun "systemctl daemon-reload" + + # restoring SELinux + rlRun "setenforce 1" 0 "re-Enabling SELinux" + rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" + + # This should prevent propagating AVCs to the tests, that are following + rlRun "fixfiles restore" + rlRun "restorecon -R -v /" + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/Sanity/basic-bgp/vtysh-vnc.conf b/Sanity/basic-bgp/vtysh-vnc.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Sanity/basic-bgp/vtysh-vnc.conf @@ -0,0 +1 @@ +service integrated-vtysh-config diff --git a/Sanity/basic-bgp/vtysh-vns.conf b/Sanity/basic-bgp/vtysh-vns.conf new file mode 100644 index 0000000..e0ab9cb --- /dev/null +++ b/Sanity/basic-bgp/vtysh-vns.conf @@ -0,0 +1 @@ +service integrated-vtysh-config From e6af5c971ea192775726480fe1a64d9e9c7d6c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 5 Mar 2025 09:21:41 +0100 Subject: [PATCH 78/84] Metadata update of test for BGP --- Sanity/basic-bgp/main.fmf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sanity/basic-bgp/main.fmf b/Sanity/basic-bgp/main.fmf index 76651c9..1048770 100644 --- a/Sanity/basic-bgp/main.fmf +++ b/Sanity/basic-bgp/main.fmf @@ -19,4 +19,6 @@ environment: adjust: - enabled: false when: distro < rhel-8 - continue: false \ No newline at end of file + continue: false +extra-nitrate: TC#0618618 +id: c0829323-fe9b-4736-b28e-727e72845491 \ No newline at end of file From f29838aaf1eb6871f8fb6f4a231e658c7c3bffdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 12 Mar 2025 10:33:05 +0100 Subject: [PATCH 79/84] Update test authors --- .../main.fmf | 1 + .../FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf | 1 + Regression/bfd-crash-in-MetalLB/main.fmf | 1 + .../bfd-session-down-does-not-trigger-bgp-session-down/main.fmf | 1 + Regression/crash-in-plist-update/main.fmf | 1 + .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 1 + .../main.fmf | 1 + .../main.fmf | 1 + Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf | 1 + Regression/gracefull-restart/main.fmf | 1 + .../ospfd-crashes-in-route-node-delete-with-assertion/main.fmf | 1 + .../ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf | 1 + .../main.fmf | 1 + .../main.fmf | 1 + .../main.fmf | 1 + Regression/set-src-ipv6/main.fmf | 1 + Regression/vtysh-running-config-output-not-showing-bgp/main.fmf | 1 + Sanity/basic-bgp/main.fmf | 1 + Sanity/basic-ospf/main.fmf | 1 + Sanity/basic-rip/main.fmf | 1 + Sanity/initscript/main.fmf | 1 + Sanity/starting-daemons-test/main.fmf | 1 + Sanity/vtysh/extcommunity-list/main.fmf | 1 + 23 files changed, 23 insertions(+) diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf index d1d6c25..8c964d7 100644 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf @@ -1,6 +1,7 @@ summary: BGP with BFD has a dropped Connection before peering established description: When doing a BGP Peering with BFD between two FRR peers (peer A and peer B), the BGP is established but the peering takes place twice. +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index c4996e4..56cc5b6 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -2,6 +2,7 @@ summary: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) description: | Bug summary: FRR: Unable to configure OSPF in multi-instance mode Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf index 95cce51..99be159 100644 --- a/Regression/bfd-crash-in-MetalLB/main.fmf +++ b/Regression/bfd-crash-in-MetalLB/main.fmf @@ -1,5 +1,6 @@ summary: Testing if frr not crash when reloading with specific configs description: 'Reloading frr with specific bfd configs caused segfaults' +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf index 8c9d61b..bd37f2c 100644 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf @@ -1,5 +1,6 @@ summary: BFD status down in FRR does not bring down BGP description: '' +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf index 8924cb4..cf8dc41 100644 --- a/Regression/crash-in-plist-update/main.fmf +++ b/Regression/crash-in-plist-update/main.fmf @@ -1,5 +1,6 @@ summary: crash in plist update description: '' +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index 484d2fe..c49f58e 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -2,6 +2,7 @@ summary: Duplicated prefix lists when no seq is specified description: 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. +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index 1632a2a..defbd0e 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -4,6 +4,7 @@ description: The FRR reloader causes eBGP connection flapping when eBGP multihop FRR will default the TTL to 255 and show it in a vtysh "running-configuration" command which is used by the frr-reload script to calculate new configuration deltas. +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf index c40cd86..e3b5eb8 100644 --- a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf +++ b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf @@ -1,6 +1,7 @@ summary: frr-reload.py suffers from unescaped regex sequences description: When running frr and trying to reload configuration, frr-reload.py will not work correctly and it will emit a lot of python SyntaxWarnings +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf index 780e5f8..b4e84da 100644 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -2,6 +2,7 @@ summary: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) description: | Bug summary: frr scriptlet fails: line 15: hostname: command not found Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf index 80601bd..8749f8b 100644 --- a/Regression/gracefull-restart/main.fmf +++ b/Regression/gracefull-restart/main.fmf @@ -2,6 +2,7 @@ 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. +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf index d7a7640..053b75f 100644 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf @@ -15,6 +15,7 @@ adjust: - environment+: AVC_ERROR: +no_avc_check when: distro ~< rhel-8.7 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf index 6c7e817..9bdd85c 100644 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf @@ -2,6 +2,7 @@ summary: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) description: | Bug summary: ospfd not running with ospf opaque-lsa option used Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf index 98aa80a..132e03f 100644 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -2,6 +2,7 @@ summary: Test for BZ#2029958 (FRR reloader generating invalid BFD) description: | Bug summary: FRR reloader generating invalid BFD configurations, exits with error Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf index 3768e78..597017c 100644 --- a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -1,5 +1,6 @@ summary: Replace NetworkManager patch in the current version description: '' +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index 9762e39..c82f545 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -1,5 +1,6 @@ summary: Testing netns for multiple BGP instances when testing FRR description: 'Test that frr correctly changes inbound route filter after a config reload' +author: Michal Ruprich contact: Frantisek Hrdina component: - frr diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 020a1d2..50abc0d 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -1,6 +1,7 @@ summary: Testing the set src clause capability for IPv6 route-map description: Tests whether different set src clauses in one IPv6 route-map command work correctly +author: Michal Ruprich contact: Frantisek Hrdina component: - frr diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf index f3a2569..f2a637a 100644 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -2,6 +2,7 @@ summary: Test for BZ#1917269 (vtysh running-config output not showing bgp) description: | Bug summary: vtysh running-config output not showing bgp ttl-security hops option Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Sanity/basic-bgp/main.fmf b/Sanity/basic-bgp/main.fmf index 1048770..fdd845c 100644 --- a/Sanity/basic-bgp/main.fmf +++ b/Sanity/basic-bgp/main.fmf @@ -1,5 +1,6 @@ summary: Basic BGP test description: Testing BGP functionality without multihosts using virtual networks +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Sanity/basic-ospf/main.fmf b/Sanity/basic-ospf/main.fmf index 7702e83..543fa53 100644 --- a/Sanity/basic-ospf/main.fmf +++ b/Sanity/basic-ospf/main.fmf @@ -1,5 +1,6 @@ summary: Basic OSPF test description: Testing OSPF functionality without multihosts using virtual networks +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf index 2bf19eb..0fe2c5f 100644 --- a/Sanity/basic-rip/main.fmf +++ b/Sanity/basic-rip/main.fmf @@ -1,5 +1,6 @@ summary: Basic RIP test description: Testing RIP functionality without multihosts using virtual networks +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index 076cfe7..cb03158 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -1,5 +1,6 @@ summary: Basic initscript test for frr description: '' +author: Daniel Rusek contact: Frantisek Hrdina component: - frr diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf index d2bfaae..5e8b4d6 100644 --- a/Sanity/starting-daemons-test/main.fmf +++ b/Sanity/starting-daemons-test/main.fmf @@ -1,5 +1,6 @@ summary: The test enables frr daemons and checks, if they are run. description: '' +author: Frantisek Hrdina contact: Frantisek Hrdina component: - frr diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index c084817..846ac96 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -1,5 +1,6 @@ summary: It sets extcommunity and then list it description: '' +author: Daniel Rusek contact: Frantisek Hrdina component: - frr From b7202d92cb1c27dd22352e52ffc4df6f43ef6da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 27 Mar 2025 19:57:38 +0100 Subject: [PATCH 80/84] Keep QE contact only in root main.fmf --- .../main.fmf | 1 - .../FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf | 1 - Regression/bfd-crash-in-MetalLB/main.fmf | 1 - .../bfd-session-down-does-not-trigger-bgp-session-down/main.fmf | 1 - Regression/crash-in-plist-update/main.fmf | 1 - .../duplicated-prefix-lists-when-no-seq-is-specified/main.fmf | 1 - .../main.fmf | 1 - .../main.fmf | 1 - Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf | 1 - Regression/gracefull-restart/main.fmf | 1 - .../ospfd-crashes-in-route-node-delete-with-assertion/main.fmf | 1 - .../ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf | 1 - .../main.fmf | 1 - .../main.fmf | 1 - .../main.fmf | 1 - Regression/set-src-ipv6/main.fmf | 1 - Regression/vtysh-running-config-output-not-showing-bgp/main.fmf | 1 - Sanity/basic-bgp/main.fmf | 1 - Sanity/basic-ospf/main.fmf | 1 - Sanity/basic-rip/main.fmf | 1 - Sanity/initscript/main.fmf | 1 - Sanity/starting-daemons-test/main.fmf | 1 - Sanity/vtysh/extcommunity-list/main.fmf | 1 - 23 files changed, 23 deletions(-) diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf index 8c964d7..a5d839b 100644 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf +++ b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf @@ -2,7 +2,6 @@ summary: BGP with BFD has a dropped Connection before peering established description: When doing a BGP Peering with BFD between two FRR peers (peer A and peer B), the BGP is established but the peering takes place twice. author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf index 56cc5b6..e115056 100644 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: FRR: Unable to configure OSPF in multi-instance mode Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf index 99be159..49561ae 100644 --- a/Regression/bfd-crash-in-MetalLB/main.fmf +++ b/Regression/bfd-crash-in-MetalLB/main.fmf @@ -1,7 +1,6 @@ summary: Testing if frr not crash when reloading with specific configs description: 'Reloading frr with specific bfd configs caused segfaults' author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf index bd37f2c..7bcdeeb 100644 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf @@ -1,7 +1,6 @@ summary: BFD status down in FRR does not bring down BGP description: '' author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf index cf8dc41..ebff8a4 100644 --- a/Regression/crash-in-plist-update/main.fmf +++ b/Regression/crash-in-plist-update/main.fmf @@ -1,7 +1,6 @@ summary: crash in plist update description: '' author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf index c49f58e..452abdd 100644 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf @@ -3,7 +3,6 @@ description: When creating a configuration with multiple prefix lists, without s the seq number and we load the file with the frr-reload.py script, the prefix lists are duplicated. author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf index defbd0e..e168761 100644 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf @@ -5,7 +5,6 @@ description: The FRR reloader causes eBGP connection flapping when eBGP multihop command which is used by the frr-reload script to calculate new configuration deltas. author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf index e3b5eb8..529c7bb 100644 --- a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf +++ b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf @@ -2,7 +2,6 @@ summary: frr-reload.py suffers from unescaped regex sequences description: When running frr and trying to reload configuration, frr-reload.py will not work correctly and it will emit a lot of python SyntaxWarnings author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf index b4e84da..961e034 100644 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: frr scriptlet fails: line 15: hostname: command not found Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf index 8749f8b..2b06172 100644 --- a/Regression/gracefull-restart/main.fmf +++ b/Regression/gracefull-restart/main.fmf @@ -3,7 +3,6 @@ description: When doing a BGP Peering with GR, there is a false warning. There i feature (Graceful Restart) which should work but logs will be polluted with false negative. author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf index 053b75f..1e31f57 100644 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf +++ b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf @@ -16,7 +16,6 @@ adjust: AVC_ERROR: +no_avc_check when: distro ~< rhel-8.7 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf index 9bdd85c..029bc4f 100644 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf +++ b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: ospfd not running with ospf opaque-lsa option used Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf index 132e03f..18bdc30 100644 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: FRR reloader generating invalid BFD configurations, exits with error Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf index 597017c..acb6fb7 100644 --- a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf +++ b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf @@ -1,7 +1,6 @@ summary: Replace NetworkManager patch in the current version description: '' author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf index c82f545..42b809d 100644 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf @@ -1,7 +1,6 @@ summary: Testing netns for multiple BGP instances when testing FRR description: 'Test that frr correctly changes inbound route filter after a config reload' author: Michal Ruprich -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf index 50abc0d..c2f660c 100644 --- a/Regression/set-src-ipv6/main.fmf +++ b/Regression/set-src-ipv6/main.fmf @@ -2,7 +2,6 @@ summary: Testing the set src clause capability for IPv6 route-map description: Tests whether different set src clauses in one IPv6 route-map command work correctly author: Michal Ruprich -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf index f2a637a..40b0783 100644 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf @@ -3,7 +3,6 @@ description: | Bug summary: vtysh running-config output not showing bgp ttl-security hops option Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/basic-bgp/main.fmf b/Sanity/basic-bgp/main.fmf index fdd845c..fcc0901 100644 --- a/Sanity/basic-bgp/main.fmf +++ b/Sanity/basic-bgp/main.fmf @@ -1,7 +1,6 @@ summary: Basic BGP test description: Testing BGP functionality without multihosts using virtual networks author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Sanity/basic-ospf/main.fmf b/Sanity/basic-ospf/main.fmf index 543fa53..4744a96 100644 --- a/Sanity/basic-ospf/main.fmf +++ b/Sanity/basic-ospf/main.fmf @@ -1,7 +1,6 @@ summary: Basic OSPF test description: Testing OSPF functionality without multihosts using virtual networks author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf index 0fe2c5f..632bed9 100644 --- a/Sanity/basic-rip/main.fmf +++ b/Sanity/basic-rip/main.fmf @@ -1,7 +1,6 @@ summary: Basic RIP test description: Testing RIP functionality without multihosts using virtual networks author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./test.sh diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf index cb03158..efab955 100644 --- a/Sanity/initscript/main.fmf +++ b/Sanity/initscript/main.fmf @@ -1,7 +1,6 @@ summary: Basic initscript test for frr description: '' author: Daniel Rusek -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf index 5e8b4d6..7fba99d 100644 --- a/Sanity/starting-daemons-test/main.fmf +++ b/Sanity/starting-daemons-test/main.fmf @@ -1,7 +1,6 @@ summary: The test enables frr daemons and checks, if they are run. description: '' author: Frantisek Hrdina -contact: Frantisek Hrdina component: - frr test: ./runtest.sh diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf index 846ac96..b36db1a 100644 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ b/Sanity/vtysh/extcommunity-list/main.fmf @@ -1,7 +1,6 @@ summary: It sets extcommunity and then list it description: '' author: Daniel Rusek -contact: Frantisek Hrdina component: - frr test: ./runtest.sh From 8cf808c475730831e7a620618e6390a0b618ad13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Thu, 3 Apr 2025 16:08:16 +0200 Subject: [PATCH 81/84] Add test for RHEL-65250 --- .../configuration-write-failed/main.fmf | 21 ++++++++ Regression/configuration-write-failed/test.sh | 53 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 Regression/configuration-write-failed/main.fmf create mode 100755 Regression/configuration-write-failed/test.sh diff --git a/Regression/configuration-write-failed/main.fmf b/Regression/configuration-write-failed/main.fmf new file mode 100644 index 0000000..1bb0c27 --- /dev/null +++ b/Regression/configuration-write-failed/main.fmf @@ -0,0 +1,21 @@ +summary: Configuration write failed +description: 'frr appears to not be able to write an integrated config when it is started in a namespace. This does not appear to occur when using it outside of one.' +author: Frantisek Hrdina +component: + - frr +test: ./test.sh +framework: beakerlib +recommend: + - frr + - procps-ng +duration: 5m +enabled: true +tag: + - Tier1 +tier: '1' +link: + - verifies: https://issues.redhat.com/browse/RHEL-65250 +adjust: + - enabled: false + when: distro < rhel-8.10 + continue: false diff --git a/Regression/configuration-write-failed/test.sh b/Regression/configuration-write-failed/test.sh new file mode 100755 index 0000000..574ce06 --- /dev/null +++ b/Regression/configuration-write-failed/test.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +namespace="test" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm frr + + 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 "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + + rlRun "mkdir /etc/frr/$namespace" + rlRun "cp /etc/frr/daemons /etc/frr/$namespace" + rlRun "cp /etc/frr/vtysh.conf /etc/frr/$namespace" + rlRun "touch /etc/frr/$namespace/frr.conf" + rlRun "chown -R frr:frr /etc/frr/$namespace" + + rlRun "sed -i 's/ospfd=yes/ospfd=no/' /etc/frr/$namespace/daemons" + rlRun "sed -i 's|#watchfrr_options=\"--netns\"|watchfrr_options=\"--netns=$namespace\"|' /etc/frr/$namespace/daemons" + rlRun "sed -i 's/no service integrated-vtysh-config/service integrated-vtysh-config/' /etc/frr/$namespace/vtysh.conf" + + rlRun "ip netns add $namespace" + rlPhaseEnd + + rlPhaseStartTest + rlRun "ip netns exec $namespace /usr/libexec/frr/frrinit.sh start $namespace" + rlRun "vtysh -N $namespace -c 'write' &> vtysh.log" + rlAssertGrep "Integrated configuration saved to /etc/frr/$namespace/frr.conf" vtysh.log + rlAssertNotGrep "Exiting: failed to connect to any daemons" vtysh.log + rlAssertNotGrep "Configuration write failed" vtysh.log + rlPhaseEnd + + rlPhaseStartCleanup + rlFileSubmit vtysh.log + rlRun "ip netns exec $namespace /usr/libexec/frr/frrinit.sh stop $namespace" + rlRun "ip netns del $namespace" + + rlFileRestore + + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd From 9e5bc043b0401614fa86d67f51eca462747086fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 4 Apr 2025 09:54:59 +0200 Subject: [PATCH 82/84] Metadata update of RHEL-62250 --- Regression/configuration-write-failed/main.fmf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Regression/configuration-write-failed/main.fmf b/Regression/configuration-write-failed/main.fmf index 1bb0c27..b5d351d 100644 --- a/Regression/configuration-write-failed/main.fmf +++ b/Regression/configuration-write-failed/main.fmf @@ -1,5 +1,6 @@ summary: Configuration write failed -description: 'frr appears to not be able to write an integrated config when it is started in a namespace. This does not appear to occur when using it outside of one.' +description: frr appears to not be able to write an integrated config when it is started + in a namespace. This does not appear to occur when using it outside of one. author: Frantisek Hrdina component: - frr @@ -19,3 +20,5 @@ adjust: - enabled: false when: distro < rhel-8.10 continue: false +extra-nitrate: TC#0618795 +id: b886e5b1-285c-4b17-acff-61ee0f0325ad \ No newline at end of file From 193a4a09d09c75e184aeb38d9cc15727c29d1d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Fri, 4 Apr 2025 13:55:56 +0200 Subject: [PATCH 83/84] Fix bfd-bgp test --- .../bfd-session-down-does-not-trigger-bgp-session-down/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh index f56d0b9..2219a76 100755 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh +++ b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh @@ -127,7 +127,7 @@ rlJournalStart sleep 10s rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" rlAssertNotGrep "BGP state = Established" show-bgp-neighbors.log - rlAssertGrep "BGP state = Idle" show-bgp-neighbors.log + rlAssertGrep "BGP state = (Idle|Active)" show-bgp-neighbors.log -E rlPhaseEnd rlPhaseStartCleanup From 16803532fae841e6e9ba50169f589af990354b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Tue, 21 Oct 2025 12:18:50 +0200 Subject: [PATCH 84/84] Public tests moved to centos-stream tests repositories --- .fmf/version | 1 - COMMITMENT | 46 --- LICENSE | 339 --------------- README.md | 4 +- .../daemons-vnc | 121 ------ .../daemons-vns | 121 ------ .../frr-vnc.conf | 27 -- .../frr-vnc.service | 23 -- .../frr-vns.conf | 39 -- .../frr-vns.service | 23 -- .../main.fmf | 36 -- .../test.sh | 149 ------- .../vtysh-vnc.conf | 1 - .../vtysh-vns.conf | 1 - .../daemons | 54 --- .../main.fmf | 33 -- .../runtest.sh | 77 ---- Regression/bfd-crash-in-MetalLB/daemons | 81 ---- Regression/bfd-crash-in-MetalLB/main.fmf | 32 -- .../bfd-crash-in-MetalLB/reproducer-1.conf | 27 -- .../bfd-crash-in-MetalLB/reproducer-2.conf | 12 - Regression/bfd-crash-in-MetalLB/test.sh | 59 --- .../daemons-vnc | 121 ------ .../daemons-vns | 121 ------ .../frr-vnc.conf | 31 -- .../frr-vnc.service | 23 -- .../frr-vns.conf | 33 -- .../frr-vns.service | 23 -- .../main.fmf | 32 -- .../test.sh | 154 ------- .../vtysh-vnc.conf | 1 - .../vtysh-vns.conf | 1 - .../configuration-write-failed/main.fmf | 24 -- Regression/configuration-write-failed/test.sh | 53 --- Regression/crash-in-plist-update/1.conf | 109 ----- Regression/crash-in-plist-update/2.conf | 103 ----- Regression/crash-in-plist-update/daemons | 81 ---- Regression/crash-in-plist-update/main.fmf | 35 -- Regression/crash-in-plist-update/run.sh | 3 - Regression/crash-in-plist-update/test.sh | 63 --- .../frr-pref-lists.conf | 39 -- .../main.fmf | 40 -- .../test.sh | 47 --- .../daemons | 81 ---- .../frr.conf | 10 - .../main.fmf | 39 -- .../test.sh | 45 -- .../main.fmf | 27 -- .../test.sh | 28 -- .../main.fmf | 29 -- .../runtest.sh | 45 -- Regression/gracefull-restart/daemons | 81 ---- Regression/gracefull-restart/frr.conf | 25 -- Regression/gracefull-restart/main.fmf | 33 -- Regression/gracefull-restart/test.sh | 43 -- .../main.fmf | 29 -- .../runtest.sh | 61 --- .../daemons | 80 ---- .../frr.conf | 13 - .../main.fmf | 29 -- .../runtest.sh | 70 ---- .../daemons | 81 ---- .../main.fmf | 31 -- .../new-frr.conf | 35 -- .../runtest.sh | 67 --- .../main.fmf | 22 - .../test.sh | 41 -- .../daemons-vnc | 121 ------ .../daemons-vns | 121 ------ .../frr-vnc-reload.conf | 20 - .../frr-vnc.conf | 19 - .../frr-vnc.service | 25 -- .../frr-vns.conf | 23 -- .../frr-vns.service | 25 -- .../main.fmf | 26 -- .../runtest.sh | 186 --------- .../vtysh-vnc.conf | 1 - .../vtysh-vns.conf | 1 - Regression/set-src-ipv6/daemons-vnc | 121 ------ Regression/set-src-ipv6/daemons-vns | 121 ------ Regression/set-src-ipv6/frr-vnc.conf | 20 - Regression/set-src-ipv6/frr-vnc.service | 25 -- Regression/set-src-ipv6/frr-vns.conf | 49 --- Regression/set-src-ipv6/frr-vns.service | 25 -- Regression/set-src-ipv6/main.fmf | 28 -- Regression/set-src-ipv6/runtest.sh | 189 --------- Regression/set-src-ipv6/vtysh-vnc.conf | 1 - Regression/set-src-ipv6/vtysh-vns.conf | 1 - .../daemons | 81 ---- .../frr.conf | 26 -- .../main.fmf | 32 -- .../runtest.sh | 62 --- Sanity/basic-bgp/daemons-vnc | 121 ------ Sanity/basic-bgp/daemons-vns | 121 ------ Sanity/basic-bgp/frr-vnc.conf | 24 -- Sanity/basic-bgp/frr-vnc.service | 25 -- Sanity/basic-bgp/frr-vns.conf | 24 -- Sanity/basic-bgp/frr-vns.service | 25 -- Sanity/basic-bgp/main.fmf | 24 -- Sanity/basic-bgp/test.sh | 388 ------------------ Sanity/basic-bgp/vtysh-vnc.conf | 1 - Sanity/basic-bgp/vtysh-vns.conf | 1 - Sanity/basic-ospf/daemons-vnc | 121 ------ Sanity/basic-ospf/daemons-vns | 121 ------ Sanity/basic-ospf/frr-vnc.conf | 13 - Sanity/basic-ospf/frr-vnc.service | 23 -- Sanity/basic-ospf/frr-vns.conf | 14 - Sanity/basic-ospf/frr-vns.service | 23 -- Sanity/basic-ospf/main.fmf | 24 -- Sanity/basic-ospf/test.sh | 242 ----------- Sanity/basic-ospf/vtysh-vnc.conf | 1 - Sanity/basic-ospf/vtysh-vns.conf | 1 - Sanity/basic-rip/daemons-vnc | 121 ------ Sanity/basic-rip/daemons-vns | 121 ------ Sanity/basic-rip/frr-vnc.conf | 11 - Sanity/basic-rip/frr-vnc.service | 23 -- Sanity/basic-rip/frr-vns.conf | 11 - Sanity/basic-rip/frr-vns.service | 23 -- Sanity/basic-rip/main.fmf | 24 -- Sanity/basic-rip/test.sh | 192 --------- Sanity/basic-rip/vtysh-vnc.conf | 1 - Sanity/basic-rip/vtysh-vns.conf | 1 - Sanity/initscript/daemons | 80 ---- Sanity/initscript/main.fmf | 27 -- Sanity/initscript/runtest.sh | 111 ----- Sanity/starting-daemons-test/daemons | 83 ---- Sanity/starting-daemons-test/main.fmf | 25 -- Sanity/starting-daemons-test/runtest.sh | 82 ---- Sanity/vtysh/extcommunity-list/bgpd.conf | 33 -- Sanity/vtysh/extcommunity-list/daemons | 80 ---- Sanity/vtysh/extcommunity-list/main.fmf | 25 -- Sanity/vtysh/extcommunity-list/runtest.sh | 78 ---- main.fmf | 5 - plans/all.fmf | 5 - plans/others.fmf | 20 - plans/selinux.fmf | 23 -- plans/tier1.fmf | 20 - plans/tier2-tier3.fmf | 20 - 138 files changed, 1 insertion(+), 7418 deletions(-) delete mode 100644 .fmf/version delete mode 100644 COMMITMENT delete mode 100644 LICENSE delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf delete mode 100755 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf delete mode 100644 Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf delete mode 100644 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons delete mode 100644 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf delete mode 100755 Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh delete mode 100644 Regression/bfd-crash-in-MetalLB/daemons delete mode 100644 Regression/bfd-crash-in-MetalLB/main.fmf delete mode 100644 Regression/bfd-crash-in-MetalLB/reproducer-1.conf delete mode 100644 Regression/bfd-crash-in-MetalLB/reproducer-2.conf delete mode 100755 Regression/bfd-crash-in-MetalLB/test.sh delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf delete mode 100755 Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf delete mode 100644 Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf delete mode 100644 Regression/configuration-write-failed/main.fmf delete mode 100755 Regression/configuration-write-failed/test.sh delete mode 100644 Regression/crash-in-plist-update/1.conf delete mode 100644 Regression/crash-in-plist-update/2.conf delete mode 100644 Regression/crash-in-plist-update/daemons delete mode 100644 Regression/crash-in-plist-update/main.fmf delete mode 100644 Regression/crash-in-plist-update/run.sh delete mode 100755 Regression/crash-in-plist-update/test.sh delete mode 100644 Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf delete mode 100644 Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf delete mode 100755 Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh delete mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons delete mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf delete mode 100644 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf delete mode 100755 Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh delete mode 100644 Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf delete mode 100755 Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh delete mode 100644 Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf delete mode 100755 Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh delete mode 100644 Regression/gracefull-restart/daemons delete mode 100644 Regression/gracefull-restart/frr.conf delete mode 100644 Regression/gracefull-restart/main.fmf delete mode 100755 Regression/gracefull-restart/test.sh delete mode 100644 Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf delete mode 100755 Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh delete mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons delete mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf delete mode 100644 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf delete mode 100755 Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh delete mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons delete mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf delete mode 100644 Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf delete mode 100755 Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh delete mode 100644 Regression/replace-network-manager-patch-in-the-current-version/main.fmf delete mode 100755 Regression/replace-network-manager-patch-in-the-current-version/test.sh delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf delete mode 100755 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf delete mode 100644 Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf delete mode 100644 Regression/set-src-ipv6/daemons-vnc delete mode 100644 Regression/set-src-ipv6/daemons-vns delete mode 100644 Regression/set-src-ipv6/frr-vnc.conf delete mode 100644 Regression/set-src-ipv6/frr-vnc.service delete mode 100644 Regression/set-src-ipv6/frr-vns.conf delete mode 100644 Regression/set-src-ipv6/frr-vns.service delete mode 100644 Regression/set-src-ipv6/main.fmf delete mode 100755 Regression/set-src-ipv6/runtest.sh delete mode 100644 Regression/set-src-ipv6/vtysh-vnc.conf delete mode 100644 Regression/set-src-ipv6/vtysh-vns.conf delete mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/daemons delete mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/frr.conf delete mode 100644 Regression/vtysh-running-config-output-not-showing-bgp/main.fmf delete mode 100755 Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh delete mode 100644 Sanity/basic-bgp/daemons-vnc delete mode 100644 Sanity/basic-bgp/daemons-vns delete mode 100644 Sanity/basic-bgp/frr-vnc.conf delete mode 100644 Sanity/basic-bgp/frr-vnc.service delete mode 100644 Sanity/basic-bgp/frr-vns.conf delete mode 100644 Sanity/basic-bgp/frr-vns.service delete mode 100644 Sanity/basic-bgp/main.fmf delete mode 100755 Sanity/basic-bgp/test.sh delete mode 100644 Sanity/basic-bgp/vtysh-vnc.conf delete mode 100644 Sanity/basic-bgp/vtysh-vns.conf delete mode 100644 Sanity/basic-ospf/daemons-vnc delete mode 100644 Sanity/basic-ospf/daemons-vns delete mode 100644 Sanity/basic-ospf/frr-vnc.conf delete mode 100644 Sanity/basic-ospf/frr-vnc.service delete mode 100644 Sanity/basic-ospf/frr-vns.conf delete mode 100644 Sanity/basic-ospf/frr-vns.service delete mode 100644 Sanity/basic-ospf/main.fmf delete mode 100755 Sanity/basic-ospf/test.sh delete mode 100644 Sanity/basic-ospf/vtysh-vnc.conf delete mode 100644 Sanity/basic-ospf/vtysh-vns.conf delete mode 100644 Sanity/basic-rip/daemons-vnc delete mode 100644 Sanity/basic-rip/daemons-vns delete mode 100644 Sanity/basic-rip/frr-vnc.conf delete mode 100644 Sanity/basic-rip/frr-vnc.service delete mode 100644 Sanity/basic-rip/frr-vns.conf delete mode 100644 Sanity/basic-rip/frr-vns.service delete mode 100644 Sanity/basic-rip/main.fmf delete mode 100755 Sanity/basic-rip/test.sh delete mode 100644 Sanity/basic-rip/vtysh-vnc.conf delete mode 100644 Sanity/basic-rip/vtysh-vns.conf delete mode 100644 Sanity/initscript/daemons delete mode 100644 Sanity/initscript/main.fmf delete mode 100755 Sanity/initscript/runtest.sh delete mode 100644 Sanity/starting-daemons-test/daemons delete mode 100644 Sanity/starting-daemons-test/main.fmf delete mode 100755 Sanity/starting-daemons-test/runtest.sh delete mode 100644 Sanity/vtysh/extcommunity-list/bgpd.conf delete mode 100644 Sanity/vtysh/extcommunity-list/daemons delete mode 100644 Sanity/vtysh/extcommunity-list/main.fmf delete mode 100755 Sanity/vtysh/extcommunity-list/runtest.sh delete mode 100644 main.fmf delete mode 100644 plans/all.fmf delete mode 100644 plans/others.fmf delete mode 100644 plans/selinux.fmf delete mode 100644 plans/tier1.fmf delete mode 100644 plans/tier2-tier3.fmf diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/COMMITMENT b/COMMITMENT deleted file mode 100644 index a687e0d..0000000 --- a/COMMITMENT +++ /dev/null @@ -1,46 +0,0 @@ -GPL Cooperation Commitment -Version 1.0 - -Before filing or continuing to prosecute any legal proceeding or claim -(other than a Defensive Action) arising from termination of a Covered -License, we commit to extend to the person or entity ('you') accused -of violating the Covered License the following provisions regarding -cure and reinstatement, taken from GPL version 3. As used here, the -term 'this License' refers to the specific Covered License being -enforced. - - However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly - and finally terminates your license, and (b) permanently, if the - copyright holder fails to notify you of the violation by some - reasonable means prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you - have received notice of violation of this License (for any work) - from that copyright holder, and you cure the violation prior to 30 - days after your receipt of the notice. - -We intend this Commitment to be irrevocable, and binding and -enforceable against us and assignees of or successors to our -copyrights. - -Definitions - -'Covered License' means the GNU General Public License, version 2 -(GPLv2), the GNU Lesser General Public License, version 2.1 -(LGPLv2.1), or the GNU Library General Public License, version 2 -(LGPLv2), all as published by the Free Software Foundation. - -'Defensive Action' means a legal proceeding or claim that We bring -against you in response to a prior proceeding or claim initiated by -you or your affiliate. - -'We' means each contributor to this repository as of the date of -inclusion of this file, including subsidiaries of a corporate -contributor. - -This work is available under a Creative Commons Attribution-ShareAlike -4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d159169..0000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/README.md b/README.md index 78caf70..bd55c47 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ -# frr - -Repository for frr CI tests \ No newline at end of file +Public tests have been moved to: https://gitlab.com/redhat/centos-stream/tests/ diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc deleted file mode 100644 index ee66012..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=yes -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns deleted file mode 100644 index ebd3f68..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=yes -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf deleted file mode 100644 index ace1b80..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.conf +++ /dev/null @@ -1,27 +0,0 @@ -hostname RouterVNC -! -log file debugging -! -router bgp - bgp router-id - no bgp ebgp-requires-policy - no bgp default ipv4-unicast - no bgp network import-check - neighbor remote-as - neighbor bfd - neighbor passive - ! - address-family ipv4 unicast - neighbor activate - neighbor next-hop-self - exit-address-family -exit -! -route-map RMAP permit 10 - set ipv6 next-hop prefer-global -exit -! -line vty -! -! -end diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service deleted file mode 100644 index 9decd6e..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vnc.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf deleted file mode 100644 index b362ff3..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.conf +++ /dev/null @@ -1,39 +0,0 @@ -hostname RouterVNS -log file -log timestamp precision 3 -no ipv6 forwarding -service integrated-vtysh-config -! -debug bgp keepalives -debug bgp neighbor-events -debug bgp nht -debug bgp updates in -debug bgp updates out -debug bgp zebra -debug bgp bfd -debug bfd distributed -debug bfd peer -debug bfd zebra -debug bfd network -! -router bgp - no bgp ebgp-requires-policy - no bgp hard-administrative-reset - no bgp default ipv4-unicast - no bgp graceful-restart notification - no bgp network import-check - neighbor remote-as - neighbor bfd - ! - address-family ipv4 unicast - network 5.5.5.5/32 - neighbor activate - exit-address-family - ! - address-family ipv6 unicast - neighbor activate - exit-address-family -! -line vty -! -exit \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service deleted file mode 100644 index 9ed4bb1..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/frr-vns.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf deleted file mode 100644 index a5d839b..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/main.fmf +++ /dev/null @@ -1,36 +0,0 @@ -summary: BGP with BFD has a dropped Connection before peering established -description: When doing a BGP Peering with BFD between two FRR peers (peer A and peer - B), the BGP is established but the peering takes place twice. -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -require: - - library(virtual-network/virtual-network) -duration: 10m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-67011 - - verifies: https://issues.redhat.com/browse/RHEL-78354 - - verifies: https://issues.redhat.com/browse/RHEL-78356 - - verifies: https://issues.redhat.com/browse/RHEL-78357 -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-9.4 - continue: false - - enabled: false - when: distro < centos-stream-9 - continue: false - - enabled: false - when: distro < fedora-42 - continue: false -extra-nitrate: TC#0618306 -id: 4fea83b6-a358-403b-b533-3dc55cdbfbcc diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh deleted file mode 100755 index a399572..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/test.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -PACKAGE="frr" - -SERVER_CLIENT_IF_ADDR="192.168.222.0" -SERVER_CLIENT_IF_PREFIX="24" - -SERVER_IF_ADDR="192.168.222.1" -SERVER_IF_PREFIX="24" -SERVER_IF_BCAST="192.168.222.255" - -SERVER_BGP_AS="64512" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.2" -CLIENT_IF_PREFIX="24" -CLIENT_IF_BCAST="192.168.222.255" - -CLIENT_BGP_AS="4200000000" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - - rlRun "ip a" - vnRunClient "ip a" - vnRunServer "ip a" - - 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 "mkdir /etc/frr/{vns,vnc}" - - rm -rf /etc/frr/frr.conf - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "cat ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "cat ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - vnRunServer "/usr/libexec/frr/frr-reload.py -N vns --debug --reload --overwrite --stdout /etc/frr/vns/frr.conf &> reload.log" - - rlRun "sleep 5m" 0 "Waiting for peers to exchange routes and converge" - - rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" - rlAssertGrep "BGP state = Established" show-bgp-neighbors.log - rlAssertNotGrep "Connections established 2; dropped 1" show-bgp-neighbors.log - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf deleted file mode 100644 index f863f56..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf b/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf deleted file mode 100644 index f863f56..0000000 --- a/Regression/BGP-with-BFD-has-a-dropped-connection-before-peering-established/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons deleted file mode 100644 index 8096246..0000000 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/daemons +++ /dev/null @@ -1,54 +0,0 @@ -# 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=no -ospfd=yes -ospfd_instances=1,2 -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" diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf deleted file mode 100644 index e115056..0000000 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/main.fmf +++ /dev/null @@ -1,33 +0,0 @@ -summary: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) -description: | - Bug summary: FRR: Unable to configure OSPF in multi-instance mode - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 - - customer_scenario -tier: '1' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1979426 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - enabled: false - when: distro < rhel-8.6 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0611598 -extra-summary: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance -extra-task: /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance -id: 71343b17-d936-4186-815d-4e5fea01fa92 diff --git a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh b/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh deleted file mode 100755 index ceab4ba..0000000 --- a/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance/runtest.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/FRR-Unable-to-configure-OSPF-in-multi-instance -# Description: Test for BZ#1979426 (FRR Unable to configure OSPF in multi-instance) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemon file" - rlServiceStart "frr" - sleep 5 - rlRun "vtysh -c \"conf t\" -c \"router ospf 1\" -c \"ospf router-id 1.2.3.4\"" 0 "Setting up router ospf 1 instance" - rlRun "vtysh -c \"conf t\" -c \"router ospf 2\" -c \"ospf router-id 5.6.7.8\"" 0 "Setting up router ospf 2 instance" - rlRun "vtysh -c \"write file\"" 0 "Saving router configuration into file" - rlPhaseEnd - - rlPhaseStartTest "Testing running configuration of router" - rlRun "vtysh -c \"sh ru\" | grep \"router ospf 1\"" 0 "Router ospf 1 in running configuration of router" - rlRun "vtysh -c \"sh ru\" | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in running configuration of router" - rlRun "vtysh -c \"sh ru\" | grep \"router ospf 2\"" 0 "Router ospf 2 in running configuration of router" - rlRun "vtysh -c \"sh ru\" | grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in running configuration of router" - rlPhaseEnd - - rlPhaseStartTest "Testing saved configuration of router" - if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then - ospf1_config="frr.conf" - ospf2_config=$ospf1_config - else - ospf1_config="ospfd-1.conf" - ospf2_config="ospfd-2.conf" - fi - - rlRun "cat /etc/frr/$ospf1_config | grep \"router ospf 1\"" 0 "Router ospf 1 in saved configuration of router" - rlRun "cat /etc/frr/$ospf1_config | grep \"router-id 1.2.3.4\"" 0 "Router-id of ospf 1 in saved configuration of router" - rlRun "cat /etc/frr/$ospf2_config | grep \"router ospf 2\"" 0 "Router ospf 2 in saved configuration of router" - rlRun "cat /etc/frr/$ospf2_config | grep \"router-id 5.6.7.8\"" 0 "Router-id of ospf 2 in saved configuration of router" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/bfd-crash-in-MetalLB/daemons b/Regression/bfd-crash-in-MetalLB/daemons deleted file mode 100644 index 9f92b22..0000000 --- a/Regression/bfd-crash-in-MetalLB/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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=no -ospfd=no -ospf6d=no -ripd=no -ripngd=no -isisd=no -pimd=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=yes -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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. diff --git a/Regression/bfd-crash-in-MetalLB/main.fmf b/Regression/bfd-crash-in-MetalLB/main.fmf deleted file mode 100644 index 49561ae..0000000 --- a/Regression/bfd-crash-in-MetalLB/main.fmf +++ /dev/null @@ -1,32 +0,0 @@ -summary: Testing if frr not crash when reloading with specific configs -description: 'Reloading frr with specific bfd configs caused segfaults' -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -link: - - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231831 - - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231830 - - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2231829 - - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2226803 -tier: '1' -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - 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-8.4 - continue: false -extra-nitrate: TC#0615745 -id: d3c14b89-3674-4cb5-a479-b8f76836c430 diff --git a/Regression/bfd-crash-in-MetalLB/reproducer-1.conf b/Regression/bfd-crash-in-MetalLB/reproducer-1.conf deleted file mode 100644 index 0321f0d..0000000 --- a/Regression/bfd-crash-in-MetalLB/reproducer-1.conf +++ /dev/null @@ -1,27 +0,0 @@ -frr version 7.5.1-20210328-00-g1ce35e3b5 -frr defaults traditional -hostname LR1.wue3 -log syslog -log facility local7 -#agentx -service integrated-vtysh-config -! -line vty -! -bfd - profile bar - detect-multiplier 102 - receive-interval 444 - ! - profile foo - detect-multiplier 101 - transmit-interval 333 - receive-interval 222 - shutdown - echo-mode - echo-interval 100 - ! - peer 192.0.2.10 - ! -! -end \ No newline at end of file diff --git a/Regression/bfd-crash-in-MetalLB/reproducer-2.conf b/Regression/bfd-crash-in-MetalLB/reproducer-2.conf deleted file mode 100644 index 88960b6..0000000 --- a/Regression/bfd-crash-in-MetalLB/reproducer-2.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -frr version 7.5.1-20210328-00-g1ce35e3b5 -frr defaults traditional -hostname LR1.wue3 -log syslog -log facility local7 -#agentx -service integrated-vtysh-config -! -line vty -! -end \ No newline at end of file diff --git a/Regression/bfd-crash-in-MetalLB/test.sh b/Regression/bfd-crash-in-MetalLB/test.sh deleted file mode 100755 index c542883..0000000 --- a/Regression/bfd-crash-in-MetalLB/test.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -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/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons" - cat /etc/frr/daemons - rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart "frr" - sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - - counter=0 - while [ $counter -lt 5 ]; do - rlRun "/usr/$DIR/frr/frr-reload.py --reload --debug --stdout $TestDir/reproducer-1.conf &>> test_log.txt" - sleep 5 - rlRun "/usr/$DIR/frr/frr-reload.py --reload --debug --stdout $TestDir/reproducer-2.conf &>> test_log.txt" - sleep 5 - counter=$(( $counter + 1 )) - done - - if rlIsFedora; then - journalctl -b > fedora.log - LOG_LOCATION="fedora.log" - else - LOG_LOCATION="/var/log/messages" - fi - - rlAssertNotGrep "\[EC 4043309122\] Client 'bfd' encountered an error and is shutting down" $LOG_LOCATION - rlRun "grep \"BFD\" $LOG_LOCATION | grep \"Received signal 11\"" 1 "Checking if bfd segfault not presented in log" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlFileRestore - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd - diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc deleted file mode 100644 index ee66012..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=yes -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns deleted file mode 100644 index ebd3f68..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=yes -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf deleted file mode 100644 index 8a00480..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.conf +++ /dev/null @@ -1,31 +0,0 @@ -hostname RouterVNC -! -log file debugging -! -debug bgp keepalives -debug bgp neighbor-events -debug bgp nht -debug bgp updates in -debug bgp updates out -debug bgp zebra -debug bgp bfd -debug bfd distributed -debug bfd peer -debug bfd zebra -debug bfd network -! -router bgp - bgp router-id - no bgp ebgp-requires-policy - neighbor remote-as - neighbor bfd -exit -! -bfd - peer - exit - ! -exit -line vty -! -exit diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service deleted file mode 100644 index 9decd6e..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vnc.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf deleted file mode 100644 index 20d8d0e..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.conf +++ /dev/null @@ -1,33 +0,0 @@ -hostname RouterVNS -log file -log timestamp precision 3 -no ipv6 forwarding -service integrated-vtysh-config -! -debug bgp keepalives -debug bgp neighbor-events -debug bgp nht -debug bgp updates in -debug bgp updates out -debug bgp zebra -debug bgp bfd -debug bfd distributed -debug bfd peer -debug bfd zebra -debug bfd network -! -router bgp - bgp router-id - no bgp ebgp-requires-policy - neighbor remote-as - neighbor bfd profile foo -exit -! -bfd - peer - exit - ! -exit -line vty -! -exit \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service deleted file mode 100644 index 9ed4bb1..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/frr-vns.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf deleted file mode 100644 index 7bcdeeb..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/main.fmf +++ /dev/null @@ -1,32 +0,0 @@ -summary: BFD status down in FRR does not bring down BGP -description: '' -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -require: - - library(virtual-network/virtual-network) -duration: 10m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-76401 - - verifies: https://issues.redhat.com/browse/RHEL-78318 - - verifies: https://issues.redhat.com/browse/RHEL-78319 - - verifies: https://issues.redhat.com/browse/RHEL-78324 -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-9.4 - continue: false - - enabled: false - when: distro < centos-stream-9 - continue: false -extra-nitrate: TC#0618545 -id: 4428f64b-1038-4c38-b52d-7e788be96038 \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh deleted file mode 100755 index 2219a76..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/test.sh +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -PACKAGE="frr" - -SERVER_CLIENT_IF_ADDR="192.168.222.0" -SERVER_CLIENT_IF_PREFIX="24" - -SERVER_IF_ADDR="192.168.222.1" -SERVER_IF_PREFIX="24" -SERVER_IF_BCAST="192.168.222.255" - -SERVER_BGP_AS="65000" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.2" -CLIENT_IF_PREFIX="24" -CLIENT_IF_BCAST="192.168.222.255" - -CLIENT_BGP_AS="65001" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - - rlRun "ip a" - vnRunClient "ip a" - vnRunServer "ip a" - - 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 "mkdir /etc/frr/{vns,vnc}" - - rm -rf /etc/frr/frr.conf - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "cat ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "cat ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - # Check that BGP was established - rlRun "sleep 5m" 0 "Waiting for peers to exchange routes and converge" - rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" - rlAssertGrep "BGP state = Established" show-bgp-neighbors.log - - # The shutdown of BFD should set BGP's status to idle. - rlRun "vtysh -N vns -c 'conf t' -c 'bfd' -c 'profile foo' -c 'shutdown'" - sleep 10s - rlRun "vtysh -N vns -c 'show bgp neighbors' &> show-bgp-neighbors.log" - rlAssertNotGrep "BGP state = Established" show-bgp-neighbors.log - rlAssertGrep "BGP state = (Idle|Active)" show-bgp-neighbors.log -E - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRemoveServerClientNetwork - - rlFileSubmit show-bgp-neighbors.log - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf deleted file mode 100644 index f863f56..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf b/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf deleted file mode 100644 index f863f56..0000000 --- a/Regression/bfd-session-down-does-not-trigger-bgp-session-down/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Regression/configuration-write-failed/main.fmf b/Regression/configuration-write-failed/main.fmf deleted file mode 100644 index b5d351d..0000000 --- a/Regression/configuration-write-failed/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Configuration write failed -description: frr appears to not be able to write an integrated config when it is started - in a namespace. This does not appear to occur when using it outside of one. -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr - - procps-ng -duration: 5m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-65250 -adjust: - - enabled: false - when: distro < rhel-8.10 - continue: false -extra-nitrate: TC#0618795 -id: b886e5b1-285c-4b17-acff-61ee0f0325ad \ No newline at end of file diff --git a/Regression/configuration-write-failed/test.sh b/Regression/configuration-write-failed/test.sh deleted file mode 100755 index 574ce06..0000000 --- a/Regression/configuration-write-failed/test.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -namespace="test" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm frr - - 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 "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - rlRun "mkdir /etc/frr/$namespace" - rlRun "cp /etc/frr/daemons /etc/frr/$namespace" - rlRun "cp /etc/frr/vtysh.conf /etc/frr/$namespace" - rlRun "touch /etc/frr/$namespace/frr.conf" - rlRun "chown -R frr:frr /etc/frr/$namespace" - - rlRun "sed -i 's/ospfd=yes/ospfd=no/' /etc/frr/$namespace/daemons" - rlRun "sed -i 's|#watchfrr_options=\"--netns\"|watchfrr_options=\"--netns=$namespace\"|' /etc/frr/$namespace/daemons" - rlRun "sed -i 's/no service integrated-vtysh-config/service integrated-vtysh-config/' /etc/frr/$namespace/vtysh.conf" - - rlRun "ip netns add $namespace" - rlPhaseEnd - - rlPhaseStartTest - rlRun "ip netns exec $namespace /usr/libexec/frr/frrinit.sh start $namespace" - rlRun "vtysh -N $namespace -c 'write' &> vtysh.log" - rlAssertGrep "Integrated configuration saved to /etc/frr/$namespace/frr.conf" vtysh.log - rlAssertNotGrep "Exiting: failed to connect to any daemons" vtysh.log - rlAssertNotGrep "Configuration write failed" vtysh.log - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit vtysh.log - rlRun "ip netns exec $namespace /usr/libexec/frr/frrinit.sh stop $namespace" - rlRun "ip netns del $namespace" - - rlFileRestore - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/crash-in-plist-update/1.conf b/Regression/crash-in-plist-update/1.conf deleted file mode 100644 index 775e233..0000000 --- a/Regression/crash-in-plist-update/1.conf +++ /dev/null @@ -1,109 +0,0 @@ -ip prefix-list 192.168.18.24-pl-ipv4 seq 20 permit 192.168.18.95/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 21 permit 192.168.18.99/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 22 permit 192.168.18.110/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 23 permit 192.168.18.39/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 24 permit 192.168.18.52/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 25 permit 192.168.18.61/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 26 permit 192.168.18.81/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 27 permit 192.168.18.102/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 28 permit 192.168.18.58/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 29 permit 192.168.18.77/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 40 permit 192.168.18.43/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 41 permit 192.168.18.55/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 42 permit 192.168.18.87/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 43 permit 192.168.18.101/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 44 permit 192.168.18.44/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 45 permit 192.168.18.46/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 46 permit 192.168.18.82/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 47 permit 192.168.18.63/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 48 permit 192.168.18.93/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 49 permit 192.168.18.98/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 50 permit 192.168.18.35/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 51 permit 192.168.18.94/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 52 permit 192.168.18.100/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 53 permit 192.168.18.103/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 54 permit 192.168.18.108/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 55 permit 192.168.18.78/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 56 permit 192.168.18.88/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 57 permit 192.168.18.91/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 58 permit 192.168.18.41/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 59 permit 192.168.18.74/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 60 permit 192.168.18.64/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 61 permit 192.168.18.66/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 62 permit 192.168.18.70/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 63 permit 192.168.18.72/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 64 permit 192.168.18.97/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 65 permit 192.168.18.32/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 66 permit 192.168.18.42/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 67 permit 192.168.18.56/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 68 permit 192.168.18.37/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 69 permit 192.168.18.60/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 70 permit 192.168.18.33/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 71 permit 192.168.18.75/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 72 permit 192.168.18.76/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 73 permit 192.168.18.105/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 74 permit 192.168.18.109/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 75 permit 192.168.18.38/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 76 permit 192.168.18.47/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 77 permit 192.168.18.80/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 78 permit 192.168.18.40/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 79 permit 192.168.18.54/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 80 deny any -ipv6 prefix-list 192.168.18.24-pl-ipv4 seq 81 deny any -ip prefix-list 192.168.18.25-pl-ipv4 seq 20 permit 192.168.18.95/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 21 permit 192.168.18.99/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 22 permit 192.168.18.110/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 23 permit 192.168.18.39/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 24 permit 192.168.18.52/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 25 permit 192.168.18.61/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 26 permit 192.168.18.81/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 27 permit 192.168.18.102/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 28 permit 192.168.18.58/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 29 permit 192.168.18.77/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 35 permit 192.168.18.57/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 36 permit 192.168.18.62/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 37 permit 192.168.18.71/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 38 permit 192.168.18.96/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 39 permit 192.168.18.34/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 40 permit 192.168.18.43/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 41 permit 192.168.18.55/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 42 permit 192.168.18.87/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 43 permit 192.168.18.101/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 44 permit 192.168.18.44/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 45 permit 192.168.18.46/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 46 permit 192.168.18.82/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 47 permit 192.168.18.63/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 48 permit 192.168.18.93/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 49 permit 192.168.18.98/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 50 permit 192.168.18.35/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 51 permit 192.168.18.94/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 52 permit 192.168.18.100/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 53 permit 192.168.18.103/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 54 permit 192.168.18.108/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 55 permit 192.168.18.78/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 56 permit 192.168.18.88/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 57 permit 192.168.18.91/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 58 permit 192.168.18.41/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 59 permit 192.168.18.74/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 60 permit 192.168.18.64/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 61 permit 192.168.18.66/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 62 permit 192.168.18.70/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 63 permit 192.168.18.72/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 64 permit 192.168.18.97/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 65 permit 192.168.18.32/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 66 permit 192.168.18.42/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 67 permit 192.168.18.56/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 68 permit 192.168.18.37/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 69 permit 192.168.18.60/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 70 permit 192.168.18.33/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 71 permit 192.168.18.75/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 72 permit 192.168.18.76/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 73 permit 192.168.18.105/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 74 permit 192.168.18.109/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 75 permit 192.168.18.38/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 76 permit 192.168.18.47/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 77 permit 192.168.18.80/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 78 permit 192.168.18.40/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 79 permit 192.168.18.54/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 80 deny any -ipv6 prefix-list 192.168.18.25-pl-ipv4 seq 81 deny any \ No newline at end of file diff --git a/Regression/crash-in-plist-update/2.conf b/Regression/crash-in-plist-update/2.conf deleted file mode 100644 index 86bf89f..0000000 --- a/Regression/crash-in-plist-update/2.conf +++ /dev/null @@ -1,103 +0,0 @@ -ip prefix-list 192.168.18.24-pl-ipv4 seq 20 permit 192.168.18.47/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 21 permit 192.168.18.80/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 22 permit 192.168.18.40/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 23 permit 192.168.18.54/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 24 permit 192.168.18.89/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 25 permit 192.168.18.68/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 26 permit 192.168.18.69/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 27 permit 192.168.18.83/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 28 permit 192.168.18.48/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 29 permit 192.168.18.107/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 40 permit 192.168.18.92/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 41 permit 192.168.18.95/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 42 permit 192.168.18.99/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 43 permit 192.168.18.110/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 44 permit 192.168.18.39/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 45 permit 192.168.18.61/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 46 permit 192.168.18.81/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 47 permit 192.168.18.102/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 48 permit 192.168.18.58/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 49 permit 192.168.18.77/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 50 permit 192.168.18.79/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 51 permit 192.168.18.84/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 52 permit 192.168.18.86/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 53 permit 192.168.18.90/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 54 permit 192.168.18.30/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 55 permit 192.168.18.57/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 56 permit 192.168.18.62/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 57 permit 192.168.18.71/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 58 permit 192.168.18.96/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 59 permit 192.168.18.34/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 60 permit 192.168.18.43/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 61 permit 192.168.18.55/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 62 permit 192.168.18.87/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 63 permit 192.168.18.101/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 64 permit 192.168.18.44/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 65 permit 192.168.18.46/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 66 permit 192.168.18.82/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 67 permit 192.168.18.63/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 68 permit 192.168.18.93/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 69 permit 192.168.18.98/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 70 permit 192.168.18.35/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 71 permit 192.168.18.94/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 72 permit 192.168.18.100/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 73 permit 192.168.18.103/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 74 permit 192.168.18.108/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 75 permit 192.168.18.78/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 76 permit 192.168.18.88/32 -ip prefix-list 192.168.18.24-pl-ipv4 seq 77 deny any -ipv6 prefix-list 192.168.18.24-pl-ipv4 seq 78 deny any -ip prefix-list 192.168.18.25-pl-ipv4 seq 20 permit 192.168.18.47/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 21 permit 192.168.18.80/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 22 permit 192.168.18.40/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 23 permit 192.168.18.54/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 24 permit 192.168.18.89/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 25 permit 192.168.18.68/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 26 permit 192.168.18.69/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 27 permit 192.168.18.83/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 28 permit 192.168.18.48/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 29 permit 192.168.18.107/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 35 permit 192.168.18.106/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 36 permit 192.168.18.31/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 37 permit 192.168.18.45/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 38 permit 192.168.18.65/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 39 permit 192.168.18.67/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 40 permit 192.168.18.92/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 41 permit 192.168.18.95/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 42 permit 192.168.18.99/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 43 permit 192.168.18.110/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 44 permit 192.168.18.39/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 45 permit 192.168.18.61/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 46 permit 192.168.18.81/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 47 permit 192.168.18.102/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 48 permit 192.168.18.58/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 49 permit 192.168.18.77/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 50 permit 192.168.18.79/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 51 permit 192.168.18.84/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 52 permit 192.168.18.86/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 53 permit 192.168.18.90/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 54 permit 192.168.18.30/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 55 permit 192.168.18.57/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 56 permit 192.168.18.62/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 57 permit 192.168.18.71/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 58 permit 192.168.18.96/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 59 permit 192.168.18.34/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 60 permit 192.168.18.43/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 61 permit 192.168.18.55/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 62 permit 192.168.18.87/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 63 permit 192.168.18.101/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 64 permit 192.168.18.44/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 65 permit 192.168.18.46/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 66 permit 192.168.18.82/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 67 permit 192.168.18.63/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 68 permit 192.168.18.93/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 69 permit 192.168.18.98/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 70 permit 192.168.18.35/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 71 permit 192.168.18.94/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 72 permit 192.168.18.100/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 73 permit 192.168.18.103/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 74 permit 192.168.18.108/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 75 permit 192.168.18.78/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 76 permit 192.168.18.88/32 -ip prefix-list 192.168.18.25-pl-ipv4 seq 77 deny any -ipv6 prefix-list 192.168.18.25-pl-ipv4 seq 78 deny any \ No newline at end of file diff --git a/Regression/crash-in-plist-update/daemons b/Regression/crash-in-plist-update/daemons deleted file mode 100644 index 754897b..0000000 --- a/Regression/crash-in-plist-update/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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=yes -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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. \ No newline at end of file diff --git a/Regression/crash-in-plist-update/main.fmf b/Regression/crash-in-plist-update/main.fmf deleted file mode 100644 index ebff8a4..0000000 --- a/Regression/crash-in-plist-update/main.fmf +++ /dev/null @@ -1,35 +0,0 @@ -summary: crash in plist update -description: '' -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -link: - - verifies: https://issues.redhat.com/browse/RHEL-12039 - - verifies: https://issues.redhat.com/browse/RHEL-13873 - - verifies: https://issues.redhat.com/browse/RHEL-13872 - - verifies: https://issues.redhat.com/browse/RHEL-13871 - - verifies: https://issues.redhat.com/browse/RHEL-13870 - - verifies: https://issues.redhat.com/browse/RHEL-13869 - - verifies: https://issues.redhat.com/browse/RHEL-13868 -tier: '1' -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - enabled: false - when: distro < rhel-8.6 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 - because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 -extra-nitrate: TC#0615911 -id: 9e06b496-08da-4f13-91d8-655729c0b2b3 diff --git a/Regression/crash-in-plist-update/run.sh b/Regression/crash-in-plist-update/run.sh deleted file mode 100644 index 376dddd..0000000 --- a/Regression/crash-in-plist-update/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -for j in {0..1}; do for f in *.conf; do echo; echo; echo; echo === $f ===; date; python3 /usr/$DIR/frr/frr-reload.py --reload --overwrite --stdout $f; sleep 1; done; done \ No newline at end of file diff --git a/Regression/crash-in-plist-update/test.sh b/Regression/crash-in-plist-update/test.sh deleted file mode 100755 index fd34868..0000000 --- a/Regression/crash-in-plist-update/test.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -rlJournalStart - rlPhaseStartSetup - TestDir=$(pwd) - rlAssertRpm frr - 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/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "cp $TestDir/daemons /etc/frr/" - rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" - cp $TestDir/run.sh ./ - cp $TestDir//1.conf ./ - cp $TestDir/2.conf ./ - rlRun "chmod +x run.sh" - - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - - rlRun "sed -i 's/\$DIR/$DIR/g' run.sh" - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart "frr" - sleep 5 - for i in {1..10} - do - ./run.sh &>> run.log & - PID=$! - sleep 30s - - # First check vtysh - rlRun "ps aux | grep \"vtysh\" | grep \"reload\" | grep -v \"grep\"" 1 "Checking if vtysh stuck" - # Second check if run script still running - if ps -p $PID > /dev/null - then - rlFail "Stucked after $i. run" - break - fi - done - rlPhaseEnd - - rlPhaseStartCleanup - if ps -p $PID > /dev/null - then - kill -9 $PID - fi - rlServiceRestore "frr" - rlFileRestore - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf deleted file mode 100644 index e2a9f4b..0000000 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/frr-pref-lists.conf +++ /dev/null @@ -1,39 +0,0 @@ -log 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 \ No newline at end of file diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf deleted file mode 100644 index 452abdd..0000000 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/main.fmf +++ /dev/null @@ -1,40 +0,0 @@ -summary: Duplicated prefix lists when no seq is specified -description: 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. -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-5116 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - enabled: false - when: distro < rhel-8.6 - continue: false - - enabled: false - when: distro >= rhel-10 - continue: false - - enabled: false - when: distro >= centos-stream-10 - continue: false - - enabled: false - when: distro >= fedora-40 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 - because: BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7 -extra-nitrate: TC#0615909 -id: 9d459511-e8d6-4f0c-962f-b9f051cd1715 diff --git a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh b/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh deleted file mode 100755 index 7eb2838..0000000 --- a/Regression/duplicated-prefix-lists-when-no-seq-is-specified/test.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -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/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "touch /etc/frr/frr.conf" 0 "Creating empty config" - rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart "frr" - sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - rlRun "/usr/$DIR/frr/frr-reload.py --reload $TestDir/frr-pref-lists.conf &> reload.log" - rlRun "vtysh -c \"show run\" > running.log" - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.0" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.1" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.2" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.5-pl-ipv4" running.log | grep "192.168.10.3" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.0" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.1" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.2" | wc -l) 1 - rlAssertEquals "checking duplicities" $(grep "ip prefix-list 172.18.0.6-pl-ipv4" running.log | grep "192.168.10.3" | wc -l) 1 - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlFileRestore - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons deleted file mode 100644 index 8f44289..0000000 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf deleted file mode 100644 index 7629173..0000000 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/frr.conf +++ /dev/null @@ -1,10 +0,0 @@ -frr version 7.5 -frr defaults traditional -hostname centos8.localdomain -no ip forwarding -no ipv6 forwarding -service integrated-vtysh-config -line vty -router bgp 4250001000 -neighbor 192.168.122.207 remote-as 65512 -neighbor 192.168.122.207 ebgp-multihop \ No newline at end of file diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf deleted file mode 100644 index e168761..0000000 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/main.fmf +++ /dev/null @@ -1,39 +0,0 @@ -summary: eBGP multihop peer flapping due to delta miscalculation of new configuration -description: The FRR reloader causes eBGP connection flapping when eBGP multihop peer - with default TTL (255) is unchanged. When creating an eBGP multihop without TTL, - FRR will default the TTL to 255 and show it in a vtysh "running-configuration" - command which is used by the frr-reload script to calculate new configuration - deltas. -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-11666 - - verifies: https://issues.redhat.com/browse/RHEL-11667 - - verifies: https://issues.redhat.com/browse/RHEL-11668 - - verifies: https://issues.redhat.com/browse/RHEL-11669 - - verifies: https://issues.redhat.com/browse/RHEL-2263 - - verifies: https://issues.redhat.com/browse/RHEL-11670 - - verifies: https://issues.redhat.com/browse/RHEL-11671 - - verifies: https://issues.redhat.com/browse/RHEL-11672 - - verifies: https://issues.redhat.com/browse/RHEL-11673 - - verifies: https://issues.redhat.com/browse/RHEL-11665 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 - because: 'BZ 1941765 (AVCs while running frr tests) fixed in RHEL 8.7' -extra-nitrate: TC#0615876 -id: 2eaa7b0e-f27b-4950-9f6b-102d85f20100 diff --git a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh b/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh deleted file mode 100755 index 8929373..0000000 --- a/Regression/eBGP-multihop-peer-flapping-due-to-delta-miscalculation-of-new-configuration/test.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -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/daemons /etc/frr/daemons" 0 "Placing daemons" - rlRun "cp -f $TestDir/frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf" - rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" - rlPhaseEnd - - rlPhaseStartTest - rlServiceStart "frr" - sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - rlRun "cp $TestDir/frr.conf $TestDir/frr.conf.new" - rlRun "/usr/$DIR/frr/frr-reload.py --test $TestDir/frr.conf.new > reload.log" - - # Check if reload does not try to change ebpg-multihop configuration - rlAssertNotGrep "no neighbor 192.168.122.207 ebgp-multihop 255" reload.log - rlAssertNotGrep "neighbor 192.168.122.207 ebgp-multihop" reload.log - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlFileRestore - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf deleted file mode 100644 index 529c7bb..0000000 --- a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: frr-reload.py suffers from unescaped regex sequences -description: When running frr and trying to reload configuration, frr-reload.py will - not work correctly and it will emit a lot of python SyntaxWarnings -author: Frantisek Hrdina -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-78638 -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-8 - continue: false -extra-nitrate: TC#0618556 -id: 5308d683-881a-4af4-889c-a1abea49a1a6 diff --git a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh b/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh deleted file mode 100755 index f696ea9..0000000 --- a/Regression/frr-reload.py-suffers-from-unescaped-regex-sequences/test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm frr - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - rlPhaseEnd - - rlPhaseStartTest - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - rlRun "/usr/$DIR/frr/frr-reload.py &> reload.log --help" 0 - rlAssertNotGrep "SyntaxWarning" reload.log - rlAssertNotGrep "invalid escape sequence" reload.log - rlPhaseEnd - - rlPhaseStartCleanup - rlFileSubmit reload.log - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf b/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf deleted file mode 100644 index 961e034..0000000 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/main.fmf +++ /dev/null @@ -1,29 +0,0 @@ -summary: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) -description: | - Bug summary: frr scriptlet fails: line 15: hostname: command not found - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier3 -tier: '3' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1937423 -adjust: - - enabled: false - when: distro < rhel-9 - continue: false - - enabled: false - when: distro < centos-stream-9 - continue: false -extra-nitrate: TC#0611715 -extra-summary: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command -extra-task: /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command -id: 88887b40-49df-41a1-98b2-1362203b94ae diff --git a/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh b/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh deleted file mode 100755 index c0445b9..0000000 --- a/Regression/frr-scriptlet-fails-line-15-hostname-command/runtest.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/frr-scriptlet-fails-line-15-hostname-command -# Description: Test for BZ#1937423 (frr scriptlet fails line 15 hostname command not) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlPhaseEnd - - rlPhaseStartTest - rlRun "rpm -q --requires frr | grep \"hostname\"" 0 "Check if hostname is dependency of frr" - rlPhaseEnd - - rlPhaseStartCleanup - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/gracefull-restart/daemons b/Regression/gracefull-restart/daemons deleted file mode 100644 index ed4961f..0000000 --- a/Regression/gracefull-restart/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. \ No newline at end of file diff --git a/Regression/gracefull-restart/frr.conf b/Regression/gracefull-restart/frr.conf deleted file mode 100644 index 4c983fc..0000000 --- a/Regression/gracefull-restart/frr.conf +++ /dev/null @@ -1,25 +0,0 @@ -hostname Router-CLIENT -! -log file debugging -! -router bgp 50000 - bgp router-id - 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 \ No newline at end of file diff --git a/Regression/gracefull-restart/main.fmf b/Regression/gracefull-restart/main.fmf deleted file mode 100644 index 2b06172..0000000 --- a/Regression/gracefull-restart/main.fmf +++ /dev/null @@ -1,33 +0,0 @@ -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. -author: Frantisek Hrdina -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 - - verifies: https://issues.redhat.com/browse/RHEL-78364 - - verifies: https://issues.redhat.com/browse/RHEL-78365 -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-9.4 - continue: false - - enabled: false - when: distro < centos-stream-9 - continue: false -extra-nitrate: TC#0618307 -id: b53842a0-d920-47f2-903c-57a951346023 diff --git a/Regression/gracefull-restart/test.sh b/Regression/gracefull-restart/test.sh deleted file mode 100755 index 78bd7f1..0000000 --- a/Regression/gracefull-restart/test.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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/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}|g' /etc/frr/frr.conf" - rlRun "sed -i 's||${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 diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf deleted file mode 100644 index 1e31f57..0000000 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/main.fmf +++ /dev/null @@ -1,29 +0,0 @@ -summary: Test for BZ#1983967 (ospfd crashes in route_node_delete with assertion) -description: | - Bug summary: ospfd crashes in route_node_delete with assertion fail - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1983967 -enabled: true -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1983967 -tag: - - Tier1 -tier: '1' -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -extra-nitrate: TC#0611179 -extra-summary: /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion -extra-task: /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion -id: 2506d962-71e4-4fb4-a53d-b605e77b2bc0 diff --git a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh b/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh deleted file mode 100755 index a3d0b7e..0000000 --- a/Regression/ospfd-crashes-in-route-node-delete-with-assertion/runtest.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/ospfd-crashes-in-route-node-delete-with-assertion -# Description: Test for BZ#1983967 (ospfd crashes in route_node_delete with assertion) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" -LOG="ospfd.log" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "sed -i s/'ospfd=no'/'ospfd=yes'/g /etc/frr/daemons" 0 "Setting up ospfd daemon" - rlRun "systemctl start frr" 0 "Running frr service" - - rlPhaseEnd - rlPhaseStartTest - rlRun "vtysh -c \"conf t\" -c \"router ospf\" -c \"ospf router-id 10.10.10.10\" &>> $LOG" 0 "Setting up router-id" - rlRun "vtysh -c \"conf t\" -c \"router ospf\" -c \"network 10.10.10.10/8 area 0\" &>> $LOG" 0 "Setting up ospf network" - rlRun "vtysh -c \"sh ip ospf interface eth0\" &>> $LOG" 0 "Enabling interface" - rlRun "cat $LOG | grep \"error\"" 1 "Checking if configuration was successful without errors" - rlRun "coredumpctl list | grep ospfd" 1 "Check if coredump is without crash" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr" 0 "Stopping frr service" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlRun "rm -f $LOG" 0 "Removing log file" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons deleted file mode 100644 index b8d45d4..0000000 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/daemons +++ /dev/null @@ -1,80 +0,0 @@ -# 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 and zebra daemons are always started. -# -bgpd=no -ospfd=yes -ospf6d=no -ripd=no -ripngd=no -isisd=no -pimd=no -ldpd=no -nhrpd=no -eigrpd=no -babeld=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" -ldpd_options=" -A 127.0.0.1" -nhrpd_options=" -A 127.0.0.1" -eigrpd_options=" -A 127.0.0.1" -babeld_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="" - -# 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. diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf deleted file mode 100644 index 6b42dc2..0000000 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/frr.conf +++ /dev/null @@ -1,13 +0,0 @@ -hostname ROUTER1 -password zebra -log file /var/log/frr/ospfd.log -! -! -router ospf - ospf router-id ROUTER_ID - network 10.0.0.0/8 area 0 - network 192.168.101.0/24 area 1 - network 192.168.201.0/24 area 2 - ospf opaque-lsa -! -line vty \ No newline at end of file diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf deleted file mode 100644 index 029bc4f..0000000 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/main.fmf +++ /dev/null @@ -1,29 +0,0 @@ -summary: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) -description: | - Bug summary: ospfd not running with ospf opaque-lsa option used - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1997603 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0611420 -extra-summary: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option -extra-task: /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option -id: bd411aed-c312-4da5-b817-39ed63624153 diff --git a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh b/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh deleted file mode 100755 index 3483dc0..0000000 --- a/Regression/ospfd-not-running-with-ospf-opaque-lsa-option/runtest.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/ospfd-not-running-with-ospf-opaque-lsa-option -# Description: Test for BZ#1997603 (ospfd not running with ospf opaque-lsa option) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "ip link add dummy1 type dummy" 0 "Adding dummy1 interface" - rlRun "ip address add 192.168.101.1/24 dev dummy1" 0 "Setting up dummy1 interface" - rlRun "ip link set dummy1 up" 0 "Bring up dummy1 interface" - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "cp -f daemons /etc/frr/daemons" 0 "Placing daemons configuration with ospfd enabled" - - ROUTER_ID=$(hostname -I | awk '{print $1}') - rlRun "sed -i \"s/ROUTER_ID/$ROUTER_ID/g\" frr.conf" 0 "Setting ospf router id" - if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then - - rlRun "cp -f frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf with ospf configuration" - else - rlRun "cp -f frr.conf /etc/frr/ospfd.conf" 0 "Placing ospf.conf with ospf configuration" - fi - rlPhaseEnd - - rlPhaseStartTest - rlRun "systemctl start frr" 0 "Starting frr service" - sleep 41 - rlRun "systemctl status frr | grep \"ospfd -d.*-A 127.0.0.1\"" 0 "Check if ospfd is running" - rlRun "vtysh -c 'show ip ospf database' |& grep \"ospfd is not running\"" 1 "Test if showing ip ospf database not fail" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr" 0 "Stopping frr service" - rlRun "ip link del dummy1 type dummy" 0 "Removing dummy1 interface" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons b/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons deleted file mode 100644 index 7ec9086..0000000 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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=yes -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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf deleted file mode 100644 index 18bdc30..0000000 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/main.fmf +++ /dev/null @@ -1,31 +0,0 @@ -summary: Test for BZ#2029958 (FRR reloader generating invalid BFD) -description: | - Bug summary: FRR reloader generating invalid BFD configurations, exits with error - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2029958 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031076 - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2031077 -adjust: - - enabled: false - when: distro < rhel-8.4 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0612674 -extra-summary: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error -extra-task: /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error -id: d0fcbecb-b200-4448-a468-da5104f31f30 diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf b/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf deleted file mode 100644 index 0ad84f0..0000000 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/new-frr.conf +++ /dev/null @@ -1,35 +0,0 @@ -frr version 7.5 -frr defaults traditional -hostname new.localdomain -service integrated-vtysh-config -! -router bgp 64512 - bgp router-id 10.10.10.0 - no bgp ebgp-requires-policy - no bgp default ipv4-unicast - no bgp network import-check - neighbor 192.168.111.1 remote-as 64512 - neighbor 192.168.111.1 bfd profile echo - neighbor 192.168.111.1 password ibgp-test - neighbor 192.168.111.1 timers 30 90 - ! - address-family ipv4 unicast - neighbor 192.168.111.1 activate - exit-address-family - ! - address-family ipv6 unicast - neighbor 192.168.111.1 activate - exit-address-family -! -line vty -! -bfd - profile echo - transmit-interval 81 - receive-interval 80 - echo-mode - echo-interval 82 - minimum-ttl 254 - ! -! -end \ No newline at end of file diff --git a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh b/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh deleted file mode 100755 index fccc20d..0000000 --- a/Regression/reloader-generating-invalid-BFD-configurations-with-error/runtest.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/reloader-generating-invalid-BFD-configurations-with-error -# Description: Test for BZ#2029958 (FRR reloader generating invalid BFD) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - TestDir=$(pwd) - rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - rlRun "cp -f $TestDir/daemons /etc/frr/daemons" 0 "Placing daemons" - rlRun "echo \"service integrated-vtysh-config\" > /etc/frr/vtysh.conf" - rlServiceStart "frr" - sleep 5 - if rlIsRHEL '>=8.7' || rlIsFedora || rlIsCentOS '>=8'; then - DIR="libexec" - else - DIR="lib" - fi - rlRun "/usr/$DIR/frr/frr-reload.py --overwrite --reload $TestDir/new-frr.conf &> frr-reload.log" - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf b/Regression/replace-network-manager-patch-in-the-current-version/main.fmf deleted file mode 100644 index acb6fb7..0000000 --- a/Regression/replace-network-manager-patch-in-the-current-version/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -summary: Replace NetworkManager patch in the current version -description: '' -author: Frantisek Hrdina -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-59899 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0617903 -id: 0215332f-4f51-4e88-8881-9deea50404bd \ No newline at end of file diff --git a/Regression/replace-network-manager-patch-in-the-current-version/test.sh b/Regression/replace-network-manager-patch-in-the-current-version/test.sh deleted file mode 100755 index 479c1a0..0000000 --- a/Regression/replace-network-manager-patch-in-the-current-version/test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm frr - 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/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - - #rlRun "systemctl start frr" 0 "Starting frr" - rlServiceStart "frr" - rlRun "nmcli connection add type dummy ifname dummy0 ipv4.method manual ipv4.method manual ipv4.addresses 192.168.44.1/24" 0 "Create dummy interface" - - rlPhaseEnd - - rlPhaseStartTest - rlRun "vtysh -c 'sh ip route' &> routes.log" - - rlAssertGrep "C>\* 192.168.44.0/24" routes.log - if rlIsFedora || rlIsRHELLike '>=10'; then - rlAssertGrep "L>\* 192.168.44.1/32" routes.log - fi - - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlFileRestore - rlRun "nmcli connection delete dummy-dummy0" 0 "Remove dummy interface" - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalEnd diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc deleted file mode 100644 index 3b386ba..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns deleted file mode 100644 index 7a5ec3f..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf deleted file mode 100644 index 1d77df3..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc-reload.conf +++ /dev/null @@ -1,20 +0,0 @@ -hostname RouterVNC - -log file debug -! -*- bgp -*- -! -router bgp 7676 - bgp router-id - neighbor remote-as 7676 - neighbor timers 10 60 - ! - address-family ipv4 unicast - neighbor route-map deny-all-in in - exit-address-family -! -! -route-map deny-all-in deny 20 -route-map deny-all-in permit 20 -! -line vty -! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf deleted file mode 100644 index cef7364..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.conf +++ /dev/null @@ -1,19 +0,0 @@ -hostname RouterVNC - -log file debug -! -*- bgp -*- -! -router bgp 7676 - bgp router-id - neighbor remote-as 7676 - neighbor timers 10 60 - ! - address-family ipv4 unicast - neighbor route-map deny-all-in in - exit-address-family -! -! -route-map deny-all-in deny 20 -! -line vty -! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service deleted file mode 100644 index 8ce3c85..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vnc.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc - -[Install] -WantedBy=multi-user.target diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf deleted file mode 100644 index fb5e9b4..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.conf +++ /dev/null @@ -1,23 +0,0 @@ -frr version 7.5.1 -frr defaults traditional -hostname RouterVNS -! -log file debug -! -! Interface's description. -! -interface - link-detect - -interface - link-detect -! -router bgp 7676 - bgp router-id - network / - neighbor remote-as 7676 - neighbor timers 10 60 -! -line vty -! -! diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service deleted file mode 100644 index d9fa54f..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/frr-vns.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns - -[Install] -WantedBy=multi-user.target diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf deleted file mode 100644 index 42b809d..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/main.fmf +++ /dev/null @@ -1,26 +0,0 @@ -summary: Testing netns for multiple BGP instances when testing FRR -description: 'Test that frr correctly changes inbound route filter after a config reload' -author: Michal Ruprich -component: - - frr -test: ./runtest.sh -framework: beakerlib -require: - - library(virtual-network/virtual-network) -recommend: - - frr -duration: 5m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-6583 -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-8.10 - continue: false -extra-nitrate: TC#0615943 -id: b474f149-1f9d-4aeb-9ee1-c44cc2654e49 diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh deleted file mode 100755 index 2197d67..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/runtest.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of -# Description: Test that frr correctly changes inbound route filter after a config reload -# Author: Michal Ruprich -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -#Very simple case where we need two routers R1 and R2 to establish neighborship and send some data -SRV_DUMMY1_IF_NAME="dummy1" -SRV_DUMMY1_IF_ADDR="192.168.212.1" -SRV_DUMMY1_IF_NETWORK="192.168.212.0" -SRV_DUMMY1_IF_PREFIX="24" -SRV_DUMMY1_IF_BCAST="192.168.212.255" - -SERVER_IF_ADDR="192.168.222.240" -SERVER_IF_PREFIX="31" -SERVER_IF_BCAST="255.255.255.255" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.241" -CLIENT_IF_PREFIX="31" -CLIENT_IF_BCAST="255.255.255.255" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - # set up network - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - # client IP is not configured here, as the only way how to trigger warning is to configure the IP while zebra is already running - vnRunServer "ip link add ${SRV_DUMMY1_IF_NAME} type dummy" 0 "Adding dummy interface on the SERVER side" - vnRunServer "ip link set ${SRV_DUMMY1_IF_NAME} up" 0 "Setting the dummy interface UP" - vnRunServer "ip addr add ${SRV_DUMMY1_IF_ADDR}/${SRV_DUMMY1_IF_PREFIX} dev ${SRV_DUMMY1_IF_NAME}" 0 "Configuring IPv4 address on dummy interface of the SERVER side" - - 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 "mkdir /etc/frr/{vns,vnc}" - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc-reload.conf ${CLIENT_CONF_DIR}frr-vnc-reload.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${vnSERVER_IFACE}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SRV_DUMMY1_IF_NAME}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SRV_DUMMY1_IF_NETWORK}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SRV_DUMMY1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr-vnc-reload.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr-vnc-reload.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" - - vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" - vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" - # THIS IS THE ONLY BUG THAT CAN BE REPRODUCED, everything else works... - rlAssertNotGrep "warning: interface ${vnCLIENT_IFACE} broadcast addr ${CLIENT_IF_BCAST}/${CLIENT_IF_PREFIX} != calculated ${SERVER_IF_ADDR}, routing protocols may malfunction" "${CLIENT_FRR_LOG}" - - rlRun "sleep 30" 0 "Waiting for BGP peers to exchange routes and converge" - - #First let's see that the neighborship is established - rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP neighbor is ${CLIENT_IF_ADDR}\"" 0 "Show BGP neighborship on SERVER" - rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "BGP neighborship on SERVER is Established" - rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP neighbor is ${SERVER_IF_ADDR}\"" 0 "Show BGP neighborship on CLIENT" - rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "GP neighborship on CLIENT is Established" - - #At first, the route to the advertised network should be visible ONLY on the SERVER, CLIENT has filter - rlRun -s "vtysh -N vns -c 'show ip route' | grep \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX} is directly connected\"" 0 "Show routes on SERVER" - rlRun -s "vtysh -N vnc -c 'show ip route' | grep -v \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX}\"" 0 "Show routes on CLIENT" - - #Reload CLIENT config with permit clause in the prefix-list - rlRun "/usr/libexec/frr/frr-reload.py -N vnc --reload ${CLIENT_CONF_DIR}frr-vnc-reload.conf" - - rlRun "vtysh -N vnc -c 'sh ip route'" - rlRun "sleep 30" 0 "Waiting for the routes to exchange" - rlRun "vtysh -N vnc -c 'sh ip route'" - - #Check that the route from SERVER is available - rlRun -s "vtysh -N vnc -c 'show ip route' | grep \"${SRV_DUMMY1_IF_NETWORK}/${SRV_DUMMY1_IF_PREFIX}\"" 0 "Show routes on CLIENT" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRunServer "ip link del ${SRV_DUMMY1_IF_NAME} type dummy" - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf b/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Regression/routes-are-not-refreshed-after-changing-the-inbound-route-rules-from-deny-to-permit/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Regression/set-src-ipv6/daemons-vnc b/Regression/set-src-ipv6/daemons-vnc deleted file mode 100644 index 3b386ba..0000000 --- a/Regression/set-src-ipv6/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Regression/set-src-ipv6/daemons-vns b/Regression/set-src-ipv6/daemons-vns deleted file mode 100644 index 7a5ec3f..0000000 --- a/Regression/set-src-ipv6/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Regression/set-src-ipv6/frr-vnc.conf b/Regression/set-src-ipv6/frr-vnc.conf deleted file mode 100644 index 9ae2a7c..0000000 --- a/Regression/set-src-ipv6/frr-vnc.conf +++ /dev/null @@ -1,20 +0,0 @@ -hostname RouterVNC - -log file debugging -! -*- bgp -*- -! -router bgp 65001 - no bgp ebgp-requires-policy - neighbor remote-as external - neighbor ebgp-multihop - ! - address-family ipv6 unicast - neighbor activate - network /128 - network /128 - exit-address-family -exit -! -! -line vty -! diff --git a/Regression/set-src-ipv6/frr-vnc.service b/Regression/set-src-ipv6/frr-vnc.service deleted file mode 100644 index 8ce3c85..0000000 --- a/Regression/set-src-ipv6/frr-vnc.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc - -[Install] -WantedBy=multi-user.target diff --git a/Regression/set-src-ipv6/frr-vns.conf b/Regression/set-src-ipv6/frr-vns.conf deleted file mode 100644 index d307561..0000000 --- a/Regression/set-src-ipv6/frr-vns.conf +++ /dev/null @@ -1,49 +0,0 @@ -frr defaults traditional -hostname RouterVNS -! -log file debugging -no ip forwarding -no ipv6 forwarding -! -debug bgp neighbor-events -debug bgp updates in -debug bgp updates out -debug bgp zebra -! -debug route-map -! -! -! -! -router bgp 65000 - no bgp ebgp-requires-policy - neighbor remote-as external - neighbor ebgp-multihop - ! - address-family ipv6 unicast - neighbor activate - exit-address-family -exit -! -ipv6 prefix-list prefix-list-for-datasync seq 5 permit fd00:268:70fd:1001::/64 le 128 -ipv6 prefix-list prefix-list-for-internal seq 15 permit fd00:268:70fd:1000::/64 le 128 -ipv6 prefix-list prefix-list-for-internal seq 20 permit ::/0 -! -route-map set_src_lo permit 5 - match ipv6 address prefix-list prefix-list-for-datasync - set src -exit -! -route-map set_src_lo permit 10 - match ipv6 address prefix-list prefix-list-for-internal - set src -exit -! -route-map set_src_lo permit 20 -exit -! -ipv6 protocol bgp route-map set_src_lo -! -line vty -! -! diff --git a/Regression/set-src-ipv6/frr-vns.service b/Regression/set-src-ipv6/frr-vns.service deleted file mode 100644 index d9fa54f..0000000 --- a/Regression/set-src-ipv6/frr-vns.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns - -[Install] -WantedBy=multi-user.target diff --git a/Regression/set-src-ipv6/main.fmf b/Regression/set-src-ipv6/main.fmf deleted file mode 100644 index c2f660c..0000000 --- a/Regression/set-src-ipv6/main.fmf +++ /dev/null @@ -1,28 +0,0 @@ -summary: Testing the set src clause capability for IPv6 route-map -description: Tests whether different set src clauses in one IPv6 route-map command - work correctly -author: Michal Ruprich -component: - - frr -test: ./runtest.sh -framework: beakerlib -require: - - library(virtual-network/virtual-network) -recommend: - - frr - - tcpdump -duration: 5m -enabled: false -tag: - - Tier1 -tier: '1' -link: - - verifies: https://issues.redhat.com/browse/RHEL-13756 -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-8.10 - continue: false -extra-nitrate: TC#0617416 -id: 669cf94c-af1b-4d3f-8ef2-23835cfcb01f \ No newline at end of file diff --git a/Regression/set-src-ipv6/runtest.sh b/Regression/set-src-ipv6/runtest.sh deleted file mode 100755 index 394b956..0000000 --- a/Regression/set-src-ipv6/runtest.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of -# Description: Test that frr correctly changes inbound route filter after a config reload -# Author: Michal Ruprich -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -SERVER_IF_ADDR="192.168.222.240" -SERVER_IF_PREFIX="31" -SERVER_IF_BCAST="255.255.255.255" - -SERVER_IF_IPV6_ADDR_1="fd00:268:70fd:1000::3:e003" -SERVER_IF_IPV6_ADDR_2="fd00:268:70fd:1001::3:e003" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.241" -CLIENT_IF_PREFIX="31" -CLIENT_IF_BCAST="255.255.255.255" - -CLIENT_IF_IPV6_ADDR_1="fd00:268:70fd:1000::3:e001" -CLIENT_IF_IPV6_ADDR_2="fd00:268:70fd:1001::3:e001" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunServer "ip addr add ${SERVER_IF_IPV6_ADDR_1}/128 dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" - vnRunServer "ip addr add ${SERVER_IF_IPV6_ADDR_2}/128 dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" - - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - vnRunClient "ip addr add ${CLIENT_IF_IPV6_ADDR_1}/128 dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - vnRunClient "ip addr add ${CLIENT_IF_IPV6_ADDR_2}/128 dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - rlRun "ip a" - vnRunClient "ip a" - vnRunServer "ip a" - - 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 "mkdir /etc/frr/{vns,vnc}" - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_IPV6_ADDR_1}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_IPV6_ADDR_2}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "cat ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_IPV6_ADDR_1}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_IPV6_ADDR_2}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "cat ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" - vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" - - rlRun "sleep 30" 0 "Waiting for BGP peers to exchange routes and converge" - - #First let's see that the neighborship is established - rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP neighbor is ${CLIENT_IF_ADDR}\"" 0 "Show BGP neighborship on SERVER" - rlRun "vtysh -N vns -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "BGP neighborship on SERVER is Established" - rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP neighbor is ${SERVER_IF_ADDR}\"" 0 "Show BGP neighborship on CLIENT" - rlRun "vtysh -N vnc -c 'show ip bgp nei' | grep \"BGP state = Established\"" 0 "GP neighborship on CLIENT is Established" - - #Both CLIENT IPv6 addresses should have been propagated to the SERVER - rlRun -s "vtysh -N vns -c 'show ipv6 route'" - rlRun -s "vtysh -N vns -c 'show ipv6 route' | grep \"B>\* ${CLIENT_IF_IPV6_ADDR_1}\"" 0 "Show routes on SERVER" - rlRun -s "vtysh -N vns -c 'show ipv6 route' | grep \"B>\* ${CLIENT_IF_IPV6_ADDR_2}\"" 0 "Show routes on SERVER" - - # route to client should have a proper src set - vnRunServer "ip -6 route" &> ${MAIN_LOG} - - rlRun "grep \"${CLIENT_IF_IPV6_ADDR_1}.*bgp src ${SERVER_IF_IPV6_ADDR_1}\" ${MAIN_LOG}" - rlRun "grep \"${CLIENT_IF_IPV6_ADDR_2}.*bgp src ${SERVER_IF_IPV6_ADDR_2}\" ${MAIN_LOG}" - cat ${MAIN_LOG} - - - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Regression/set-src-ipv6/vtysh-vnc.conf b/Regression/set-src-ipv6/vtysh-vnc.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Regression/set-src-ipv6/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Regression/set-src-ipv6/vtysh-vns.conf b/Regression/set-src-ipv6/vtysh-vns.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Regression/set-src-ipv6/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/daemons b/Regression/vtysh-running-config-output-not-showing-bgp/daemons deleted file mode 100644 index 5174536..0000000 --- a/Regression/vtysh-running-config-output-not-showing-bgp/daemons +++ /dev/null @@ -1,81 +0,0 @@ -# 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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf b/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf deleted file mode 100644 index 73fc82f..0000000 --- a/Regression/vtysh-running-config-output-not-showing-bgp/frr.conf +++ /dev/null @@ -1,26 +0,0 @@ -hostname ctrl-3-0 -log file /var/log/frr/frr.log debugging -service integrated-vtysh-config -line vty - -router bgp 64999 - bgp log-neighbor-changes - bgp graceful-shutdown - - neighbor uplink peer-group - neighbor uplink remote-as internal - neighbor uplink bfd - neighbor uplink ttl-security hops 1 - neighbor enp2s0 interface peer-group uplink - neighbor enp3s0 interface peer-group uplink - - address-family ipv4 unicast - redistribute connected - neighbor uplink allowas-in origin - exit-address-family - - address-family ipv6 unicast - redistribute connected - neighbor uplink activate - neighbor uplink allowas-in origin - exit-address-family \ No newline at end of file diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf b/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf deleted file mode 100644 index 40b0783..0000000 --- a/Regression/vtysh-running-config-output-not-showing-bgp/main.fmf +++ /dev/null @@ -1,32 +0,0 @@ -summary: Test for BZ#1917269 (vtysh running-config output not showing bgp) -description: | - Bug summary: vtysh running-config output not showing bgp ttl-security hops option - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier2 -tier: '2' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1917269 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - enabled: false - when: distro < rhel-8.6 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0611713 -extra-summary: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp -extra-task: /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp -id: bd0f6afa-1eaf-412b-9ad5-84664af133ff diff --git a/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh b/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh deleted file mode 100755 index 0964b22..0000000 --- a/Regression/vtysh-running-config-output-not-showing-bgp/runtest.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Regression/vtysh-running-config-output-not-showing-bgp -# Description: Test for BZ#1917269 (vtysh running-config output not showing bgp) -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - 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 frr.conf /etc/frr/frr.conf" 0 "Placing frr.conf file" - rlRun "cp daemons /etc/frr/daemons" 0 "Placing daemons file" - rlServiceStart "frr" - - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - rlRun "vtysh -c \"sh ru\" | grep \"neighbor uplink ttl-security hops 1\"" 0 "Testing if configuration is in running config" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlServiceRestore "frr" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/basic-bgp/daemons-vnc b/Sanity/basic-bgp/daemons-vnc deleted file mode 100644 index 3b386ba..0000000 --- a/Sanity/basic-bgp/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Sanity/basic-bgp/daemons-vns b/Sanity/basic-bgp/daemons-vns deleted file mode 100644 index 7a5ec3f..0000000 --- a/Sanity/basic-bgp/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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 -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" diff --git a/Sanity/basic-bgp/frr-vnc.conf b/Sanity/basic-bgp/frr-vnc.conf deleted file mode 100644 index d974838..0000000 --- a/Sanity/basic-bgp/frr-vnc.conf +++ /dev/null @@ -1,24 +0,0 @@ -hostname RouterVNC -! -log file debugging -! -router bgp - bgp router-id - no bgp default ipv4-unicast - neighbor remote-as - neighbor remote-as - ! - address-family ipv4 unicast - network / - network / - network / - neighbor activate - exit-address-family - ! - address-family ipv6 unicast - network / - network / - network / - neighbor activate - exit-address-family -exit \ No newline at end of file diff --git a/Sanity/basic-bgp/frr-vnc.service b/Sanity/basic-bgp/frr-vnc.service deleted file mode 100644 index 8ce3c85..0000000 --- a/Sanity/basic-bgp/frr-vnc.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc - -[Install] -WantedBy=multi-user.target diff --git a/Sanity/basic-bgp/frr-vns.conf b/Sanity/basic-bgp/frr-vns.conf deleted file mode 100644 index 1ff9c2d..0000000 --- a/Sanity/basic-bgp/frr-vns.conf +++ /dev/null @@ -1,24 +0,0 @@ -hostname RouterVNS -! -log file debugging -! -router bgp - bgp router-id - no bgp default ipv4-unicast - neighbor remote-as - neighbor remote-as - ! - address-family ipv4 unicast - network / - network / - network / - neighbor activate - exit-address-family - ! - address-family ipv6 unicast - network / - network / - network / - neighbor activate - exit-address-family -exit \ No newline at end of file diff --git a/Sanity/basic-bgp/frr-vns.service b/Sanity/basic-bgp/frr-vns.service deleted file mode 100644 index d9fa54f..0000000 --- a/Sanity/basic-bgp/frr-vns.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service - -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns - -[Install] -WantedBy=multi-user.target diff --git a/Sanity/basic-bgp/main.fmf b/Sanity/basic-bgp/main.fmf deleted file mode 100644 index fcc0901..0000000 --- a/Sanity/basic-bgp/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Basic BGP test -description: Testing BGP functionality without multihosts using virtual networks -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -require: - - library(virtual-network/virtual-network) -duration: 10m -enabled: true -tag: - - Tier1 -tier: '1' -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0618618 -id: c0829323-fe9b-4736-b28e-727e72845491 \ No newline at end of file diff --git a/Sanity/basic-bgp/test.sh b/Sanity/basic-bgp/test.sh deleted file mode 100755 index 94d1995..0000000 --- a/Sanity/basic-bgp/test.sh +++ /dev/null @@ -1,388 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -PACKAGE="frr" - -SERVER_CLIENT_IF_ADDR="192.168.222.0" -SERVER_CLIENT_IF_PREFIX="24" - -SERVER_IF_ADDR="192.168.222.1" -SERVER_IF_PREFIX="24" -SERVER_IF_BCAST="192.168.222.255" - -SERVER_BGP_AS="65000" - -SERVER_STUB_1_IF_ADDR="192.168.101.0" -SERVER_STUB_1_IF_PREFIX="24" -SERVER_STUB_1_IF6_ADDR="2001:aaaa:bbbb:1000::" -SERVER_STUB_1_IF6_PREFIX="64" - -SERVER_STUB_2_IF_ADDR="192.168.102.0" -SERVER_STUB_2_IF_PREFIX="24" -SERVER_STUB_2_IF6_ADDR="2001:aaaa:bbbb:2000::" -SERVER_STUB_2_IF6_PREFIX="64" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.2" -CLIENT_IF_PREFIX="24" -CLIENT_IF_BCAST="192.168.222.255" - -CLIENT_BGP_AS="75000" - -CLIENT_STUB_1_IF_ADDR="192.168.201.0" -CLIENT_STUB_1_IF_PREFIX="24" -CLIENT_STUB_1_IF6_ADDR="2001:aaaa:bbbb:3000::" -CLIENT_STUB_1_IF6_PREFIX="64" - -CLIENT_STUB_2_IF_ADDR="192.168.202.0" -CLIENT_STUB_2_IF_PREFIX="24" -CLIENT_STUB_2_IF6_ADDR="2001:aaaa:bbbb:4000::" -CLIENT_STUB_2_IF6_PREFIX="64" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -SERVER_CLIENT_IF6_ADDR="2001:aaaa:bbbb:5000::" -SERVER_CLIENT_IF6_PREFIX="64" - -SERVER_IF6_ADDR="2001:aaaa:bbbb:5000::1" -SERVER_IF6_PREFIX="64" - -CLIENT_IF6_ADDR="2001:aaaa:bbbb:5000::2" -CLIENT_IF6_PREFIX="64" - - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunServer "ip addr add ${SERVER_IF6_ADDR}/${SERVER_IF6_PREFIX} dev ${vnSERVER_IFACE}" 0 "Configuring IPv6 address on SERVER side of veth" - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - vnRunClient "ip addr add ${CLIENT_IF6_ADDR}/${CLIENT_IF6_PREFIX} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv6 address on CLIENT side of veth" - - - # Create isolated stub 1 network available only from SERVER network - vnRunServer "ip link add VNS_STUB_1 type veth peer name VNS_STUB_PEER_1" - vnRunServer "ip link set VNS_STUB_1 netns ${vnSERVER_NAMESPACE}" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} dev VNS_STUB_1" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF6_ADDR}/${SERVER_STUB_1_IF6_PREFIX} dev VNS_STUB_1" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_1 up" - vnRunServer "ip link set VNS_STUB_PEER_1 up" - - # Create isolated stub 2 network available only from SERVER network - vnRunServer "ip link add VNS_STUB_2 type veth peer name VNS_STUB_PEER_2" - vnRunServer "ip link set VNS_STUB_2 netns ${vnSERVER_NAMESPACE}" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} dev VNS_STUB_2" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF6_ADDR}/${SERVER_STUB_2_IF6_PREFIX} dev VNS_STUB_2" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_2 up" - vnRunServer "ip link set VNS_STUB_PEER_2 up" - - # Create isolated stub 1 network available only from CLIENT network - vnRunClient "ip link add VNC_STUB_1 type veth peer name VNC_STUB_PEER_1" - vnRunClient "ip link set VNC_STUB_1 netns ${vnCLIENT_NAMESPACE}" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} dev VNC_STUB_1" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF6_ADDR}/${CLIENT_STUB_1_IF6_PREFIX} dev VNC_STUB_1" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_1 up" - vnRunClient "ip link set VNC_STUB_PEER_1 up" - - # Create isolated stub 2 network available only from CLIENT network - vnRunClient "ip link add VNC_STUB_2 type veth peer name VNC_STUB_PEER_2" - vnRunClient "ip link set VNC_STUB_2 netns ${vnCLIENT_NAMESPACE}" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} dev VNC_STUB_2" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF6_ADDR}/${CLIENT_STUB_2_IF6_PREFIX} dev VNC_STUB_2" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_2 up" - vnRunClient "ip link set VNC_STUB_PEER_2 up" - - rlRun "ip a &> ip.log" - vnRunServer "ip a &> server-ip.log" - vnRunClient "ip a &> client-ip.log" - - 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 "mkdir /etc/frr/{vns,vnc}" - - rm -rf /etc/frr/frr.conf - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_CLIENT_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF6_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF6_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_BGP_AS}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_1_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_1_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${CLIENT_STUB_1_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_1_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "sed -i 's||${SERVER_CLIENT_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF6_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF6_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - vnRunServer "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Server should be capable to ping its stub 1 ipv4 address" - vnRunServer "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Server should be capable to ping its stub 2 ipv4 address" - - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 ipv4 address before FRR with BGP is run" - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 ipv4 address before FRR with BGP is run" - - vnRunClient "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Client should be capable to ping its stub 1 ipv4 address" - vnRunClient "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Client should be capable to ping its stub 2 ipv4 address" - - vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 ipv4 address before FRR with BGP is run" - vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 ipv4 address before FRR with BGP is run" - - vnRunServer "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 0 "Server should be capable to ping its stub 1 ipv6 address" - vnRunServer "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 0 "Server should be capable to ping its stub 2 ipv6 address" - - vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 ipv6 address before FRR with BGP is run" - vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 ipv6 address before FRR with BGP is run" - - vnRunClient "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 0 "Client should be capable to ping its stub 1 ipv6 address" - vnRunClient "ping6 -c 1 ${CLIENT_STUB_2_IF6_ADDR}" 0 "Client should be capable to ping its stub 2 ipv6 address" - - vnRunClient "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 ipv6 address before FRR with BGP is run" - vnRunClient "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 ipv6 address before FRR with BGP is run" - - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - if rlIsRHEL ">8.3" || rlIsFedora || rlIsCentOS '>=8'; then - rlRun "vtysh -N vns -c 'configure terminal' -c 'router bgp $SERVER_BGP_AS' -c 'no bgp ebgp-requires-policy'" - rlRun "vtysh -N vnc -c 'configure terminal' -c 'router bgp $CLIENT_BGP_AS' -c 'no bgp ebgp-requires-policy'" - fi - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run' &> server-show-running-config.log" - rlRun "vtysh -N vnc -c 'sh run' &> client-show-running-config.log" - - vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client ipv4 address" - vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server ipv4 address" - - vnRunServer "ping6 -c 1 ${CLIENT_IF6_ADDR}" 0 "Testing that server can ping client ipv6 address" - vnRunClient "ping6 -c 1 ${SERVER_IF6_ADDR}" 0 "Testing that client can ping server ipv6 address" - - rlRun "sleep 60" 0 "Waiting for peers to exchange routes and converge" - rlPhaseEnd - - rlPhaseStartTest "ipv4" - # check server - rlRun "vtysh -N vns -c 'show ip bgp ipv4 neighbors' &> server-show-ip-bgp-ipv4-neighbors.log" - rlAssertGrep "BGP state = Established" server-show-ip-bgp-ipv4-neighbors.log - rlAssertGrep "BGP neighbor is $CLIENT_IF_ADDR, remote AS $CLIENT_BGP_AS, local AS $SERVER_BGP_AS" server-show-ip-bgp-ipv4-neighbors.log - - rlRun "vtysh -N vns -c 'sh ip bgp ipv4' &> server-show-ip-bgp-ipv4.log" - rlAssertGrep "\*>\s*${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E - rlAssertGrep "\*>\s*${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E - if rlIsRHELLike '>=10' || rlIsFedora; then - rlAssertGrep "\*\s*${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E - else - rlAssertGrep "\*\s*${SERVER_CLIENT_IF_ADDR}/${SERVER_CLIENT_IF_PREFIX} ${CLIENT_IF_ADDR}\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv4.log -E - fi - rlRun "vtysh -N vns -c 'show ip route' &> server-show-ip-route.log" - rlAssertGrep "B>\* ${CLIENT_STUB_1_IF_ADDR}" server-show-ip-route.log - rlAssertGrep "B>\* ${CLIENT_STUB_2_IF_ADDR}" server-show-ip-route.log - - - # check client - rlRun "vtysh -N vnc -c 'show ip bgp ipv4 neighbors' &> client-show-ip-bgp-ipv4-neighbors.log" - rlAssertGrep "BGP state = Established" client-show-ip-bgp-ipv4-neighbors.log - rlAssertGrep "BGP neighbor is $SERVER_IF_ADDR, remote AS $SERVER_BGP_AS, local AS $CLIENT_BGP_AS" client-show-ip-bgp-ipv4-neighbors.log - - rlRun "vtysh -N vnc -c 'sh ip bgp ipv4' &> client-show-ip-bgp-ipv4.log" - rlAssertGrep "\*>\s*${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E - rlAssertGrep "\*>\s*${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E - if rlIsRHELLike '>=10' || rlIsFedora; then - rlAssertGrep "\*\s*${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E - else - rlAssertGrep "\*\s*${SERVER_CLIENT_IF_ADDR}/${SERVER_CLIENT_IF_PREFIX} ${SERVER_IF_ADDR}\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv4.log -E - fi - - rlRun "vtysh -N vnc -c 'show ip route' &> client-show-ip-route.log" - rlAssertGrep "B>\* ${SERVER_STUB_1_IF_ADDR}" client-show-ip-route.log - rlAssertGrep "B>\* ${SERVER_STUB_2_IF_ADDR}" client-show-ip-route.log - - - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Server should be capable to ping client's stub 1 ipv4 address since FRR with BGP is run" - vnRunServer "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Server should be capable to ping client's stub 2 ipv4 address since FRR with BGP is run" - vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Client should be capable to ping server's stub 1 ipv4 address since FRR with BGP is run" - vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Client should be capable to ping server's stub 2 ipv4 address since FRR with BGP is run" - rlPhaseEnd - - rlPhaseStartTest "ipv6" - # check server - rlRun "vtysh -N vns -c 'show ip bgp ipv6 neighbors' &> server-show-ip-bgp-ipv6-neighbors.log" - rlAssertGrep "BGP state = Established" server-show-ip-bgp-ipv6-neighbors.log - rlAssertGrep "BGP neighbor is $CLIENT_IF6_ADDR, remote AS $CLIENT_BGP_AS, local AS $SERVER_BGP_AS" server-show-ip-bgp-ipv6-neighbors.log - - rlRun "vtysh -N vns -c 'sh ip bgp ipv6 wide' &> server-show-ip-bgp-ipv6.log" - rlAssertGrep "\*>\s*${CLIENT_STUB_1_IF6_ADDR}/${CLIENT_STUB_1_IF6_PREFIX}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E - rlAssertGrep "\*>\s*${CLIENT_STUB_2_IF6_ADDR}/${CLIENT_STUB_2_IF6_PREFIX}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E - if rlIsRHELLike '>=10' || rlIsFedora; then - rlAssertGrep "\*\s*.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E - else - rlAssertGrep "\*\s*${SERVER_CLIENT_IF6_ADDR}.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E - fi - - rlRun "vtysh -N vns -c 'show ipv6 route' &> server-show-ipv6-route.log" - rlAssertGrep "B>\* ${CLIENT_STUB_1_IF6_ADDR}" server-show-ipv6-route.log - rlAssertGrep "B>\* ${CLIENT_STUB_2_IF6_ADDR}" server-show-ipv6-route.log - - - # check client - rlRun "vtysh -N vnc -c 'show ip bgp ipv6 neighbors' &> client-show-ip-bgp-ipv6-neighbors.log" - rlAssertGrep "BGP state = Established" client-show-ip-bgp-ipv6-neighbors.log - rlAssertGrep "BGP neighbor is $SERVER_IF6_ADDR, remote AS $SERVER_BGP_AS, local AS $CLIENT_BGP_AS" client-show-ip-bgp-ipv6-neighbors.log - - rlRun "vtysh -N vnc -c 'sh ip bgp ipv6 wide' &> client-show-ip-bgp-ipv6.log" - rlAssertGrep "\*>\s*${SERVER_STUB_1_IF6_ADDR}/${SERVER_STUB_1_IF6_PREFIX}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E - rlAssertGrep "\*>\s*${SERVER_STUB_2_IF6_ADDR}/${SERVER_STUB_2_IF6_PREFIX}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E - if rlIsRHELLike '>=10' || rlIsFedora; then - rlAssertGrep "\*\s*.*\s*0\s*0 ${CLIENT_BGP_AS} i" server-show-ip-bgp-ipv6.log -E - else - rlAssertGrep "\*\s*${SERVER_CLIENT_IF6_ADDR}.*\s*0\s*0 ${SERVER_BGP_AS} i" client-show-ip-bgp-ipv6.log -E - fi - - rlRun "vtysh -N vnc -c 'show ipv6 route' &> client-show-ipv6-route.log" - rlAssertGrep "B>\* ${SERVER_STUB_1_IF6_ADDR}" client-show-ipv6-route.log - rlAssertGrep "B>\* ${SERVER_STUB_2_IF6_ADDR}" client-show-ipv6-route.log - - - vnRunServer "ping6 -c 1 ${CLIENT_STUB_1_IF6_ADDR}" 0 "Server should be capable to ping client's stub 1 ipv6 address since FRR with BGP is run" - vnRunServer "ping6 -c 1 ${CLIENT_STUB_2_IF6_ADDR}" 0 "Server should be capable to ping client's stub 2 ipv6 address since FRR with BGP is run" - vnRunClient "ping6 -c 1 ${SERVER_STUB_1_IF6_ADDR}" 0 "Client should be capable to ping server's stub 1 ipv6 address since FRR with BGP is run" - vnRunClient "ping6 -c 1 ${SERVER_STUB_2_IF6_ADDR}" 0 "Client should be capable to ping server's stub 2 ipv6 address since FRR with BGP is run" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - rlFileSubmit "ip.log" - rlFileSubmit "server-ip.log" - rlFileSubmit "client-ip.log" - - rlFileSubmit "${SERVER_CONF_DIR}frr.conf" - rlFileSubmit "server-show-running-config.log" - rlFileSubmit "server-show-ip-bgp-ipv4-neighbors.log" - rlFileSubmit "server-show-ip-bgp-ipv4.log" - rlFileSubmit "server-show-ip-route.log" - rlFileSubmit "server-show-ip-bgp-ipv6-neighbors.log" - rlFileSubmit "server-show-ip-bgp-ipv6.log" - rlFileSubmit "server-show-ipv6-route.log" - rlFileSubmit $SERVER_FRR_LOG - - rlFileSubmit "${CLIENT_CONF_DIR}frr.conf" - rlFileSubmit "client-show-running-config.log" - rlFileSubmit "client-show-ip-bgp-ipv4-neighbors.log" - rlFileSubmit "client-show-ip-bgp-ipv4.log" - rlFileSubmit "client-show-ip-route.log" - rlFileSubmit "client-show-ip-bgp-ipv6-neighbors.log" - rlFileSubmit "client-show-ip-bgp-ipv6.log" - rlFileSubmit "client-show-ipv6-route.log" - rlFileSubmit $CLIENT_FRR_LOG - - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/basic-bgp/vtysh-vnc.conf b/Sanity/basic-bgp/vtysh-vnc.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Sanity/basic-bgp/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Sanity/basic-bgp/vtysh-vns.conf b/Sanity/basic-bgp/vtysh-vns.conf deleted file mode 100644 index e0ab9cb..0000000 --- a/Sanity/basic-bgp/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config diff --git a/Sanity/basic-ospf/daemons-vnc b/Sanity/basic-ospf/daemons-vnc deleted file mode 100644 index 6fc1008..0000000 --- a/Sanity/basic-ospf/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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=no -ospfd=yes -ospf6d=no -ripd=no -ripngd=no -isisd=no -pimd=no -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-ospf/daemons-vns b/Sanity/basic-ospf/daemons-vns deleted file mode 100644 index b77b9c8..0000000 --- a/Sanity/basic-ospf/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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=no -ospfd=yes -ospf6d=no -ripd=no -ripngd=no -isisd=no -pimd=no -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vnc.conf b/Sanity/basic-ospf/frr-vnc.conf deleted file mode 100644 index 329cfec..0000000 --- a/Sanity/basic-ospf/frr-vnc.conf +++ /dev/null @@ -1,13 +0,0 @@ -hostname RouterVNC -! -log file debugging -! -router ospf - ospf router-id - network / area 0 - network / area 1 - network / area 2 - ospf opaque-lsa -! -line vty -! \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vnc.service b/Sanity/basic-ospf/frr-vnc.service deleted file mode 100644 index 9decd6e..0000000 --- a/Sanity/basic-ospf/frr-vnc.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vns.conf b/Sanity/basic-ospf/frr-vns.conf deleted file mode 100644 index a20b79a..0000000 --- a/Sanity/basic-ospf/frr-vns.conf +++ /dev/null @@ -1,14 +0,0 @@ -hostname RouterVNS -! -log file debugging -! -router ospf - ospf router-id - network / area 0 - network / area 1 - network / area 2 - ospf opaque-lsa - -! -line vty -! \ No newline at end of file diff --git a/Sanity/basic-ospf/frr-vns.service b/Sanity/basic-ospf/frr-vns.service deleted file mode 100644 index 9ed4bb1..0000000 --- a/Sanity/basic-ospf/frr-vns.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-ospf/main.fmf b/Sanity/basic-ospf/main.fmf deleted file mode 100644 index 4744a96..0000000 --- a/Sanity/basic-ospf/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Basic OSPF test -description: Testing OSPF functionality without multihosts using virtual networks -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -require: - - library(virtual-network/virtual-network) -duration: 10m -enabled: true -tag: - - Tier1 -tier: '1' -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0618017 -id: 7e3f00cc-8e85-4a47-8f06-2d1edd35904d \ No newline at end of file diff --git a/Sanity/basic-ospf/test.sh b/Sanity/basic-ospf/test.sh deleted file mode 100755 index 4a3e6cb..0000000 --- a/Sanity/basic-ospf/test.sh +++ /dev/null @@ -1,242 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -PACKAGE="frr" - -SERVER_CLIENT_IF_ADDR="192.168.222.0" -SERVER_CLIENT_IF_PREFIX="24" - -SERVER_IF_ADDR="192.168.222.1" -SERVER_IF_PREFIX="24" -SERVER_IF_BCAST="192.168.222.255" - -SERVER_STUB_1_IF_ADDR="192.168.101.0" -SERVER_STUB_1_IF_PREFIX="24" - -SERVER_STUB_2_IF_ADDR="192.168.102.0" -SERVER_STUB_2_IF_PREFIX="24" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.2" -CLIENT_IF_PREFIX="24" -CLIENT_IF_BCAST="192.168.222.255" - -CLIENT_STUB_1_IF_ADDR="192.168.201.0" -CLIENT_STUB_1_IF_PREFIX="24" -CLIENT_STUB_2_IF_ADDR="192.168.202.0" -CLIENT_STUB_2_IF_PREFIX="24" - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - - # Create isolated stub 1 network available only from SERVER network - vnRunServer "ip link add VNS_STUB_1 type veth peer name VNS_STUB_PEER_1" - vnRunServer "ip link set VNS_STUB_1 netns ${vnSERVER_NAMESPACE}" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_1_IF_ADDR}/${SERVER_STUB_1_IF_PREFIX} dev VNS_STUB_1" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_1 up" - vnRunServer "ip link set VNS_STUB_PEER_1 up" - - # Create isolated stub 2 network available only from SERVER network - vnRunServer "ip link add VNS_STUB_2 type veth peer name VNS_STUB_PEER_2" - vnRunServer "ip link set VNS_STUB_2 netns ${vnSERVER_NAMESPACE}" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_2_IF_ADDR}/${SERVER_STUB_2_IF_PREFIX} dev VNS_STUB_2" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB_2 up" - vnRunServer "ip link set VNS_STUB_PEER_2 up" - - # Create isolated stub 1 network available only from CLIENT network - vnRunClient "ip link add VNC_STUB_1 type veth peer name VNC_STUB_PEER_1" - vnRunClient "ip link set VNC_STUB_1 netns ${vnCLIENT_NAMESPACE}" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_1_IF_ADDR}/${CLIENT_STUB_1_IF_PREFIX} dev VNC_STUB_1" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_1 up" - vnRunClient "ip link set VNC_STUB_PEER_1 up" - - # Create isolated stub 2 network available only from CLIENT network - vnRunClient "ip link add VNC_STUB_2 type veth peer name VNC_STUB_PEER_2" - vnRunClient "ip link set VNC_STUB_2 netns ${vnCLIENT_NAMESPACE}" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_2_IF_ADDR}/${CLIENT_STUB_2_IF_PREFIX} dev VNC_STUB_2" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB_2 up" - vnRunClient "ip link set VNC_STUB_PEER_2 up" - - rlRun "ip a" - vnRunClient "ip a" - vnRunServer "ip a" - - 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 "mkdir /etc/frr/{vns,vnc}" - - rm -rf /etc/frr/frr.conf - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_1_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_2_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "cat ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_1_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_1_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_2_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "cat ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - vnRunServer "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Server should be capable to ping its stub 1" - vnRunServer "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Server should be capable to ping its stub 2" - - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 1 before FRR with OSPF is run" - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub 2 before FRR with OSPF is run" - - vnRunClient "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Client should be capable to ping its stub 1" - vnRunClient "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Client should be capable to ping its stub 2" - - vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 1 before FRR with OSPF is run" - vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub 2 before FRR with OSPF is run" - - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" - vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" - - rlRun "sleep 60" 0 "Waiting for peers to exchange routes and converge" - - # check server - rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"OSPF Router with ID (${SERVER_IF_ADDR})\"" 0 "Checking if server with its router-id is in ospf database" - rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"${CLIENT_IP_ADDR}\"" 0 "Check if client's ip is in ospf database of server" - rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"Area 0.0.0.1\"" 0 "Check if area 1 is loaded in ospf" - rlRun "vtysh -N vns -c 'show ip ospf database' | grep \"Area 0.0.0.2\"" 0 "Check if area 2 is loaded in ospf" - - rlRun "vtysh -N vns -c 'show ip ospf' | grep \"OSPF Routing Process, Router ID: $ROUTER_ID\"" 0 "Check if server with its router-id is in show ip ospf" - rlRun "vtysh -N vns -c 'show ip ospf' | grep \"Area ID: 0.0.0.1\"" 0 "Check if area 1 in show ip ospf" - rlRun "vtysh -N vns -c 'show ip ospf' | grep \"Area ID: 0.0.0.2\"" 0 "Check if area 2 in show ip ospf" - - rlRun "vtysh -N vns -c 'show ip ospf neighbor' | grep \"${CLIENT_IF_ADDR}\"" 0 "Check if server has client's ip in ospf neighbor" - rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"${CLIENT_IF_ADDR}\"" 0 "Check if server has client's ip in ip ospf routes" - - rlRun "vtysh -N vns -c 'show ip route' | grep \"O>\* ${CLIENT_STUB_1_IF_ADDR}\"" 0 "Check if client's stub 1 in ip routes of server" - rlRun "vtysh -N vns -c 'show ip route' | grep \"O>\* ${CLIENT_STUB_2_IF_ADDR}\"" 0 "Check if client's stub 2 in ip routes of server" - - rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"IA ${CLIENT_STUB_1_IF_ADDR}\"" 0 "Check if client's stub 1 is in ip ospf routes of server" - rlRun "vtysh -N vns -c 'show ip ospf route' | grep \"IA ${CLIENT_STUB_2_IF_ADDR}\"" 0 "Check if client's stub 2 is in ip ospf routes of server" - - # check client} - rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"OSPF Router with ID (${CLIENT_IF_ADDR})\"" 0 "Checking if client with its router-id is in ospf database" - rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"${SERVER_IP_ADDR}\"" 0 "Check if server's ip is in ospf database of client" - rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"Area 0.0.0.1\"" 0 "Check if area 1 is loaded in ospf" - rlRun "vtysh -N vnc -c 'show ip ospf database' | grep \"Area 0.0.0.2\"" 0 "Check if area 2 is loaded in ospf" - - rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"OSPF Routing Process, Router ID: $ROUTER_ID\"" 0 "Check if client with its router-id is in show ip ospf" - rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"Area ID: 0.0.0.1\"" 0 "Check if area 1 in show ip ospf" - rlRun "vtysh -N vnc -c 'show ip ospf' | grep \"Area ID: 0.0.0.2\"" 0 "Check if area 2 in show ip ospf" - - rlRun "vtysh -N vnc -c 'show ip ospf neighbor' | grep \"${SERVER_IF_ADDR}\"" 0 "Check if client has server's ip in ospf neighbor" - rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"${SERVER_IF_ADDR}\"" 0 "Check if server has server's ip in ip ospf routes" - - rlRun "vtysh -N vnc -c 'show ip route' | grep \"O>\* ${SERVER_STUB_1_IF_ADDR}\"" 0 "Check if server's stub 1 in ip routes of client" - rlRun "vtysh -N vnc -c 'show ip route' | grep \"O>\* ${SERVER_STUB_2_IF_ADDR}\"" 0 "Check if server's stub 2 in ip routes of client" - - rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"IA ${SERVER_STUB_1_IF_ADDR}\"" 0 "Check if server's stub 1 is in ip ospf routes of client" - rlRun "vtysh -N vnc -c 'show ip ospf route' | grep \"IA ${SERVER_STUB_2_IF_ADDR}\"" 0 "Check if server's stub 2 is in ip ospf routes of client" - - vnRunServer "ping -c 1 ${CLIENT_STUB_1_IF_ADDR}" 0 "Server should be capable to ping client's stub 1 since FRR with OSPF is run" - vnRunServer "ping -c 1 ${CLIENT_STUB_2_IF_ADDR}" 0 "Server should be capable to ping client's stub 2 since FRR with OSPF is run" - vnRunClient "ping -c 1 ${SERVER_STUB_1_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with OSPF is run" - vnRunClient "ping -c 1 ${SERVER_STUB_2_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with OSPF is run" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/basic-ospf/vtysh-vnc.conf b/Sanity/basic-ospf/vtysh-vnc.conf deleted file mode 100644 index f863f56..0000000 --- a/Sanity/basic-ospf/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/basic-ospf/vtysh-vns.conf b/Sanity/basic-ospf/vtysh-vns.conf deleted file mode 100644 index f863f56..0000000 --- a/Sanity/basic-ospf/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/basic-rip/daemons-vnc b/Sanity/basic-rip/daemons-vnc deleted file mode 100644 index c38eb43..0000000 --- a/Sanity/basic-rip/daemons-vnc +++ /dev/null @@ -1,121 +0,0 @@ -# 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=no -ospfd=no -ospf6d=no -ripd=yes -ripngd=no -isisd=no -pimd=no -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vnc" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-rip/daemons-vns b/Sanity/basic-rip/daemons-vns deleted file mode 100644 index 6097300..0000000 --- a/Sanity/basic-rip/daemons-vns +++ /dev/null @@ -1,121 +0,0 @@ -# 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=no -ospfd=no -ospf6d=no -ripd=yes -ripngd=no -isisd=no -pimd=no -pim6d=no -nhrpd=no -eigrpd=no -sharpd=no -pbrd=no -bfdd=no -fabricd=no -vrrpd=no -pathd=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" -pim6d_options=" -A ::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" -pathd_options=" -A 127.0.0.1" - - -# If you want to pass a common option to all daemons, you can use the -# "frr_global_options" variable. -# -#frr_global_options="" - - -# The list of daemons to watch is automatically generated by the init script. -# This variable can be used to pass options to watchfrr that will be passed -# prior to the daemon list. -# -# To make watchfrr create/join the specified netns, add the the "--netns" -# option here. It will only have an effect in /etc/frr//daemons, and -# you need to start FRR with "/usr/lib/frr/frrinit.sh start ". -# -watchfrr_options="--netns=vns" - - -# 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 - -# Uncomment this option if you want to run FRR as a non-root user. Note that -# you should know what you are doing since most of the daemons need root -# to work. This could be useful if you want to run FRR in a container -# for instance. -# FRR_NO_ROOT="yes" - -# For any daemon, you can specify a "wrap" command to start instead of starting -# the daemon directly. This will simply be prepended to the daemon invocation. -# These variables have the form daemon_wrap, where 'daemon' is the name of the -# daemon (the same pattern as the daemon_options variables). -# -# Note that when daemons are started, they are told to daemonize with the `-d` -# option. This has several implications. For one, the init script expects that -# when it invokes a daemon, the invocation returns immediately. If you add a -# wrap command here, it must comply with this expectation and daemonize as -# well, or the init script will never return. Furthermore, because daemons are -# themselves daemonized with -d, you must ensure that your wrapper command is -# capable of following child processes after a fork() if you need it to do so. -# -# If your desired wrapper does not support daemonization, you can wrap it with -# a utility program that daemonizes programs, such as 'daemonize'. An example -# of this might look like: -# -# bgpd_wrap="/usr/bin/daemonize /usr/bin/mywrapper" -# -# This is particularly useful for programs which record processes but lack -# daemonization options, such as perf and rr. -# -# If you wish to wrap all daemons in the same way, you may set the "all_wrap" -# variable. -# -#all_wrap="" \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vnc.conf b/Sanity/basic-rip/frr-vnc.conf deleted file mode 100644 index 81689da..0000000 --- a/Sanity/basic-rip/frr-vnc.conf +++ /dev/null @@ -1,11 +0,0 @@ -hostname RouterVNC -! -log file debugging -! -router rip - version 2 - network / - network / -! -line vty -! \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vnc.service b/Sanity/basic-rip/frr-vnc.service deleted file mode 100644 index 9decd6e..0000000 --- a/Sanity/basic-rip/frr-vnc.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh start vnc -ExecStop=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh stop vnc -ExecReload=/sbin/ip netns exec vnc /usr/libexec/frr/frrinit.sh reload vnc -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vns.conf b/Sanity/basic-rip/frr-vns.conf deleted file mode 100644 index ddc0b06..0000000 --- a/Sanity/basic-rip/frr-vns.conf +++ /dev/null @@ -1,11 +0,0 @@ -hostname RouterVNS -! -log file debugging -! -router rip - version 2 - network / - network / -! -line vty -! \ No newline at end of file diff --git a/Sanity/basic-rip/frr-vns.service b/Sanity/basic-rip/frr-vns.service deleted file mode 100644 index 9ed4bb1..0000000 --- a/Sanity/basic-rip/frr-vns.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=FRRouting -Documentation=https://frrouting.readthedocs.io/en/latest/setup.html -Wants=network.target -After=network-pre.target systemd-sysctl.service -Before=network.target -OnFailure=heartbeat-failed@%n.service -[Service] -Nice=-5 -Type=forking -NotifyAccess=all -StartLimitInterval=3m -StartLimitBurst=3 -TimeoutSec=2m -WatchdogSec=60s -RestartSec=5 -Restart=on-abnormal -LimitNOFILE=1024 -ExecStart=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh start vns -ExecStop=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh stop vns -ExecReload=/sbin/ip netns exec vns /usr/libexec/frr/frrinit.sh reload vns -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Sanity/basic-rip/main.fmf b/Sanity/basic-rip/main.fmf deleted file mode 100644 index 632bed9..0000000 --- a/Sanity/basic-rip/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: Basic RIP test -description: Testing RIP functionality without multihosts using virtual networks -author: Frantisek Hrdina -component: - - frr -test: ./test.sh -framework: beakerlib -recommend: - - frr -require: - - library(virtual-network/virtual-network) -duration: 10m -enabled: true -tag: - - Tier1 -tier: '1' -environment: - AVC_ERROR: +no_avc_check -adjust: - - enabled: false - when: distro < rhel-8 - continue: false -extra-nitrate: TC#0618011 -id: 98702b5f-d651-4d47-8a44-383ffa02eaed \ No newline at end of file diff --git a/Sanity/basic-rip/test.sh b/Sanity/basic-rip/test.sh deleted file mode 100755 index c29a806..0000000 --- a/Sanity/basic-rip/test.sh +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -. /usr/share/beakerlib/beakerlib.sh || exit 1 - - -PACKAGE="frr" - -SERVER_CLIENT_IF_ADDR="192.168.222.0" -SERVER_CLIENT_IF_PREFIX="24" - -SERVER_IF_ADDR="192.168.222.1" -SERVER_IF_PREFIX="24" -SERVER_IF_BCAST="192.168.222.255" - -SERVER_STUB_IF_ADDR="192.168.100.0" -SERVER_STUB_IF_PREFIX="24" - -SERVER_FRR_LOG="/var/log/frr/frr-r1.log" -SERVER_CONF_DIR="/etc/frr/vns/" - -CLIENT_IF_ADDR="192.168.222.2" -CLIENT_IF_PREFIX="24" -CLIENT_IF_BCAST="192.168.222.255" - -CLIENT_STUB_IF_ADDR="192.168.200.0" -CLIENT_STUB_IF_PREFIX="24" - - -CLIENT_FRR_LOG="/var/log/frr/frr-r2.log" -CLIENT_CONF_DIR="/etc/frr/vnc/" - -MAIN_LOG="/tmp/log_routes" - - -rlJournalStart - rlPhaseStartSetup "import virtual-network library" - rlRun "rlImport virtual-network/virtual-network" || rlDie "Import of the library required for the test failed" - rlPhaseEnd - - rlPhaseStartSetup - rlAssertRpm $PACKAGE - - TestDir=$(pwd) - rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" - rlRun "pushd $tmp" - - # Need to disable SeLinux, because it does not allow to start service via unit file - # in a network namespace using "ip netns exec". And there are other issues with pid files, log files, etc. - rlRun "setenforce 0" 0 "Disabling SELinux" - rlRun "ORIG_AVC_ERROR=${AVC_ERROR}" - rlRun "AVC_ERROR=+no_avc_check" - - - # set up the network, we want a specific IPv4 address for neighbor communication and two IPv6 addresses - # for the set src part of the configuration - vnCreateServerClientNetwork - vnRunServer "ip link set ${vnSERVER_IFACE} up" 0 "Setting the SERVER side of veth UP" - vnRunServer "ip link set lo up" 0 "Setting the SERVER side loopback UP" - vnRunClient "ip link set ${vnCLIENT_IFACE} up" 0 "Setting the CLIENT side of veth UP" - vnRunClient "ip link set lo up" 0 "Setting the CLIENT side loopback UP" - - vnRunServer "ip addr add ${SERVER_IF_ADDR}/${SERVER_IF_PREFIX} broadcast ${SERVER_IF_BCAST} dev ${vnSERVER_IFACE}" 0 "Configuring IPv4 address on SERVER side of veth" - vnRunClient "ip addr add ${CLIENT_IF_ADDR}/${CLIENT_IF_PREFIX} broadcast ${CLIENT_IF_BCAST} dev ${vnCLIENT_IFACE}" 0 "Configuring IPv4 address on CLIENT side of veth" - - # Create isolated stub network available only from SERVER network - vnRunServer "ip link add VNS_STUB type veth peer name VNS_STUB_PEER" - vnRunServer "ip link set VNS_STUB netns ${vnSERVER_NAMESPACE}" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip addr add ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX} dev VNS_STUB" - vnRunServer "ip netns exec ${vnSERVER_NAMESPACE} ip link set VNS_STUB up" - vnRunServer "ip link set VNS_STUB_PEER up" - - - # Create isolated stub network available only from CLIENT network - vnRunClient "ip link add VNC_STUB type veth peer name VNC_STUB_PEER" - vnRunClient "ip link set VNC_STUB netns ${vnCLIENT_NAMESPACE}" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip addr add ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX} dev VNC_STUB" - vnRunClient "ip netns exec ${vnCLIENT_NAMESPACE} ip link set VNC_STUB up" - vnRunClient "ip link set VNC_STUB_PEER up" - - rlRun "ip a" - vnRunClient "ip a" - vnRunServer "ip a" - - 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 "mkdir /etc/frr/{vns,vnc}" - - rm -rf /etc/frr/frr.conf - #vtysh.conf and frr.conf are in /etc/frr/vns for the server namespace - rlRun "cp -f $TestDir/vtysh-vns.conf ${SERVER_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the SERVER" - rlRun "cp -f $TestDir/frr-vns.conf ${SERVER_CONF_DIR}frr.conf" 0 "Copying frr configuration for the SERVER" - - #vtysh.conf and frr.conf are in /etc/frr/vnc for the client namespace - rlRun "cp -f $TestDir/vtysh-vnc.conf ${CLIENT_CONF_DIR}vtysh.conf" 0 "Copying vtysh configuration for the CLIENT" - rlRun "cp -f $TestDir/frr-vnc.conf ${CLIENT_CONF_DIR}frr.conf" 0 "Copying frr configuration for the CLIENT" - - #I need separate daemons files as well for watchfrr options - rlRun "cp -f $TestDir/daemons-vns ${SERVER_CONF_DIR}daemons" 0 "Copying daemons file for the SERVER" - rlRun "cp -f $TestDir/daemons-vnc ${CLIENT_CONF_DIR}daemons" 0 "Copying daemons file for the CLIENT" - - rlRun "ls -lR /etc/frr/*" - rlRun "cp -f $TestDir/frr-vn{s,c}.service /etc/systemd/system/" 0 "Copying custom unit files to run frr in network namespaces" - - # /etc/frr/vns/frr.conf - rlRun "sed -i 's||${SERVER_FRR_LOG}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_STUB_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${SERVER_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${SERVER_CONF_DIR}frr.conf" - - rlRun "cat ${SERVER_CONF_DIR}frr.conf" - - # /etc/frr/vnc/frr.conf - rlRun "sed -i 's||${CLIENT_FRR_LOG}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${CLIENT_STUB_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_ADDR}|g' ${CLIENT_CONF_DIR}frr.conf" - rlRun "sed -i 's||${SERVER_CLIENT_IF_PREFIX}|g' ${CLIENT_CONF_DIR}frr.conf" - - rlRun "cat ${CLIENT_CONF_DIR}frr.conf" - - rlRun "systemctl daemon-reload" - rlPhaseEnd - - rlPhaseStartTest - vnRunServer "ping -c 1 ${SERVER_STUB_IF_ADDR}" 0 "Server should be capable to ping its stub" - vnRunServer "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 2 "Server should NOT be capable to ping client's stub before FRR with RIP is run" - - vnRunClient "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 0 "Client should be capable to ping its stub" - vnRunClient "ping -c 1 ${SERVER_STUB_IF_ADDR}" 2 "Client should NOT be capable to ping server's stub before FRR with RIP is run" - - rlRun "systemctl start frr-vns.service" 0 "Starting FRR on SERVER side" - rlRun "systemctl start frr-vnc.service" 0 "Starting FRR on CLIENT side" - - #vtysh also needs to run for a specific namespace - rlRun "vtysh -N vns -c 'sh run'" - rlRun "vtysh -N vnc -c 'sh run'" - - - vnRunServer "ping -c 1 ${CLIENT_IF_ADDR}" 0 "Testing that server can ping client IP" - vnRunClient "ping -c 1 ${SERVER_IF_ADDR}" 0 "Testing that client can ping server IP" - - rlRun "sleep 30" 0 "Waiting for peers to exchange routes and converge" - - # check server - rlRun "vtysh -N vns -c 'show ip rip status' | grep \"${CLIENT_IF_ADDR}\"" 0 Check if client is set as gateway for server - rlRun "vtysh -N vns -c 'show ip rip' | grep \"C(i) ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if server's stub is connected to rip" - rlRun "vtysh -N vns -c 'show ip rip' | grep \"${SERVER_CLIENT_IF_ADDR}\"" 0 "Check if server-client network connected to rip" - rlRun "vtysh -N vns -c 'show ip rip' | grep \"R(n) ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if RIP connected client's stub" - rlRun "vtysh -N vns -c 'show ip route' | grep \"R>\* ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if RIP connected client's stub" - - # check client - rlRun "vtysh -N vnc -c 'show ip rip status' | grep \"${SERVER_IF_ADDR}\"" 0 Check if server is set as gateway for client - rlRun "vtysh -N vnc -c 'show ip rip' | grep \"C(i) ${CLIENT_STUB_IF_ADDR}/${CLIENT_STUB_IF_PREFIX}\"" 0 "Check if client's stub connected to rip" - rlRun "vtysh -N vnc -c 'show ip rip' | grep \"${SERVER_CLIENT_IF_ADDR}\"" 0 "Check if server-client network connected to rip" - rlRun "vtysh -N vnc -c 'show ip rip' | grep \"R(n) ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if RIP connected server's stub" - rlRun "vtysh -N vnc -c 'show ip route' | grep \"R>\* ${SERVER_STUB_IF_ADDR}/${SERVER_STUB_IF_PREFIX}\"" 0 "Check if RIP connected server's stub" - - vnRunServer "ping -c 1 ${CLIENT_STUB_IF_ADDR}" 0 "Server should be capable to ping client's stub since FRR with RIP is run" - vnRunClient "ping -c 1 ${SERVER_STUB_IF_ADDR}" 0 "Client should be capable to ping server's stub since FRR with RIP is run" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "systemctl stop frr-vns.service frr-vnc.service" 0 "Stopping FRR" - - vnRemoveServerClientNetwork - - rlFileRestore - rlRun "systemctl daemon-reload" - - # restoring SELinux - rlRun "setenforce 1" 0 "re-Enabling SELinux" - rlRun "AVC_ERROR=${ORIG_AVC_ERROR}" - - # This should prevent propagating AVCs to the tests, that are following - rlRun "fixfiles restore" - rlRun "restorecon -R -v /" - - rlRun "popd" - rlRun "rm -r $tmp" 0 "Remove tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/basic-rip/vtysh-vnc.conf b/Sanity/basic-rip/vtysh-vnc.conf deleted file mode 100644 index f863f56..0000000 --- a/Sanity/basic-rip/vtysh-vnc.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/basic-rip/vtysh-vns.conf b/Sanity/basic-rip/vtysh-vns.conf deleted file mode 100644 index f863f56..0000000 --- a/Sanity/basic-rip/vtysh-vns.conf +++ /dev/null @@ -1 +0,0 @@ -service integrated-vtysh-config \ No newline at end of file diff --git a/Sanity/initscript/daemons b/Sanity/initscript/daemons deleted file mode 100644 index a96e944..0000000 --- a/Sanity/initscript/daemons +++ /dev/null @@ -1,80 +0,0 @@ -# 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 and zebra daemons are always started. -# -bgpd=yes -ospfd=yes -ospf6d=yes -ripd=yes -ripngd=yes -isisd=no -pimd=no -ldpd=no -nhrpd=no -eigrpd=no -babeld=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" -ldpd_options=" -A 127.0.0.1" -nhrpd_options=" -A 127.0.0.1" -eigrpd_options=" -A 127.0.0.1" -babeld_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="" - -# 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. diff --git a/Sanity/initscript/main.fmf b/Sanity/initscript/main.fmf deleted file mode 100644 index efab955..0000000 --- a/Sanity/initscript/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: Basic initscript test for frr -description: '' -author: Daniel Rusek -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 5m -enabled: true -tag: - - Tier1 -tier: '1' -link: - - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1776342 -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0600616 -extra-summary: /CoreOS/frr/Sanity/initscript -extra-task: /CoreOS/frr/Sanity/initscript -id: d51035a1-5124-4f35-b06d-2dd800cdb452 diff --git a/Sanity/initscript/runtest.sh b/Sanity/initscript/runtest.sh deleted file mode 100755 index 0644001..0000000 --- a/Sanity/initscript/runtest.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Sanity/initscript -# Description: Basic initscript test for frr -# Author: Daniel Rusek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include rhts environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" -CONF_EXISTS=0 -SAMPLE_EXISTS=0 - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "useradd testuserqa" 0 "Add test user" - 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" - rlPhaseEnd - - rlPhaseStartSetup "Prepare" - rlServiceStop frr - - rlRun "systemctl start frr" 0 "Starting frr without config" - if rlIsRHEL '<8.4'; then - rlRun "systemctl --no-pager status frr" 3 - else - rlRun "systemctl --no-pager status frr" 0 - fi - rlRun "systemctl stop frr" 0 - - for SERVICE in bgpd ospf6d ospfd ripd ripngd zebra; do - CONF="/etc/frr/$SERVICE.conf" - SAMPLE="/usr/share/doc/frr/$SERVICE.conf.sample" - - if [ -e $CONF ]; then - rlRun "rm $CONF" - fi - - if [ -e $SAMPLE ]; then - rlRun "cp $SAMPLE $CONF" 0 - fi - rlRun "cp daemons /etc/frr/" 0 - done - rlPhaseEnd - - rlPhaseStartTest "Mandatory actions" - rlLog ">>>>>>>>> service start" - rlRun "systemctl start frr" 0 "Service must start without problem" - rlRun "systemctl --no-pager status frr" 0 "Then Status command" - rlRun "systemctl start frr" 0 "Already started service" - rlRun "systemctl --no-pager status frr" 0 "Again status command" - - rlLog ">>>>>>>>> service restart" - rlRun "systemctl restart frr" 0 "Restarting of service" - rlRun "systemctl --no-pager status frr" 0 "Status command" - - rlLog ">>>>>>>>> service stop" - rlRun "systemctl stop frr" 0 "Stopping service" - rlRun "systemctl --no-pager status frr" 3 "Status of stopped service" - rlRun "systemctl stop frr" 0 "Stopping service again" - rlRun "systemctl --no-pager status frr" 3 "Status of stopped service" - - rlLog ">>>>>>>>> insufficient rights" - # Return values differs because some systemd things and polkit (not)installed. - # The main idea of test is, that the return values should not be zero, so 1 or 4 occuring is fine. - rlRun "systemctl start frr " 0 " Starting service for restarting under nonpriv user " - rlRun "su testuserqa -c 'systemctl restart frr'" 1,4 "Insufficient rights, restarting service under nonprivileged user must fail" - rlRun "systemctl stop frr " 0 - - rlLog ">>>>>>>>> operations" - rlRun "systemctl condrestart frr" 0 " Service have to implement condrestart function " - rlRun "systemctl try-restart frr" 0 " Service have to implement condrestart function " - rlRun "systemctl force-reload frr" 0 " Service have to implement force-reload function " - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore frr - rlRun "rlFileRestore" 0 "Restoring original config files" - rlRun "userdel -fr testuserqa" 0 "Remove test user" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/starting-daemons-test/daemons b/Sanity/starting-daemons-test/daemons deleted file mode 100644 index 04b0343..0000000 --- a/Sanity/starting-daemons-test/daemons +++ /dev/null @@ -1,83 +0,0 @@ -# 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=yes -ospf6d=yes -ripd=yes -ripngd=yes -isisd=yes -pimd=yes -nhrpd=yes -eigrpd=yes -sharpd=yes -pbrd=yes -bfdd=yes -fabricd=yes -vrrpd=yes -pathd=yes - -# -# 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" -pathd_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//daemons, and you need to -# start FRR with "/usr/lib/frr/frrinit.sh start ". - -# 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. diff --git a/Sanity/starting-daemons-test/main.fmf b/Sanity/starting-daemons-test/main.fmf deleted file mode 100644 index 7fba99d..0000000 --- a/Sanity/starting-daemons-test/main.fmf +++ /dev/null @@ -1,25 +0,0 @@ -summary: The test enables frr daemons and checks, if they are run. -description: '' -author: Frantisek Hrdina -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 15m -enabled: true -tag: - - Tier1 -tier: '1' -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0611431 -extra-summary: /CoreOS/frr/Sanity/starting-daemons-test -extra-task: /CoreOS/frr/Sanity/starting-daemons-test -id: ebee256b-5193-49ad-9789-cd61552e18ab diff --git a/Sanity/starting-daemons-test/runtest.sh b/Sanity/starting-daemons-test/runtest.sh deleted file mode 100755 index fe6ae11..0000000 --- a/Sanity/starting-daemons-test/runtest.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/frr/Sanity/starting-daemons-test -# Description: The test enables frr daemons and checks, if they are run. -# Author: František Hrdina -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" -SERVICE_LOG="frr.log" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - if rlIsRHEL '<8.4'; then - # zebra is not started by default until RHEL-8.4 - # staticd is not started by default until RHEL-8.4 - # vrrpd is not present until RHEL-8.4 - # sharpd is not present until RHEL-8.4 - sed -i 's/sharpd=yes/zebra=yes/' daemons - sed -i 's/vrrpd=yes/staticd=yes/' daemons - rlRun "cp daemons /etc/frr/daemons" 0 "Placing frr daemons file" - else #later RHEL and Fedora - #let's not copy pre-prepared daemons file - #but rather enable all daemons here - sed -i 's/=no/=yes/gi' /etc/frr/daemons - fi - rlPhaseEnd - - rlPhaseStartTest - #take all daemons in the daemons file except for sharpd - daemons="zebra" - for daemon_name in `grep 'd=yes' /etc/frr/daemons | grep -v sharpd | cut -d '=' -f 1`; do daemons="$daemons $daemon_name"; done - rlRun "service frr start" 0 "Starting frr service" - sleep 10 - rlRun "service frr status &> $SERVICE_LOG" 0 "Creating service log" - - # No watchfrr by default until RHEL-8.4 - if rlIsRHEL '>8.4' || rlIsFedora || rlIsCentOS; then - rlRun "grep -i 'frr/watchfrr -d -F traditional.*zebra' $SERVICE_LOG" 0 "Checking if watchfrr is running" - fi - - for i in $daemons; do - rlRun "grep -i \"frr/$i -d.*-A\" $SERVICE_LOG" 0 "Checking if $i daemon started" - done; - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm -f $SERVICE_LOG" 0 "Removing service log $SERVICE_LOG" - rlRun "service frr stop" 0 "Stopping frr service" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/Sanity/vtysh/extcommunity-list/bgpd.conf b/Sanity/vtysh/extcommunity-list/bgpd.conf deleted file mode 100644 index 36f7bb6..0000000 --- a/Sanity/vtysh/extcommunity-list/bgpd.conf +++ /dev/null @@ -1,33 +0,0 @@ -hostname BGP_Seed -password test -! -router bgp 65000 - bgp router-id 127.0.0.1 - network 10.0.0.0/24 - neighbor 127.0.0.1 remote-as 65001 - neighbor 127.0.0.1 route-map RMAPpsklenar in - neighbor 127.0.0.1 route-map RMAPpsklenar out -! -! ACCEPT ECOMMUNITY -bgp extcommunity-list standard psklenar permit rt 65001:80 -! -route-map RMAPbrno permit 20 - match extcommunity psklenar - set local-preference 80 -! -log file /var/log/frr/bgpd.log debugging -! -!route-map SetAttr permit 10 -! set community 65000:1 additive -! set extcommunity rt 65000:1 -! set aggregator as 65002 1.2.3.4 -! set as-path prepend 1 2 3 4 -! set atomic-aggregate -! set metric 20 -! set originator-id 1.2.3.4 -! -line vty - no login -! -access-list CONF permit 10.0.0.0/24 -!end diff --git a/Sanity/vtysh/extcommunity-list/daemons b/Sanity/vtysh/extcommunity-list/daemons deleted file mode 100644 index fd1deae..0000000 --- a/Sanity/vtysh/extcommunity-list/daemons +++ /dev/null @@ -1,80 +0,0 @@ -# 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 and zebra daemons are always started. -# -bgpd=yes -ospfd=no -ospf6d=no -ripd=no -ripngd=no -isisd=no -pimd=no -ldpd=no -nhrpd=no -eigrpd=no -babeld=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" -ldpd_options=" -A 127.0.0.1" -nhrpd_options=" -A 127.0.0.1" -eigrpd_options=" -A 127.0.0.1" -babeld_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="" - -# 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. diff --git a/Sanity/vtysh/extcommunity-list/main.fmf b/Sanity/vtysh/extcommunity-list/main.fmf deleted file mode 100644 index b36db1a..0000000 --- a/Sanity/vtysh/extcommunity-list/main.fmf +++ /dev/null @@ -1,25 +0,0 @@ -summary: It sets extcommunity and then list it -description: '' -author: Daniel Rusek -component: - - frr -test: ./runtest.sh -framework: beakerlib -recommend: - - frr -duration: 25m -enabled: true -tag: - - Tier1 -tier: '1' -adjust: - - enabled: false - when: distro < rhel-8 - continue: false - - environment+: - AVC_ERROR: +no_avc_check - when: distro ~< rhel-8.7 -extra-nitrate: TC#0600617 -extra-summary: /CoreOS/frr/Sanity/vtysh/extcommunity-list -extra-task: /CoreOS/frr/Sanity/vtysh/extcommunity-list -id: 5a022745-ed90-4415-8a07-6317c3c169e2 diff --git a/Sanity/vtysh/extcommunity-list/runtest.sh b/Sanity/vtysh/extcommunity-list/runtest.sh deleted file mode 100755 index 21769c7..0000000 --- a/Sanity/vtysh/extcommunity-list/runtest.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/frr/Sanity/vtysh/extcommunity-list -# Description: It sets extcommunity and then list it -# Author: Daniel Rusek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -# Include rhts environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="frr" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "rlFileBackup --clean /etc/frr/" - rlRun "rlFileBackup --clean /etc/systemd/system/" - rlRun "rlFileBackup --clean /var/log/frr/" - rlRun "rlFileBackup --clean /var/run/frr" - rlRun "rlFileBackup --clean /run/frr" - rlRun "rlFileBackup --clean /root/.history_frr" - touch /etc/frr/bgpd.conf - touch /etc/frr/vtysh.conf - - rlRun "/bin/cp -f daemons /etc/frr/daemons" - - if rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9'; then - rlRun "/bin/cp -f bgpd.conf /etc/frr/frr.conf" 0 - else - rlRun "/bin/cp -f bgpd.conf /etc/frr/bgpd.conf" 0 - fi - rlPhaseEnd - - rlPhaseStartTest "restart bgpd with changed configuration file" - rlServiceStop "frr" - sleep 2 - rlServiceStart "frr" - rlPhaseEnd - - rlPhaseStartTest "test the vtysh" - rlRun "vtysh -c 'show run'" - rlRun "vtysh -c 'show bgp extcommunity-list' | grep 'psklenar'" 0 "Checking if extcommunity is set" - if rlIsRHEL '<8.4'; then - rlRun "vtysh -c 'show bgp extcommunity-list psklenar' | grep '65001:80'" 0 "Checking details of testing extcommunity" - else - rlRun "vtysh -c 'show bgp extcommunity-list psklenar detail' | grep '65001:80'" 0 "Checking details of testing extcommunity" - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlServiceRestore "frr" - rlRun "rlFileRestore" 0 "Restoring original config files" - rlPhaseEnd - -rlJournalPrintText -rlJournalEnd diff --git a/main.fmf b/main.fmf deleted file mode 100644 index 3da3438..0000000 --- a/main.fmf +++ /dev/null @@ -1,5 +0,0 @@ -# QE owner -contact: Frantisek Hrdina -component: frr -check: - - how: avc \ No newline at end of file diff --git a/plans/all.fmf b/plans/all.fmf deleted file mode 100644 index e1a0780..0000000 --- a/plans/all.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: Run all tests -discover: - how: fmf -execute: - how: tmt diff --git a/plans/others.fmf b/plans/others.fmf deleted file mode 100644 index d286b8f..0000000 --- a/plans/others.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' - url: "https://src.fedoraproject.org/tests/frr.git" - execute: - how: tmt - -/internal: - summary: Internal other tests - discover: - how: fmf - filter: 'tier: -1 & tier: -2 & tier: -3 & tag: -multihost' - url: https://gitlab.com/redhat/rhel/tests/frr - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt \ No newline at end of file diff --git a/plans/selinux.fmf b/plans/selinux.fmf deleted file mode 100644 index a656200..0000000 --- a/plans/selinux.fmf +++ /dev/null @@ -1,23 +0,0 @@ -/frr-selinux: - summary: FRR selinux test - discover: - how: fmf - filter: '/Sanity/Selinux-sanity-test' - url: https://gitlab.com/redhat/rhel/tests/frr - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt - -/selinux-policy: - summary: FRR selinux-policy test - discover: - how: fmf - filter: '/Regression/frr-and-similar' - url: https://gitlab.com/redhat/rhel/tests/frr - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier1.fmf b/plans/tier1.fmf deleted file mode 100644 index 3a32ba9..0000000 --- a/plans/tier1.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: "https://src.fedoraproject.org/tests/frr.git" - execute: - how: tmt - -/internal: - summary: Internal Tier1 tests - discover: - how: fmf - filter: 'tier: 1' - url: https://gitlab.com/redhat/rhel/tests/frr - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt diff --git a/plans/tier2-tier3.fmf b/plans/tier2-tier3.fmf deleted file mode 100644 index 419521c..0000000 --- a/plans/tier2-tier3.fmf +++ /dev/null @@ -1,20 +0,0 @@ -/public: - summary: Public Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: "https://src.fedoraproject.org/tests/frr.git" - execute: - how: tmt - -/internal: - summary: Internal Tier2 and Tier3 tests - discover: - how: fmf - filter: 'tier: 2 | tier: 3' - url: https://gitlab.com/redhat/rhel/tests/frr - adjust: - enabled: false - when: distro == centos-stream or distro == fedora - execute: - how: tmt