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

start bgp_eoiu_mark service to populate bgp eoiu marker flags for warm start, if configured so #3489

Merged
merged 5 commits into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ rm -f /var/run/rsyslogd.pid

supervisorctl start rsyslogd

# start eoiu pulling, only if configured so
if [ $(sonic-cfggen -d --print-data | grep 'bgp_eoiu' | grep -c 'true') -ge 1 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sonic-cfggen -d -v bgp_eoiu could work better here

Copy link
Contributor Author

@heidinet2007 heidinet2007 Nov 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Pavel, thanks for your review. However, "sonic-cfggen -d -v" doesn't seem to do the desired check:

admin@ASW-7004:$ sonic-cfggen -d --print-data | grep 'bgp_eoiu'
            "bgp_eoiu": "true",   <------- show the  config
admin@ASW-7004:$ sonic-cfggen -d -v bgp_eoiu
                                  <------- show nothing

admin@ASW-7004:$ sonic-cfggen -d -v 'WARM_RESTART' 
{'bgp': {'bgp_eoiu': 'true', 'bgp_timer': '120'}}
admin@ASW-7004:$ 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try
sonic-cfggen -d -v 'WARM_RESTART.bgp.bgp_eoiu'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just updated the diff. Please review it. thanks

Copy link
Contributor

@pavel-shirshov pavel-shirshov Nov 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if [ $(sonic-cfggen -d -v 'WARM_RESTART.bgp.bgp_eoiu' | grep -c 'true')

to

if [ $(sonic-cfggen -d -v 'WARM_RESTART.bgp.bgp_eoiu') = 'true' ];

or

if [[ $(sonic-cfggen -d -v 'WARM_RESTART.bgp.bgp_eoiu') == 'true' ]];

supervisorctl start bgp_eoiu_marker
fi

supervisorctl start bgpcfgd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is added accidently? It was moved to end as part of #3627

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Start Quagga processes
Expand Down
10 changes: 10 additions & 0 deletions dockers/docker-fpm-frr/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@ autorestart=false
startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog

[program:bgp_eoiu_marker]
command=/usr/bin/bgp_eoiu_marker.py
priority=7
autostart=false
autorestart=false
startsecs=0
startretries=0
stdout_logfile=syslog
stderr_logfile=syslog