sonic-buildimage/platform/vs/docker-sonic-vs/start.sh
Andriy Moroz 58d8302b53 Buffers configuration update on port speed change (#1345)
* Move buffer configuration to ConfigDB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Converted Dell and Arista configs

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add buffer configs for ACS-MSN2740

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated buffers template

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed j2 unit test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config for Force10-S6100

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update VS docker to support speed and buffers test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config generation

- fixed support of sonic-to-sonic install

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update submodules pointers for buffers config

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-01-29 08:11:05 -08:00

64 lines
1.8 KiB
Bash
Executable File

#!/bin/bash -e
# generate configuration
[ -d /etc/sonic ] || mkdir -p /etc/sonic
SYSTEM_MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}')
sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"mac": "'$SYSTEM_MAC_ADDRESS'"}}}' --print-data > /etc/sonic/init_cfg.json
if [ -f /etc/sonic/config_db.json ]; then
sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --print-data > /tmp/config_db.json
mv /tmp/config_db.json /etc/sonic/config_db.json
else
# generate and merge buffers configuration into config file
sonic-cfggen -t /usr/share/sonic/device/vswitch/buffers.json.j2 > /tmp/buffers.json
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json --print-data > /etc/sonic/config_db.json
fi
mkdir -p /etc/swss/config.d/
# sonic-cfggen -m /etc/sonic/minigraph.xml -d -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json
# sonic-cfggen -m /etc/sonic/minigraph.xml -d -t /usr/share/sonic/templates/mirror.json.j2 > /etc/swss/config.d/mirror.json
# sonic-cfggen -m /etc/sonic/minigraph.xml -d -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json
# export platform=`sonic-cfggen -v platform`
rm -f /var/run/rsyslogd.pid
supervisorctl start rsyslogd
mkdir -p /var/run/redis
supervisorctl start redis-server
/usr/bin/configdb-load.sh
supervisorctl start syncd
supervisorctl start orchagent
supervisorctl start portsyncd
supervisorctl start intfsyncd
supervisorctl start neighsyncd
supervisorctl start teamsyncd
supervisorctl start fpmsyncd
supervisorctl start intfmgrd
supervisorctl start vlanmgrd
supervisorctl start zebra
supervisorctl start buffermgrd
# Start arp_update when VLAN exists
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
if [ "$VLAN" != "" ]; then
supervisorctl start arp_update
fi