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

BGP warm reboot script to service #3992

Merged
merged 18 commits into from
Jul 15, 2020
Merged

BGP warm reboot script to service #3992

merged 18 commits into from
Jul 15, 2020

Conversation

heidinet2007
Copy link
Contributor

@heidinet2007 heidinet2007 commented Jan 8, 2020

Move BGP warm reboot script to BGP service at /usr/local/bin

Test

###################### warm not enabled ###########################

admin@PSW-7002:/etc/sonic$ show warm_restart config
name enable timer_name timer_duration


bgp false NULL NULL
system false NULL NULL

admin@PSW-7002:~$ sudo systemctl stop bgp
admin@PSW-7002:~$ sudo vi /var/log/syslog

1 Jan 23 00:03:40.080681 PSW-7002 INFO systemd[1]: Stopping BGP container...
2 Jan 23 00:03:40.090340 PSW-7002 NOTICE admin: Stopping bgp service...
6 Jan 23 00:03:40.922961 PSW-7002 NOTICE admin: Warm boot flag: bgp false.
7 Jan 23 00:03:40.931723 PSW-7002 NOTICE admin: Stopping bgp service...

admin@PSW-7002:~$ sudo systemctl start bgp
admin@PSW-7002:~$ sudo vi /var/log/syslog

4 Jan 23 00:04:48.660858 PSW-7002 INFO systemd[1]: Starting BGP container...
5 Jan 23 00:04:48.674793 PSW-7002 NOTICE admin: Starting bgp service...
10 Jan 23 00:04:51.171567 PSW-7002 NOTICE admin: Warm boot flag: bgp false.

###################### warm enabled ##############################

admin@PSW-7002:~$ show warm_restart config
name enable timer_name timer_duration


bgp true NULL NULL
system true NULL NULL

admin@PSW-7002:~$ sudo systemctl stop bgp
admin@PSW-7002:~$ sudo vi /var/log/syslog

14 Jan 23 00:08:21.557400 PSW-7002 INFO systemd[1]: Stopping BGP container...
15 Jan 23 00:08:21.569107 PSW-7002 NOTICE admin: Stopping bgp service...
16 Jan 23 00:08:22.350832 PSW-7002 NOTICE admin: Warm boot flag: bgp true.
17 Jan 23 00:08:22.358876 PSW-7002 NOTICE admin: Stopping bgp service...
18 Jan 23 00:08:22.368532 PSW-7002 NOTICE admin: Kill zebra first

admin@PSW-7002:~$ sudo systemctl start bgp
admin@PSW-7002:~$ sudo vi /var/log/syslog

13 Jan 23 00:09:07.687258 PSW-7002 INFO systemd[1]: Starting BGP container...
14 Jan 23 00:09:07.720972 PSW-7002 NOTICE admin: Starting bgp service...
15 Jan 23 00:09:09.337206 PSW-7002 NOTICE admin: Warm boot flag: bgp true.

files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
@heidinet2007
Copy link
Contributor Author

synced to latest master, retest this please

@yxieca
Copy link
Contributor

yxieca commented Mar 17, 2020

@heidinet2007 I am sorry for taking so long. This PR fell out of my radar.

One thing I just realized (I apologize for that) is that this change only covers warm reboot. It won't cover fast reboot.

I understand that we don't currently have an fast-reboot db flag. That might not be something that we can add immediate.

Can you run some test:

  1. With this change, and unchanged warm-reboot/fast-reboot. making sure warm/fast reboot continue working.
  2. With this change, make matching change in warm-reboot to call bgp service shutdown. But leave fast-reboot the way it is. Can fast/warm reboot still succeed?

Thanks

files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
yxieca
yxieca previously approved these changes Jun 8, 2020
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
files/scripts/bgp.sh Outdated Show resolved Hide resolved
@heidinet2007
Copy link
Contributor Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator

retest vsimage please

@heidinet2007
Copy link
Contributor Author

retest vsimage please

@heidinet2007
Copy link
Contributor Author

retest broadcom please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants