Skip to content
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

lib: fix interface configuration after vrf change (backport #8864) #9172

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 24, 2021

This is an automatic backport of pull request #8864 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

This commit fixes the following problem:

- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface

It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.

For example:
```
nfware# conf
nfware(config)# interface enp2s0

<-- move the enp2s0 to a different VRF -->

nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```

To fix the issue, go through all connected vty shells and update the
stored XPath.

Suggested-by: Renato Westphal <[email protected]>
Signed-off-by: Igor Ryzhov <[email protected]>
(cherry picked from commit 763725c)
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 24, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20501/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 i386 part 1: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO1U18I386-20501/test

Topology Tests failed for Topotests Ubuntu 18.04 i386 part 1:

r1: Daemon bgpd not running

From frr r1 bgpd log file:
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x6c42b) [0xb7e6d42b]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_candidate_commit_prepare+0x43) [0xb7e70bd3]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_candidate_commit+0x48) [0xb7e70f38]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x70485) [0xb7e71485]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x73202) [0xb7e74202]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_cli_apply_changes+0x6d) [0xb7e7450d]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x85ef7) [0xb7e86ef7]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x86189) [0xb7e87189]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x364f9) [0xb7e374f9]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(cmd_execute_command+0xf2) [0xb7e37692]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(cmd_execute+0x155) [0xb7e378b5]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa2c55) [0xb7ea3c55]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa2e70) [0xb7ea3e70]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa5b2d) [0xb7ea6b2d]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(thread_call+0x82) [0xb7e9df02]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(frr_run+0xd9) [0xb7e5b2f9]
BGP: /usr/lib/frr/bgpd(main+0x403) [0x4fe203]
BGP: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0xb7af8f21]
BGP: /usr/lib/frr/bgpd(+0x5c9e8) [0x5009e8]
BGP: in thread vtysh_read scheduled from lib/vty.c:2726 vty_event()

2021-07-24 19:30:30,717 ERROR: assert failed at "test_all_protocol_startup/test_mpls_interfaces": r1: Daemon bgpd not running
assert 'r1: Daemon bgpd not running' == ''
  - r1: Daemon bgpd not running
2021-07-24 20:02:42,229 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/bgp.py", line 203, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 
% Specify remote-as or peer-group commands first
line 7: Failure to communicate[13] to bgpd, line: neighbor 10.0.0.13 timers 3 10 

line 9: % Unknown command[30]: neighbor fd00:0:0:3::1 remote-as 0 
% Specify remote-as or peer-group commands first
line 11: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 activate 

% Specify remote-as or peer-group commands first
line 12: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 timers 3 10 

% Specify remote-as or peer-group commands first
line 14: Failure to communicate[13] to bgpd, line: no neighbor fd00:0:0:3::1 activate 



2021-07-24 20:02:42,655 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/bgp.py", line 203, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20501/artifact/TOPO1U18I386/ErrorLog/log_topotests.txt

Successful on other platforms/tests
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 amd64 part 0
  • Addresssanitizer topotests part 5
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests Ubuntu 18.04 arm8 part 0
  • Addresssanitizer topotests part 0
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topotests debian 10 amd64 part 4
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests Ubuntu 18.04 arm8 part 9
  • Static analyzer (clang)
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests debian 10 amd64 part 9
  • Topotests Ubuntu 18.04 i386 part 5
  • IPv6 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 1
  • CentOS 7 rpm pkg check
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 9
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 5
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 amd64 part 4
  • Topotests debian 10 amd64 part 5
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 arm8 part 6
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 4
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 6
  • Debian 10 deb pkg check
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 2
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests debian 10 amd64 part 2
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 amd64 part 6
  • Ubuntu 18.04 deb pkg check
  • Ubuntu 20.04 deb pkg check
  • Debian 9 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 1
  • Addresssanitizer topotests part 3
  • Topotests debian 10 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 8
  • Addresssanitizer topotests part 2
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 i386 part 3
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 arm8 part 7

Warnings Generated during build:

Checkout code: Successful with additional warnings
Topotests Ubuntu 18.04 i386 part 1: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO1U18I386-20501/test

