Page MenuHomeVyOS Platform

Disallow saving when there are non-committed changes in the session
Open, NormalPublicBUG

Description

If create or replace bgp neighbor and don't set remote-as for him.
After reboot % BGP instance not found

To create this bug:

vyos@uplink# show protocols | commands 
set bgp 65111 neighbor 10.88.57.1 remote-as '65001'
set bgp 65111 neighbor 10.88.57.3 remote-as '65001'
[edit]
vyos@uplink#
vyos@uplink:~$ sh ip bgp sum

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
10.88.57.1      4      65001       8       9        0    0    0 00:05:16            0
10.88.57.3      4      65001       9       9        0    0    0 00:05:16            1

Delete one peer and create new without remote-as

delete protocols  bgp 65111 neighbor 10.88.57.1
set protocols bgp 65111 neighbor 10.88.57.254
vyos@uplink# commit
[ protocols bgp 65111 ]
[ protocols bgp 65111 neighbor 10.88.57.254 ]
  must set remote-as or peer-group with remote-as defined

[edit]
vyos@uplink# save
Saving configuration to '/config/config.boot'...
Done
[edit]
vyos@uplink# exit
vyos@uplink:~$ reboot

After reboot:

vyos@uplink:~$ sh ip bgp sum
% BGP instance not found

Show protocols:

vyos@uplink# show protocols 
 bgp 65111 {
     neighbor 10.88.57.3 {
         remote-as 65001
     }
     neighbor 10.88.57.254 {
     }
 }
[edit]
vyos@uplink#

This bug I create on 2 versions

vyos@uplink# run show version 
Version:          VyOS 1.2.3
Built by:         Sentrium S.L.
Built on:         Fri 13 Sep 2019 11:15 UTC
Build UUID:       bb328444-2f89-4d39-8dab-068278c09194
Build Commit ID:  24f1a74bc88f3a

Latest rolling:

vyos@uplink# run show version 
Version:          VyOS 1.2-rolling-201910230349
Built by:         [email protected]
Built on:         Wed 23 Oct 2019 03:49 UTC
Build UUID:       737647df-a3d3-431c-b2e4-4ef8e0b78421
Build Commit ID:  25bb74bc51f7ee

Is it possible to make protection against "command save" if something wrong with commit?

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2-rolling-201910230349
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Improvement (missing useful functionality)

Event Timeline

Viacheslav renamed this task from Bgp instence not found after save/reboot to Bgp instance not found after save/reboot.Oct 23 2019, 1:14 PM

Whats happening here is that the non-commit-able session is saved to disk. because of this BGP will fail on reload because of illegal configuration on the peer. What needs to be done here is to disallow the save command when there are non-commited work in the session.. or at least give a clear warning about this with a [y/N] answer. is this possible to incorporate into vbash? @dmbaturin

syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:27 PM
dmbaturin renamed this task from Bgp instance not found after save/reboot to Disallow saving when there are non-committed changes in the session.Nov 9 2021, 5:05 AM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Behavior change.
dmbaturin changed Issue type from Bug (incorrect behavior) to Improvement (missing useful functionality).