-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netns Support / framework for supporting vrf with netns backend #1633
Conversation
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedUbuntu1604 amd64 build: FailedConfigure failed for Ubuntu1604 amd64 build:
Ubuntu1604 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI014BUILD/config.log/config.log Ubuntu1404 amd64 build: FailedConfigure failed for Ubuntu1404 amd64 build:
Ubuntu1404 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI001BUILD/config.log/config.log FreeBSD11 amd64 build: FailedMake failed for FreeBSD11 amd64 build:
FreeBSD11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI009BUILD/config.status/config.status Debian8 amd64 build: FailedDebian8 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI008BLD/config.log/config.log
CentOS6 amd64 build: FailedConfigure failed for CentOS6 amd64 build:
CentOS6 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI006BUILD/config.log/config.log NetBSD6 amd64 build: FailedMake failed for NetBSD6 amd64 build:
NetBSD6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI007BUILD/config.status/config.status FreeBSD9 amd64 build: FailedMake failed for FreeBSD9 amd64 build:
FreeBSD9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI004BUILD/config.status/config.status OmniOS amd64 build: FailedMake failed for OmniOS amd64 build:
OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI010BUILD/config.status/config.status CentOS7 amd64 build: FailedConfigure failed for CentOS7 amd64 build:
CentOS7 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI005BUILD/config.log/config.log Debian9 amd64 build: FailedConfigure failed for Debian9 amd64 build:
Debian9 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI021BUILD/config.log/config.log OpenBSD60 amd64 build: FailedMake failed for OpenBSD60 amd64 build:
OpenBSD60 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI011BUILD/config.status/config.status Ubuntu1204 amd64 build: FailedConfigure failed for Ubuntu1204 amd64 build:
Ubuntu1204 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI002BUILD/config.log/config.log FreeBSD10 amd64 build: FailedMake failed for FreeBSD10 amd64 build:
FreeBSD10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI003BUILD/config.status/config.status NetBSD7 amd64 build: FailedMake failed for NetBSD7 amd64 build:
NetBSD7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI012BUILD/config.status/config.status Fedora24 amd64 build: FailedConfigure failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2310/artifact/CI015BUILD/config.log/config.log |
🛑 Basic BGPD CI results: FAILUREResults table
For details, please contact louberger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursory review for style
lib/zebra.h
Outdated
@@ -486,7 +486,7 @@ typedef u_int16_t zebra_size_t; | |||
typedef u_int16_t zebra_command_t; | |||
|
|||
/* VRF ID type. */ | |||
typedef u_int16_t vrf_id_t; | |||
typedef u_int32_t vrf_id_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use uint32_t
, if the compiler doesn't complain at you for doing so ;)
zebra/main.c
Outdated
vrf_with_netns = 1; | ||
#else | ||
zlog_err( | ||
"Netns backend requested with vrf, whereas Netlink not available. Aborting"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can move the log message onto the same line as the fn call
zebra/zebra_ns.c
Outdated
struct zebra_ns *zns = ns->info; | ||
|
||
if (IS_ZEBRA_DEBUG_EVENT) | ||
zlog_info ("ZNS %s with id %u (enabled)", ns->name, ns->ns_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no space after fn names
zebra/zebra_ns.c
Outdated
zlog_info("ZNS %s with id %u (disabled)", ns->name, ns->ns_id); | ||
if (!zns) | ||
return 0; | ||
return zebra_ns_disable (ns->ns_id, (void **)&zns); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no space after fn names
zebra/zebra_ns_notify.c
Outdated
* | ||
* Copyright (C) 2017 by 6WIND | ||
* | ||
* This file is part of FreeRangeRouting (FRR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong copyright header, please use the one listed in COMMUNITY.md
(i.e. do not include FRR
or This file is part of...
)
zebra/zebra_ns_notify.h
Outdated
* | ||
* Copyright (C) 2017 by 6WIND | ||
* | ||
* This file is part of FreeRangeRouting (FRR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect copyright header as before
lib/ns.c
Outdated
{ | ||
if (have_netns()) { | ||
/* Install NS commands. */ | ||
install_element (VRF_NODE, &ns_netns_cmd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not be installed unless we have turned on namespaces as vrfs
lib/ns.c
Outdated
@@ -413,12 +433,21 @@ void ns_init(void) | |||
|
|||
if (have_netns()) { | |||
/* Install NS commands. */ | |||
install_node(&ns_node, ns_config_write); | |||
install_element(CONFIG_NODE, &ns_netns_cmd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not be installed for use unless user specifies namespace as vrfs
🛑 Basic BGPD CI results: FAILUREResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedOmniOS amd64 build: Successful Debian9 amd64 build: FailedConfigure failed for Debian9 amd64 build:
Debian9 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI021BUILD/config.log/config.log Ubuntu1604 amd64 build: FailedPackage building failed for Ubuntu1604 amd64 build:
Ubuntu1604 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI014BUILD/config.status/config.status CentOS6 amd64 build: FailedConfigure failed for CentOS6 amd64 build:
CentOS6 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI006BUILD/config.log/config.log Ubuntu1204 amd64 build: FailedConfigure failed for Ubuntu1204 amd64 build:
Ubuntu1204 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI002BUILD/config.log/config.log Debian8 amd64 build: FailedPackage building failed for Debian8 amd64 build:
Debian8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI008BLD/config.status/config.status Fedora24 amd64 build: FailedConfigure failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI015BUILD/config.log/config.log CentOS7 amd64 build: FailedConfigure failed for CentOS7 amd64 build:
CentOS7 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2315/artifact/CI005BUILD/config.log/config.log |
Hi @qlyoung , I made the changes requested. Hi @donaldsharp , I also made some changes accordingly. |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedDebian9 amd64 build: Successful CentOS6 amd64 build: FailedConfigure failed for CentOS6 amd64 build:
CentOS6 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2316/artifact/CI006BUILD/config.log/config.log Ubuntu1604 amd64 build: FailedConfigure failed for Ubuntu1604 amd64 build:
Ubuntu1604 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2316/artifact/CI014BUILD/config.log/config.log Ubuntu1204 amd64 build: FailedConfigure failed for Ubuntu1204 amd64 build:
Ubuntu1204 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2316/artifact/CI002BUILD/config.log/config.log Fedora24 amd64 build: FailedConfigure failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2316/artifact/CI015BUILD/config.log/config.log |
da1fc96
to
f6cd156
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedFreeBSD9 amd64 build: Successful CentOS6 amd64 build: FailedConfigure failed for CentOS6 amd64 build:
CentOS6 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2319/artifact/CI006BUILD/config.log/config.log Debian9 amd64 build: FailedConfigure failed for Debian9 amd64 build:
Debian9 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2319/artifact/CI021BUILD/config.log/config.log Debian8 amd64 build: FailedDebian8 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2319/artifact/CI008BLD/config.log/config.log
Ubuntu1404 amd64 build: FailedConfigure failed for Ubuntu1404 amd64 build:
Ubuntu1404 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2319/artifact/CI001BUILD/config.log/config.log Fedora24 amd64 build: FailedConfigure failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2319/artifact/CI015BUILD/config.log/config.log |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedCentOS6 amd64 build: Successful Ubuntu1604 amd64 build: FailedPackage building failed for Ubuntu1604 amd64 build:
Ubuntu1604 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2320/artifact/CI014BUILD/config.status/config.status |
🚧 Basic BGPD CI results: Partial FAILURE, 650 tests failed, has VALGRIND issuesResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedIPv4 ldp protocol on Ubuntu 16.04: Successful CentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> IPv4 protocols on Ubuntu 14.04: FailedFedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2320/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64 IPv6 protocols on Ubuntu 14.04: FailedTopology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2320/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
New warnings:
Static Analysis warning summary compared to base:
22 Static Analyzer issues remaining.See details at |
9c96862
to
573774c
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedUbuntu1204 amd64 build: Successful Fedora24 amd64 build: FailedMake failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2324/artifact/CI015BUILD/config.status/config.status |
573774c
to
7d652d0
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedUbuntu 16.04 deb pkg check: Successful IPv6 protocols on Ubuntu 14.04: FailedCentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> Fedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2325/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2325/artifact/TOPOU1604/ErrorLog/log_topotests.txt Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2325/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base21 Static Analyzer issues remaining.See details at |
default VRF value changes from 0 to 65535. To keep consistency, the following will be tried:
|
7d652d0
to
1ed4e57
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedUbuntu1604 amd64 build: Successful Fedora24 amd64 build: FailedMake failed for Fedora24 amd64 build:
Fedora24 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2326/artifact/CI015BUILD/config.status/config.status |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedFedora24 amd64 build: Successful CentOS6 amd64 build: FailedMake failed for CentOS6 amd64 build |
687233c
to
c168952
Compare
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedStatic analyzer (clang): Successful Ubuntu 12.04 deb pkg check: FailedUbuntu 12.04 deb pkg check: Unknown Log <log_package_start.txt> IPv6 protocols on Ubuntu 14.04: FailedCentOS 6 rpm pkg check: FailedCentOS 6 rpm pkg check: Unknown Log <log_package_start.txt> Ubuntu 14.04 deb pkg check: FailedUbuntu 14.04 deb pkg check: Unknown Log <log_package_start.txt> IPv4 protocols on Ubuntu 14.04: FailedFedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2328/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2328/artifact/TOPOU1604/ErrorLog/log_topotests.txt CentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2328/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base21 Static Analyzer issues remaining.See details at |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedStatic analyzer (clang): Successful Ubuntu 12.04 deb pkg check: FailedUbuntu 12.04 deb pkg check: Unknown Log <log_package_start.txt> IPv6 protocols on Ubuntu 14.04: FailedCentOS 6 rpm pkg check: FailedCentOS 6 rpm pkg check: Unknown Log <log_package_start.txt> Ubuntu 14.04 deb pkg check: FailedUbuntu 14.04 deb pkg check: Unknown Log <log_package_start.txt> Fedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2330/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2330/artifact/TOPOU1604/ErrorLog/log_topotests.txt IPv4 protocols on Ubuntu 14.04: FailedCentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2330/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
21 Static Analyzer issues remaining.See details at |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedStatic analyzer (clang): Successful Ubuntu 12.04 deb pkg check: FailedUbuntu 12.04 deb pkg check: Unknown Log <log_package_start.txt> IPv6 protocols on Ubuntu 14.04: FailedCentOS 6 rpm pkg check: FailedCentOS 6 rpm pkg check: Unknown Log <log_package_start.txt> Ubuntu 14.04 deb pkg check: FailedUbuntu 14.04 deb pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2329/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2329/artifact/TOPOU1604/ErrorLog/log_topotests.txt Fedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> CentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2329/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base21 Static Analyzer issues remaining.See details at |
lib/ns.c
Outdated
rt->rtgen_family = AF_UNSPEC; | ||
|
||
mnl_attr_put_u32(nlh, NETNSA_FD, fd); | ||
mnl_attr_put_u32(nlh, NETNSA_NSID, ns_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NETNSA_NSID
was only introduced in the kernel by 2015. Will this VRF netns backend work on older kernel that don't have this capability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a fallback mecahnism is put in place, so that NSID will be locally generated, and so that the VRFID will be local to frr.
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedStatic analyzer (clang): Successful Ubuntu 12.04 deb pkg check: FailedUbuntu 12.04 deb pkg check: Unknown Log <log_package_start.txt> CentOS 6 rpm pkg check: FailedCentOS 6 rpm pkg check: Unknown Log <log_package_start.txt> IPv6 protocols on Ubuntu 14.04: FailedFedora 24 rpm pkg check: FailedFedora 24 rpm pkg check: Unknown Log <log_package_start.txt> Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2331/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2331/artifact/TOPOU1604/ErrorLog/log_topotests.txt IPv4 protocols on Ubuntu 14.04: FailedUbuntu 14.04 deb pkg check: FailedUbuntu 14.04 deb pkg check: Unknown Log <log_package_start.txt> CentOS 7 rpm pkg check: FailedCentOS 7 rpm pkg check: Unknown Log <log_package_start.txt> Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2331/artifact/TOPOU1604/MemoryLeaks/CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base21 Static Analyzer issues remaining.See details at |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2425/ This is a comment from an EXPERIMENTAL automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base21 Static Analyzer issues remaining.See details at |
The netns backend is chosen by VRF if a runtime flag named vrfwnetns is selected when running zebra. In the case the NETNS backend is chosen, in some case the VRFID value is being assigned the value of the NSID. Within the perimeter of that work, this is why the vrf_lookup_by_table function is extended with a new parameter. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
a vty command is added: in addition to this command ( kept for future usage): - [no] logical-router-id <ID> netns <NETNSNAME> a new command is being placed under vrf subnode - vrf <NAME> [no] netns <NETNSNAME> exit This command permits to map a VRF with a Netnamespace. The commit only handles the relationship between vrf and ns structures. It adds 2 attributes to vrf structure: - one defines the kind of vrf ( mapped under netns or vrf from kernel) - the other is the opaque pointer to ns The show running-config is handled by zebra daemon. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Using the vrf backend kind, the vty command that configured netns under vty will not be installed if the vrf backend is vrf lite Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Upon following calls: interface poll, address poll, route poll, and ICMPv6 handling, each new Namespace is being parsed. For that, the socket operations need to switch from one NS to one other, to get the necessary information. As of now, there is a crash when dumping interfaces, through show running-config. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
For each route to be added or deleted, instead of applying directly to default namespaces, when a vrf is mapped to a namespace, then the correct zns must be found out. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
All ipv6 operations stick to namespace. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Using c-lang scan-build tool, fix a dereference of a null pointer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is also a fix that avoids a VRF to be attached to the wrong namespace context, at creation time. Because the VRF, at creation time does not know yet the namespace where it will get its information. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3ced9d0
to
92f3afb
Compare
In addition to have the possibility to create from vty vrf based on a netns backend, the API will be made accessible from external, especially for zebra that will handle the netns discovery part. This commit is externalising following functions: - netns_pathname - ns_handler_create - vrf_handler_create Also, the VRF initialisation case when under NETNS backend is changed, since the NS identifier may not be known at the configuration time,but may be known later, under discovery process. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
If vrf backend is netns, then the zebra will create its own zebra_ns context for each new netns discovered. As consequence, a routing table, and other contexts will be created for each new namespace discovered. When it is enabled, a populate process will be done, consisting in learning new interfaces and routes, and addresses from other NETNS. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The zebra netnamespace contexts are initialised, based on the callback coming from the NS. Reversely, the list of ns is parsed to disable the ns contexts. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Show vrf command displays information on the vrf, if it is related to vrf kernel or if it is related to netns. When a vrf from kernel is detected, before creating a new vrf, a check is done against an already present vrf, and if that vrf is not a vrf mapped with a netns. If that is that case, then the creation is rejected. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The addition of the name of the netns in the vrf message introduces also a limitation when the size of the netns is bigger than 15 bytes. Then the netns are ignored by the library. In addition to this, some sanity checks have been introduced. some functions to create the netns from a call not coming from the vty is being added with traces. Also, the ns vty function is reentrant, if the context is already created. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Two apis are provided so that the switch from one netns to an other one is taken care. Also an other API to know if the VRF has a NETNS backend or a VRF Lite backend. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
A NS identifier is collected by netlink. This identifier is a 32 bit identifier that is either generated by the kernel (if not set) or manually set by a set netlink command. The commit here is getting the NSID from the newly created NS. If the linux option to create or get a new NSID from the kernel does not exist, then the NSID is locally genrated. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
upon zebra initialisation, and upon further netnamespace creation, the the netnamespaces are created and a vrf associated to the netnamespace is created. By convention, the name of the netns will be the same as the VRF. Add a stub routine that returns a fake ns identifier, in case netlink ( linux machines) is not available. Also, upon each newly discovered NETNS, a NSID id being generated, either by relying on kernel NSID feature, or by generating locally the NSID ( see previous commit for more information). Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
when the netns backend is selected for VRF, the default VRF is being assigned a NSID. This avoids the need to handle the case where if the incoming NSID was 0 for a non default VRF, then a specific handling had to be done to keep 0 value for default VRF. In most cases, as the first NETNS to get a NSID will be the default VRF, most probably the default VRF will be assigned to 0, while the other ones will have their value incremented. On some cases, where the NSID is already assigned for NETNS, including default VRF, then the default VRF value will be the one derived from the NSID of default VRF, thus keeping consistency between VRF IDs and NETNS IDs. Default NS is attempted to be created. Actually, some VMs may have the netns feature, but the NS initialisation fails because that folder is not present. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
this is a static analysis performed by c-lang scan-build tool that demonstrated this issue. This commit is handling the fix. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
For supporting vrf based on namespaces, it is possible that an interface with the same index is present. This is the case for loopback interfaces. For that, for each query, if the interface is not found , matching the vrf identifier, then a new interface is created, when the backens for VRF is NETNS. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
the vrf identifier in the ospf_vrf_enable routine is never read, then does not need to be initialised. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The assert appears in zebra_mpls.c when checking default zebra_vrf. It appears that when the mpls entries are flushed, it gets the default vrf which is already flushed by vrf_terminate() function. In order to avoid that assert to trigger a crash, the mpls flush is called before vrf termination. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The vrf_sockunion_socket() wraps sockunion_socket() with vrf_id as additional parameter. The creation of socket forces the user to transparently move to new NETNS for doing the operation. The vrf_getaddr_info() wraps getaddr_info() with vrf_id as additional parameter. That API relies on the underlying system. Then there may be need to switch to an other netns in that case too. Also, the vrf_socket() implementation is simplified. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
The change contained in this commit does the following: - discovery of vrf id from zebra daemon, and adaptation of bgp contexts with BGP. The list of network addresses contain a reference to the bgp context supporting the vrf. The bgp context contains a vrf pointer that gives information about the netns path in case the vrf is a netns path. Only some contexts are impacted, namely socket creation, and retrieval of local IP settings. ( this requires vrf identifier). Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: FailedOmniOS amd64 build: Successful NetBSD7 amd64 build: FailedDejaGNU Unittests (make check) failed for NetBSD7 amd64 build: (see full PyTest log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2441/artifact/CI012BUILD/ErrorLog/log_pytests.txt)
NetBSD7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2441/artifact/CI012BUILD/config.status/config.status FreeBSD10 amd64 build: FailedDejaGNU Unittests (make check) failed for FreeBSD10 amd64 build FreeBSD9 amd64 build: FailedDejaGNU Unittests (make check) failed for FreeBSD9 amd64 build OpenBSD60 amd64 build: FailedDejaGNU Unittests (make check) failed for OpenBSD60 amd64 build FreeBSD11 amd64 build: FailedDejaGNU Unittests (make check) failed for FreeBSD11 amd64 build NetBSD6 amd64 build: FailedDejaGNU Unittests (make check) failed for NetBSD6 amd64 build |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
closing ( replaced with #1662 ) |
this is the continuation of #1587.