Topology Tests failed for Topotests Ubuntu 18.04 i386 part 1:

r1: Daemon bgpd not running

From frr r1 bgpd log file:
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x6c42b) [0xb7e6d42b]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_candidate_commit_prepare+0x43) [0xb7e70bd3]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_candidate_commit+0x48) [0xb7e70f38]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x70485) [0xb7e71485]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x73202) [0xb7e74202]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(nb_cli_apply_changes+0x6d) [0xb7e7450d]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x85ef7) [0xb7e86ef7]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x86189) [0xb7e87189]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0x364f9) [0xb7e374f9]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(cmd_execute_command+0xf2) [0xb7e37692]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(cmd_execute+0x155) [0xb7e378b5]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa2c55) [0xb7ea3c55]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa2e70) [0xb7ea3e70]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(+0xa5b2d) [0xb7ea6b2d]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(thread_call+0x82) [0xb7e9df02]
BGP: /usr/lib/i386-linux-gnu/frr/libfrr.so.0(frr_run+0xd9) [0xb7e5b2f9]
BGP: /usr/lib/frr/bgpd(main+0x403) [0x4fe203]
BGP: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0xb7af8f21]
BGP: /usr/lib/frr/bgpd(+0x5c9e8) [0x5009e8]
BGP: in thread vtysh_read scheduled from lib/vty.c:2726 vty_event()

2021-07-24 19:30:30,717 ERROR: assert failed at "test_all_protocol_startup/test_mpls_interfaces": r1: Daemon bgpd not running
assert 'r1: Daemon bgpd not running' == ''
  - r1: Daemon bgpd not running
2021-07-24 20:02:42,229 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/bgp.py", line 203, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 
% Specify remote-as or peer-group commands first
line 7: Failure to communicate[13] to bgpd, line: neighbor 10.0.0.13 timers 3 10 

line 9: % Unknown command[30]: neighbor fd00:0:0:3::1 remote-as 0 
% Specify remote-as or peer-group commands first
line 11: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 activate 

% Specify remote-as or peer-group commands first
line 12: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 timers 3 10 

% Specify remote-as or peer-group commands first
line 14: Failure to communicate[13] to bgpd, line: no neighbor fd00:0:0:3::1 activate 



2021-07-24 20:02:42,655 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/bgp.py", line 203, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 344, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TOPO1U18I386/topotests/lib/common_config.py", line 605, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20501/artifact/TOPO1U18I386/ErrorLog/log_topotests.txt

Report for vty.c | 6 issues
===============================================
< WARNING: Missing a blank line after declarations
< #2592: FILE: /tmp/f1-29928/vty.c:2592:
< ERROR: do not use assignment in if condition
< #2603: FILE: /tmp/f1-29928/vty.c:2603:
< ERROR: do not use assignment in if condition
< #2610: FILE: /tmp/f1-29928/vty.c:2610:

@mwinter-osr
Copy link
Member

CI:rerun

1 similar comment
@mwinter-osr
Copy link
Member

CI:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 25, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20504/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for vty.c | 6 issues
===============================================
< WARNING: Missing a blank line after declarations
< #2592: FILE: /tmp/f1-2117/vty.c:2592:
< ERROR: do not use assignment in if condition
< #2603: FILE: /tmp/f1-2117/vty.c:2603:
< ERROR: do not use assignment in if condition
< #2610: FILE: /tmp/f1-2117/vty.c:2610:

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20505/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for vty.c | 6 issues
===============================================
< WARNING: Missing a blank line after declarations
< #2592: FILE: /tmp/f1-20505/vty.c:2592:
< ERROR: do not use assignment in if condition
< #2603: FILE: /tmp/f1-20505/vty.c:2603:
< ERROR: do not use assignment in if condition
< #2610: FILE: /tmp/f1-20505/vty.c:2610:

@ton31337 ton31337 merged commit 634ec23 into stable/8.0 Jul 25, 2021
@mergify mergify bot deleted the mergify/bp/stable/8.0/pr-8864 branch July 25, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants