-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Revert frr service to systemd control and daemons to watchfrr control #3486
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
Changes from 3 commits
7bffe35
bd77348
39138cd
143f8cf
82aeeeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This file tells the frr package which daemons to start. | ||
# | ||
# Sample configurations for these daemons can be found in | ||
# /usr/share/doc/frr/examples/. | ||
# | ||
# ATTENTION: | ||
# | ||
# When activation a daemon at the first time, a config file, even if it is | ||
# empty, has to be present *and* be owned by the user and group "frr", else | ||
# the daemon will not be started by /etc/init.d/frr. The permissions should | ||
# be u=rw,g=r,o=. | ||
# When using "vtysh" such a config file is also needed. It should be owned by | ||
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too. | ||
nikos-github marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# | ||
# The watchfrr and zebra daemons are always started. | ||
# | ||
bgpd=yes | ||
ospfd=no | ||
ospf6d=no | ||
ripd=no | ||
ripngd=no | ||
isisd=no | ||
pimd=no | ||
ldpd=no | ||
nhrpd=no | ||
eigrpd=no | ||
babeld=no | ||
sharpd=no | ||
pbrd=no | ||
bfdd=no | ||
fabricd=no | ||
pavel-shirshov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# | ||
# If this option is set the /etc/init.d/frr script automatically loads | ||
# the config via "vtysh -b" when the servers are started. | ||
# Check /etc/pam.d/frr if you intend to use "vtysh"! | ||
# | ||
vtysh_enable=yes | ||
zebra_options=" -A 127.0.0.1 -s 90000000 -M fpm -M snmp" | ||
bgpd_options=" -A 127.0.0.1 -M snmp" | ||
ospfd_options=" -A 127.0.0.1" | ||
ospf6d_options=" -A ::1" | ||
ripd_options=" -A 127.0.0.1" | ||
ripngd_options=" -A ::1" | ||
isisd_options=" -A 127.0.0.1" | ||
pimd_options=" -A 127.0.0.1" | ||
ldpd_options=" -A 127.0.0.1" | ||
nhrpd_options=" -A 127.0.0.1" | ||
eigrpd_options=" -A 127.0.0.1" | ||
babeld_options=" -A 127.0.0.1" | ||
sharpd_options=" -A 127.0.0.1" | ||
pbrd_options=" -A 127.0.0.1" | ||
staticd_options="-A 127.0.0.1" | ||
bfdd_options=" -A 127.0.0.1" | ||
fabricd_options="-A 127.0.0.1" | ||
|
||
# The list of daemons to watch is automatically generated by the init script. | ||
#watchfrr_options="" | ||
|
||
# for debugging purposes, you can specify a "wrap" command to start instead | ||
# of starting the daemon directly, e.g. to use valgrind on ospfd: | ||
# ospfd_wrap="/usr/bin/valgrind" | ||
# or you can use "all_wrap" for all daemons, e.g. to use perf record: | ||
# all_wrap="/usr/bin/perf record --call-graph -" | ||
# the normal daemon command is added to this at the end. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p /etc/frr | ||
|
||
CONFIG_TYPE=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["docker_routing_config_mode"]'` | ||
|
||
if [ "$CONFIG_TYPE" == "separated" ]; then | ||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/frr/bgpd.conf | ||
sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/frr/zebra.conf | ||
sonic-cfggen -d -t /usr/share/sonic/templates/staticd.conf.j2 > /etc/frr/staticd.conf | ||
echo "no service integrated-vtysh-config" > /etc/frr/vtysh.conf | ||
rm -f /etc/frr/frr.conf | ||
elif [ "$CONFIG_TYPE" == "unified" ]; then | ||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/frr.conf.j2 >/etc/frr/frr.conf | ||
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf | ||
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf /etc/frr/staticd.conf | ||
elif [ "$CONFIG_TYPE" == "split" ] || [ -z "$CONFIG_TYPE" ]; then | ||
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf | ||
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf /etc/frr/staticd.conf | ||
fi | ||
|
||
sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate | ||
chown root:root /usr/sbin/bgp-isolate | ||
chmod 0755 /usr/sbin/bgp-isolate | ||
|
||
sonic-cfggen -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate | ||
chown root:root /usr/sbin/bgp-unisolate | ||
chmod 0755 /usr/sbin/bgp-unisolate | ||
|
||
mkdir -p /var/sonic | ||
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status | ||
|
||
rm -f /var/run/rsyslogd.pid | ||
|
||
service rsyslog start | ||
service frr start | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already have supervised to start frr process, it is good to unified all process management inside the docker. We have unified way to manage process restart, docker restart, process crash messages. I do not really understand why we need to change that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand either why we had to change from systemd in the first place. There was no functional requirement in the first place to change to supervisord. I don't see the goodness in unifying all process management inside the docker under supervisord especially since we ended up with multiple problems out of it. The routing application should be standalone and free of any such dependancies. It also doesn't need this unification. These changes were agreed in the August meeting we had and I sent meeting minutes. I also fail to understand why we are holding this PR as hostage when it fixes 5 blocking critical issues for a month now. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p /etc/frr | ||
|
||
CONFIG_TYPE=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["docker_routing_config_mode"]'` | ||
|
||
if [ -z "$CONFIG_TYPE" ] || [ "$CONFIG_TYPE" == "separated" ]; then | ||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/frr/bgpd.conf | ||
sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/frr/zebra.conf | ||
sonic-cfggen -d -t /usr/share/sonic/templates/staticd.conf.j2 > /etc/frr/staticd.conf | ||
echo "no service integrated-vtysh-config" > /etc/frr/vtysh.conf | ||
rm -f /etc/frr/frr.conf | ||
elif [ "$CONFIG_TYPE" == "unified" ]; then | ||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/frr.conf.j2 >/etc/frr/frr.conf | ||
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf | ||
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf /etc/frr/staticd.conf | ||
fi | ||
|
||
sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate | ||
chown root:root /usr/sbin/bgp-isolate | ||
chmod 0755 /usr/sbin/bgp-isolate | ||
|
||
sonic-cfggen -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate | ||
chown root:root /usr/sbin/bgp-unisolate | ||
chmod 0755 /usr/sbin/bgp-unisolate | ||
|
||
mkdir -p /var/sonic | ||
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status | ||
|
||
rm -f /var/run/rsyslogd.pid | ||
|
||
supervisorctl start rsyslogd | ||
|
||
supervisorctl start bgpcfgd | ||
|
||
# Start Quagga processes | ||
supervisorctl start zebra | ||
supervisorctl start staticd | ||
supervisorctl start bgpd | ||
|
||
if [ "$CONFIG_TYPE" == "unified" ]; then | ||
supervisorctl start vtysh_b | ||
fi | ||
|
||
supervisorctl start fpmsyncd |
Uh oh!
There was an error while loading. Please reload this page.