Skip to content

Commit

Permalink
[Submodule update]: Update submodule sonic-utilities (#1407)
Browse files Browse the repository at this point in the history
* Update submodule sonic-utilities

* Copy fast-reboot json dumps from /host filesystem

* Update sonic-utilities to latest

* Fix typo
  • Loading branch information
pavel-shirshov committed Feb 26, 2018
1 parent e18bffd commit ec537be
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
7 changes: 7 additions & 0 deletions dockers/docker-orchagent/swssconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ function fast_reboot {
esac
}

# Wait until swss.sh in the host system create file swss:/ready
until [[ -e /ready ]]; do
sleep 0.1;
done

rm -f /ready

# Restore FDB and ARP table ASAP
fast_reboot

Expand Down
19 changes: 14 additions & 5 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ function getMountPoint()

function postStartAction()
{
{%- if docker_container_name != "database" %}
:
{%- else %}
{%- if docker_container_name == "database" %}
until [[ $(/usr/bin/docker exec database redis-cli ping | grep -c PONG) -gt 0 ]]; do
sleep 1;
done
{%- endif %}
{%- if docker_container_name == "snmp" %}
{%- elif docker_container_name == "swss" %}
docker exec swss rm -f /ready # remove cruft
if [[ -d /host/fast-reboot ]];
then
test -e /host/fast-reboot/fdb.json && docker cp /host/fast-reboot/fdb.json swss:/
test -e /host/fast-reboot/arp.json && docker cp /host/fast-reboot/arp.json swss:/
test -e /host/fast-reboot/default_routes.json && docker cp /host/fast-reboot/default_routes.json swss:/
rm -fr /host/fast-reboot
fi
docker exec swss touch /ready # signal swssconfig.sh to go
{%- elif docker_container_name == "snmp" %}
docker exec -i database redis-cli -n 6 HSET 'DEVICE_METADATA|localhost' chassis_serial_number $(decode-syseeprom -s)
{%- else %}
# nothing
{%- endif %}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-utilities

0 comments on commit ec537be

Please sign in to comment.