changes for making snmp socket non-blocking#5061
changes for making snmp socket non-blocking#5061sudhanshukumar22 wants to merge 737 commits intoFRRouting:masterfrom sudhanshukumar22:master
Conversation
polychaeta
left a comment
There was a problem hiding this comment.
Thanks for your contribution to FRR!
- One of your commits has an improperly formatted commit message
- One of your commits is missing a
Signed-off-byline; we can't accept your contribution until all of your commits have one - One of your commits does not have a blank line between the summary and body; this will break
git log --oneline
If you are a new contributor to FRR, please see our contributing guidelines.
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopology tests on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-9044/test Topology Tests failed for Topology tests on Ubuntu 18.04 amd64: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9044/artifact/TOPOU1804/ErrorLog/log_topotests.txt Successful on other platforms
Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9044/artifact/TOPOU1804/MemoryLeaks/ Warnings Generated during build:Checkout code: Successful with additional warningsTopology tests on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-9044/test Topology Tests failed for Topology tests on Ubuntu 18.04 amd64: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9044/artifact/TOPOU1804/ErrorLog/log_topotests.txt CLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9046/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsCLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9048/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsCLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 Static Analyzer issues remaining.See details at |
donaldsharp
left a comment
There was a problem hiding this comment.
- Include in the actual commit message the reasoning laid out in the PR. This is a better place to keep this data.
- Fix the formating to be consistent with our code base( and this includes the reverse order if statements )
- merge and rebase to get a later version of frr as base, the ci is showing regressions that should not happen.
💚 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-9063/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsCLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9064/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings |
|
Apart from Donald's points, this patch makes sense to me. Passing a blocking TCP socket to either Ideally this problem should have been fixed on net-snmp library. Since they didn't do that I think it makes sense for us to have this workaround on our side. |
🚧 Basic BGPD CI results: Partial FAILURE, 1 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-9095/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsCLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9096/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsCLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9098/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 Static Analyzer issues remaining.See details at |
Hi Donald, |
💚 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-9131/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
13 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-9140/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base1 Static Analyzer issues remaining.See details at |
|
Hi donald, Thanks,
|
|
@sudhanshukumar22 Thanks for the updates. Your patch looks good to me, but there are still a few problems with this PR:
To fix these problems, I'd suggest you to do the following: $ git reset --hard HEAD~4
$ git cherry-pick da87b6f0dc373795bfae595980ad3d0528beb342
$ git commit --amend # and edit the commit message accordingly |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
This implements BMP. There's no fine-grained history here, the non-BMP preparations are already split out from here so all that remains is BMP proper. Signed-off-by: David Lamparter <equinox@diac24.net>
The vrf_id in `zsend_interface_vrf_update()` is encoded as a long via `stream_putl()`, we should decode it as such as well. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Start the work in sharpd to allow the testing of redistribution of routes. Namely telling zebra to tell us about redistribution events via the callback. Future work here will allow sharpd to specify the redistribution events it wants and to allow us to track that via counters. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Removed code that disabled link local ipv6 address on the interface
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Add route-map option for ipv6 nexthop Fix typo in bgp configuration
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Modified json files to configure route-map which prefer global address
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Don't process dataplane results in zebra during shutdown (after sigint has been seen). The dplane continues to run in order to clean up, but zebra main just drops results. Signed-off-by: Mark Stapp <mjs@voltanet.io>
FRR supports the ability to turn off the negotation of bgp capabilities. Provide a few bread crumbs to the operator that it might not be as useful as they would hope. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
We only have a uint32_t value here but clippy is wise and gives us more data than we need. Tell the compiler we can throw some stuff away. This was found by inspecting CI results. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The bgp pointer may not be actually found. The debug message that was using it could get the same value another way. Convert over Fixes Coverity Scan Issue: Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Frank Villaro-Dixon <frank.villaro@infomaniak.com>
Currently we have unsigned long which is not what we defined in CLI (1-4294967295). Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.
sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
Docs: https://frrouting.readthedocs.io/en/latest/setup.html
Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
Status: "FRR Operational"
Tasks: 12 (limit: 4915)
Memory: 76.5M
CGroup: /system.slice/frr.service
├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
└─32500 /usr/lib/frr/staticd -d -A 127.0.0.1
Please note the `Status: ...` line above.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
inet_pton() is used to parse ipv4 addresses internally, therefore FRR does not support octal notation for quads. The ipv4 cli token validator should make sure that str2prefix() can parse tokens it allows, and str2prefix uses inet_pton, so we have to disallow leading zeros in ipv4 quads. In short, 1.1.1.01 is no longer valid and must be expressed as 1.1.1.1. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Don't bother tracking ipv6 link locals to determine if a map should be installed. Every interface has a route of `fe80::/64` so its just going to return the arbitrarily first one it finds when it resolves it and hands it back to us. Instead, just track the interface we specify along with it. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
There are several places in the pim where we are mixing up zlog_warn w/ zlog_debug and vice versa. If we are protecting a zlog_warn w/ a debug is it really a warn? If we have an actual error situation we should also warn about it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
We should test for `-fsanitize=memory` instead of `-fsanitize=thread` when enabling memory sanitizer. While here, fix the error message. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Use the `--enable-address-sanitizer` option instead of the manual version using environment flags. This also avoids the problem of having to remember to skip clippy with the custom flags: ``` make -C lib CFLAGS="-g -O2" LDFLAGS="-g" clippy ``` The snippet above is not needed with `--enable-address-sanitizer`! Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Some issues with our internal vector type being typedef'd as `vector`, which conflicts with the C++ standard vector class... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
Let me create a new pull request with the changes. |
💚 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-9188/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base1 Static Analyzer issues remaining.See details at |
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-9189/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base1 Static Analyzer issues remaining.See details at |
|
Hi, |
Problem Description/Summary :
vtysh hangs on first try to enter after a reboot with BGP dynamic peers
Expected Behavior :
VTYSH should not hang
When we debug more into bgpd docker by doing gdb on its threads, we find the below thread of bgpd, which is causing the issue.
Thread 1 (Thread 0x7f1e1ec46d40 (LWP 47)):
#0 0x00007f1e1d762593 in recvfrom () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f1e1aadd09b in netsnmp_tcpbase_recv () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#2 0x00007f1e1aad9617 in netsnmp_transport_recv () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#3 0x00007f1e1aab2c07 in _sess_read () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#4 0x00007f1e1aab3a29 in snmp_sess_read2 () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#5 0x00007f1e1aab3a7b in snmp_read2 () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#6 0x00007f1e1aab3acf in snmp_read () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
#7 0x00007f1e1b44d7ec in agentx_read (t=0x7fffa75f0080) at lib/agentx.c:63
#8 0x00007f1e1e7d6451 in thread_call (thread=0x7fffa75f0080) at lib/thread.c:1620
#9 0x00007f1e1e770699 in frr_run (master=0x559396ea60f0) at lib/libfrr.c:1011
#10 0x0000559395b4d953 in main (argc=5, argv=0x7fffa75f02b8) at bgpd/bgp_main.c:492
(gdb) bt
#0 0x00007f830c89d210 in __read_nocancel () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000056450e1e8238 in vtysh_client_run (vclient=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 "enable", callback=0x0, cbarg=0x0) at vtysh/vtysh.c:216
#2 0x000056450e1e8c6b in vtysh_client_run_all (head_client=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 "enable", continue_on_err=0, callback=0x0, cbarg=0x0) at vtysh/vtysh.c:356
#3 0x000056450e1e8ddb in vtysh_client_execute (head_client=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 "enable") at vtysh/vtysh.c:393
#4 0x000056450e1e9c82 in vtysh_execute_func (line=0x56450e21add0 "enable", pager=0) at vtysh/vtysh.c:598
#5 0x000056450e1e9dee in vtysh_execute_no_pager (line=0x56450e21add0 "enable") at vtysh/vtysh.c:619
#6 0x000056450e1f7d48 in vtysh_read_file (confp=0x56451000a9d0, top_cfg=1) at vtysh/vtysh_config.c:494
#7 0x000056450e1f7ef2 in vtysh_read_config (config_default_dir=0x56450e4edc20 <frr_config> "/etc/frr/frr.conf", top_cfg=1) at vtysh/vtysh_config.c:522
#8 0x000056450e1e5de4 in vtysh_apply_top_level_config () at vtysh/vtysh_main.c:301
#9 0x000056450e1e7842 in main (argc=2, argv=0x7ffc81e6f598, env=0x7ffc81e6f5b0) at vtysh/vtysh_main.c:692
The fix has been taken from the following link.
https://sourceforge.net/p/net-snmp/patches/1348/