File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,12 @@ function postStartAction()
283
283
fi
284
284
chgrp -f redis $REDIS_SOCK && chmod -f 0760 $REDIS_SOCK
285
285
{%- elif docker_container_name == " swss" %}
286
+ # Wait until swss container state is Running
287
+ until [[ ($( docker inspect -f {{" '{{.State.Running}}'" }} swss$DEV ) == " true" ) ]]; do
288
+ sleep 0.1
289
+ done
290
+ echo " swss container is up and running"
291
+
286
292
docker exec swss$DEV rm -f /ready # remove cruft
287
293
if [[ " $BOOT_TYPE " == " fast" ]] && [[ -d /host/fast-reboot ]]; then
288
294
test -e /host/fast-reboot/fdb.json && docker cp /host/fast-reboot/fdb.json swss$DEV :/
@@ -292,6 +298,9 @@ function postStartAction()
292
298
rm -fr /host/fast-reboot
293
299
fi
294
300
docker exec swss$DEV touch /ready # signal swssconfig.sh to go
301
+ # Re-confirm that file is indeed created and log an error if not
302
+ docker exec swss$DEV test -f /ready && echo " File swss:/ready created" || echo " Error: File swss:/ready doesn't exist"
303
+
295
304
{%- elif docker_container_name == " pmon" %}
296
305
297
306
DEVPATH=" /usr/share/sonic/device"
You can’t perform that action at this time.
0 commit comments