Skip to content

Separate syncd service from swss service#2051

Merged
yxieca merged 6 commits intosonic-net:masterfrom
yxieca:syncd_service
Sep 24, 2018
Merged

Separate syncd service from swss service#2051
yxieca merged 6 commits intosonic-net:masterfrom
yxieca:syncd_service

Conversation

@yxieca
Copy link
Contributor

@yxieca yxieca commented Sep 14, 2018

- What I did

  1. Separate syncd service from swss service to become an independent service.
  2. Add code to make sure syncd and swss starts/stops/restarts synchronously.
  3. syncd and swss starts/stops/restarts independently if warm boot is requested.

- How to verify it

  • There is not enough warm boot support to validate warm boot behavior yet.
  • DUT boots up and syncd/swss both initialized properly.
  • Stop/start/restart syncd, validated swss follows the state changes.
  • Stop/start/restart swss, validated syncd follows the state changes.
  • config load_minigraph works as expected.

- Move checks and waits to helper functions.
- Remove early returns from code stream

Signed-off-by: Ying Xie <[email protected]>
Still make them start/stop/restart synchronously so existing scripts
continue working.

Signed-off-by: Ying Xie <[email protected]>
Copy link
Collaborator

@jipanyang jipanyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions:

<1> So warm restart is disabled on both syncd and swss, then "systemctl restart" either one will cause the other service to be restarted too?

<2> What if warm restart is enabled on swss but disabled on syncd, or the vice versa. Will the change handle restart of either service?

<3> If syncd is performing warm restart itself, the get operation from orchagent is synchronous, will some get request be dropped by syncd or times out in orchagent?

…t code

Syncd warm boot needs more thinking, we can put it back once the work
flow has been defined and ready for coding/testing.
@yxieca
Copy link
Contributor Author

yxieca commented Sep 15, 2018

Thanks Jipan for great questions:

<1>. Yes, with these change, syncd and swss will change state synchronously, one changes, the other will follow.
<2>. As we discussed, if swss is warm restarting, during which syncd triggers cold restart, both service should end up doing code restart. However, as we discussed, there might be specific timing scenarios that we need to consider and test.
<3>. I removed code to support syncd service warm reboot by itself.

@lguohan
Copy link
Collaborator

lguohan commented Sep 17, 2018

for <1>, restart syncd should not restart swss in non-warm boot scenario.
for <2>, if warm restart is enabled in swss, restart swss will not cause syncd to restart. if does not matter whether warm restart is enabled for syncd or not. if warm restart is enabled in syncd, then restart syncd will not restart swss.
for <3>, swss has get operation timeout, currently is 30 seconds. when syncd is in warm restart, we need to have orchagent wait till syncd is restarted.. currently this is not supported.

we probably should have a matrix, warm restart enabled for swss/syncd, and which service are we restarting. But, I think we should focus on making swss/syncd both warm or both cold, and test swss and syncd restart first.

Semi-detach syncd service state change from swss:

- swss state change still chase syncd service to follow except warm boot
- syncd state change will only affect itself.

Signed-off-by: Ying Xie <[email protected]>
@yxieca yxieca merged commit cfe01f1 into sonic-net:master Sep 24, 2018
@yxieca yxieca deleted the syncd_service branch September 24, 2018 23:35
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Dec 22, 2021
691c37b [Route bulk] Fix bugs in case a SET operation follows a DEL operation in the same bulk (sonic-net#2086)
a4c80c3 patch for issue sonic-net#1971 - enable Rx Drop handling for cisco-8000 (sonic-net#2041)
71751d1 [macsec] Support setting IPG by gearbox_config.json (sonic-net#2051)

Signed-off-by: Stephen Sun <[email protected]>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
vadymhlushko-mlnx pushed a commit to vadymhlushko-mlnx/sonic-buildimage that referenced this pull request Nov 11, 2022
#### What I did
Fixes sonic-net#2051

RemoveRack/AddRack is confirmed to be working correctly by Renuka. Check sonic-net/sonic-mgmt#5254

#### How I did it
- Enabled ADD_RACK test
- Created REMOVE_RACK test using opposite data to ADD_RACK, verified the generated steps manually.

#### How to verify it
UnitTest and the KVM test by Renuka.

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants