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

Vtysh copy to running config has no effect #16057

Closed
2 tasks done
SRv6d opened this issue May 21, 2024 · 4 comments
Closed
2 tasks done

Vtysh copy to running config has no effect #16057

SRv6d opened this issue May 21, 2024 · 4 comments
Labels
triage Needs further investigation

Comments

@SRv6d
Copy link

SRv6d commented May 21, 2024

Description

copy /etc/frr/frr.conf running-config runs without error, but has no effect on the current running configuration.

Version

RRouting 10.0 (test) on Linux(5.4.0-181-generic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
    '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--sbindir=/usr/lib/frr' '--with-vtysh-pager=/usr/bin/pager' '--libdir=/usr/lib/x86_64-linux-gnu/frr' '--with-moduledir=/usr/lib/x86_64-linux-gnu/frr/modules' '--disable-dependency-tracking' '--enable-rpki' '--disable-scripting' '--enable-pim6d' '--with-libpam' '--enable-doc' '--enable-doc-html' '--enable-snmp' '--enable-fpm' '--disable-protobuf' '--disable-zeromq' '--enable-ospfapi' '--enable-bgp-vnc' '--enable-multipath=256' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' 'build_alias=x86_64-linux-gnu' 'PYTHON=python3'

How to reproduce

Starting frr, /etc/frr/frr.conf with below content is loaded.

frr version 9.0
frr defaults datacenter
!
password zebra
!
router bgp 65536
 bgp router-id 1.3.3.7

sh run reports the following config

Building configuration...

Current configuration:
!
frr version 10.0_git
frr defaults datacenter
no ipv6 forwarding
hostname test
service integrated-vtysh-config
!
password zebra
!
router bgp 65536
 bgp router-id 1.3.3.7
 no bgp enforce-first-as
exit
!
end

To change the running config, I'll configure an example static prefix 2001:db8::/32.

test# conf t
test(config)# router bgp 65536
test(config-router)# addr ipv6 uni
test(config-router-af)# net 2001:db8::/32
test(config-router-af)# redist static

Resulting in the following running config.

Building configuration...

Current configuration:
!
frr version 10.0_git
frr defaults datacenter
no ipv6 forwarding
hostname test
service integrated-vtysh-config
!
password zebra
!
router bgp 65536
 bgp router-id 1.3.3.7
 no bgp enforce-first-as
 !
 address-family ipv6 unicast
  network 2001:db8::/32
  redistribute static
 exit-address-family
exit
!
end

Exiting the configuration context, running copy /etc/frr/frr.conf running-config runs but has not effect on the current running configuration.

test# copy /etc/frr/frr.conf running-config
test# sh run
Building configuration...

Current configuration:
!
frr version 10.0_git
frr defaults datacenter
no ipv6 forwarding
hostname test
service integrated-vtysh-config
!
password zebra
!
router bgp 65536
 bgp router-id 1.3.3.7
 no bgp enforce-first-as
 !
 address-family ipv6 unicast
  network 2001:db8::/32
  redistribute static
 exit-address-family
exit
!
end

Expected behavior

I would expect the running configuration to match the startup / saved configuration.

Actual behavior

The running configuration is unchanged.

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@SRv6d SRv6d added the triage Needs further investigation label May 21, 2024
@donaldsharp
Copy link
Member

This is not behavior that has ever been programmed and is not expected to ever work. If you want to reload frr.conf you need to issue systemctl reload frr after you issue the copy statement.

@SRv6d
Copy link
Author

SRv6d commented May 21, 2024

@donaldsharp So this is just missing an implementation and there are no future plans to create one? I find not doing what the CLI suggests without any kind of feedback less than ideal, especially since I could not find any FRR specific documentation for this.

@donaldsharp
Copy link
Member

I told you the implementation, use systemctl reload frr

@SRv6d
Copy link
Author

SRv6d commented May 22, 2024

I told you the implementation, use systemctl reload frr

Not really a viable "implementation" if FRR is not run by an init daemon like systemd.

SRv6d added a commit to gecio/anycastd that referenced this issue May 22, 2024
SRv6d added a commit to gecio/anycastd that referenced this issue May 22, 2024
SRv6d added a commit to gecio/anycastd that referenced this issue May 22, 2024
SRv6d added a commit to gecio/anycastd that referenced this issue May 22, 2024
* Add testcontainers dependency

* Add stamina dev dependency

* Add `frr_container_vtysh` module scope fixture using testcontainers

* Replace pytest-docker fixture with frr_container_vtysh, adding fixture to reset FRR config

* Remove `pytest-docker`

* Fix typo "intance"

* Remove function container scope config

* Use full file path for volume mapping

* Use master tag as FRRouting image fallback instead of latest

* Allow for unlimited attempts within timeout window

* Create privileged FRRouting container

* Reset FRR BGP configuration manually since the copy command is not implemented correctly in FRR
FRRouting/frr#16057

* Remove all BGP statements using regex

* Regex search config to check if prefixes are configured since the FRR CLI does not return deterministic results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants