154a6ab6c5
- Support for non-template based FRR configurations (BGP, route-map, OSPF, static route..etc) using config DB schema. - Support for save & restore - Jinja template based config-DB data read and apply to FRR during startup **- How I did it** - add frrcfgd service - when frr_mgmg_framework_config is set, frrcfgd starts in bgp container - when user changed the BGP or other related table entries in config DB, frrcfgd will run corresponding VTYSH commands to program on FRR. - add jinja template to generate FRR config file to be used by FRR daemons while bgp container restarted **- How to verify it** 1. Add/delete data on config DB and then run VTYSH "show running-config" command to check if FRR configuration changed. 1. Restart bgp container and check if generated FRR config file is correct and run VTYSH "show running-config" command to check if FRR configuration is consistent with attributes in config DB Co-authored-by: Zhenhong Zhao <zhenhong.zhao@dell.com>
169 lines
3.9 KiB
Django/Jinja
169 lines
3.9 KiB
Django/Jinja
[supervisord]
|
|
logfile_maxbytes=1MB
|
|
logfile_backups=2
|
|
nodaemon=true
|
|
|
|
[eventlistener:dependent-startup]
|
|
command=python3 -m supervisord_dependent_startup
|
|
autostart=true
|
|
autorestart=unexpected
|
|
startretries=0
|
|
exitcodes=0,3
|
|
events=PROCESS_STATE
|
|
buffer_size=50
|
|
|
|
[eventlistener:supervisor-proc-exit-listener]
|
|
command=/usr/bin/supervisor-proc-exit-listener --container-name bgp
|
|
events=PROCESS_STATE_EXITED
|
|
autostart=true
|
|
autorestart=unexpected
|
|
|
|
[program:rsyslogd]
|
|
command=/usr/sbin/rsyslogd -n -iNONE
|
|
priority=1
|
|
autostart=false
|
|
autorestart=unexpected
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
|
|
[program:zebra]
|
|
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm -M snmp
|
|
priority=4
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=rsyslogd:running
|
|
|
|
[program:staticd]
|
|
command=/usr/lib/frr/staticd -A 127.0.0.1
|
|
priority=4
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
[program:bfdd]
|
|
command=/usr/lib/frr/bfdd -A 127.0.0.1
|
|
priority=4
|
|
stopsignal=KILL
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=zebra:running
|
|
{% endif %}
|
|
|
|
[program:bgpd]
|
|
command=/usr/bin/bgpd.sh -A 127.0.0.1 -M snmp
|
|
priority=5
|
|
stopsignal=KILL
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
[program:ospfd]
|
|
command=/usr/lib/frr/ospfd -A 127.0.0.1 -M snmp
|
|
priority=5
|
|
stopsignal=KILL
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
[program:pimd]
|
|
command=/usr/lib/frr/pimd -A 127.0.0.1
|
|
priority=5
|
|
stopsignal=KILL
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=zebra:running
|
|
{% endif %}
|
|
|
|
[program:fpmsyncd]
|
|
command=fpmsyncd
|
|
priority=6
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=bgpd:running
|
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
[program:frrcfgd]
|
|
command=/usr/local/bin/frrcfgd
|
|
{% else %}
|
|
[program:bgpcfgd]
|
|
command=/usr/local/bin/bgpcfgd
|
|
{% endif %}
|
|
priority=6
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=bgpd:running
|
|
|
|
[program:bgpmon]
|
|
command=/usr/local/bin/bgpmon
|
|
priority=6
|
|
autostart=false
|
|
autorestart=true
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=bgpd:running
|
|
|
|
{% if DEVICE_METADATA.localhost.docker_routing_config_mode is defined and DEVICE_METADATA.localhost.docker_routing_config_mode == "unified" %}
|
|
[program:vtysh_b]
|
|
command=/usr/bin/vtysh -b
|
|
priority=6
|
|
autostart=false
|
|
autorestart=false
|
|
startsecs=0
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=bgpd:running
|
|
{% endif %}
|
|
|
|
{% if WARM_RESTART is defined and WARM_RESTART.bgp is defined and WARM_RESTART.bgp.bgp_eoiu is defined and WARM_RESTART.bgp.bgp_eoiu == "true" %}
|
|
[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
|
|
dependent_startup=true
|
|
dependent_startup_wait_for=bgpd:running
|
|
{% endif %}
|