sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
176 stars 700 forks source link

restart_syncd fails due to https://github.com/Azure/sonic-buildimage/pull/2051 #745

Open johcheun opened 5 years ago

johcheun commented 5 years ago

Description After the enhancement to seperate syncd from swss service via below PR: https://github.com/Azure/sonic-buildimage/pull/2051

restart_syncd test case is now failing since the test is requesting syncd shutdown directly, instead of using the new way of triggering the shutdown with the syncd util shell script in /usr/local/bin/syncd.sh

I tried to stop / start the syncd process with /usr/local/bin/syncd.sh stop /usr/local/bin/syncd.sh start

but looks like it will also kill the syncd container, and start it again and not in the same state as initial bootup.

Steps to reproduce the issue:

  1. Build Sonic binary with Azure master branch
  2. Run restart_syncd test in sonic-mgmt container
  3. Test fails as the follow two syncd shell script is still running.

admin@switch2:~$ pgrep "\<syncd>" -a 1733 /bin/bash /usr/local/bin/syncd.sh start 2654 /bin/bash /usr/bin/syncd.sh attach 2807 /usr/bin/syncd -u

admin@switch2:~$ docker exec -i syncd /usr/bin/syncd_request_shutdown --cold

admin@switch2:~$ pgrep "\<syncd>" -a 1733 /bin/bash /usr/local/bin/syncd.sh start 2654 /bin/bash /usr/bin/syncd.sh attach

arkadiyshapiro commented 5 years ago

@prsunny - can you look at this?

riverhong commented 5 years ago

Hello, maybe these PR can help: https://github.com/Azure/sonic-mgmt/pull/947 https://github.com/Azure/sonic-mgmt/pull/986