Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sequence diagrams for swss and syncd services #1133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions doc/warm-reboot/img/swss_going_down.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml
' Online Server: https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
' Basic examples: https://plantuml.com/sequence-diagram#5e05164bff244555
' Declaring participant: https://plantuml.com/sequence-diagram#5d2ed256d73a7298
' Message to Self: https://plantuml.com/sequence-diagram#f5050860884ddf31
' Lifeline Activation and Destruction: https://plantuml.com/sequence-diagram#5cc0040514e70f7b
' Incoming and outgoing messages: https://plantuml.com/sequence-diagram#05984b1743e67542
' Comments: https://plantuml.com/commons#8413c683b4b27cc3

participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2 swss.service.j2]]" as swss.service.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh swss.sh]]" as swss.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2 docker_image_ctl.j2]]" as docker_image_ctl.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container container]]" as container
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any docker-wait-any]]" as dockerwaitany

[-> swss.service.j2: sudo systemctl stop swss
activate swss.service.j2
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L26 /usr/local/bin/swss.sh stop]]
activate swss.sh
swss.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L275 /usr/bin/swss.sh stop]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L593 /usr/local/bin/container stop swss]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.stop()]]
docker_image_ctl.j2 <- container
deactivate container
swss.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L136-L152 /bin/systemctl stop syncd\n/bin/systemctl stop radv\n/bin/systemctl stop bgp\n/bin/systemctl stop dhcp_relay]]
swss.service.j2 <- swss.sh
deactivate swss.sh
deactivate swss.service.j2
[-> swss.service.j2: sudo warm-reboot
activate swss.service.j2
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L26 /usr/local/bin/swss.sh stop]]
activate swss.sh
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L279 docker kill swss]]
swss.service.j2 <- swss.sh
deactivate swss.sh
deactivate swss.service.j2
@enduml
47 changes: 47 additions & 0 deletions doc/warm-reboot/img/swss_going_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions doc/warm-reboot/img/swss_going_up.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@startuml
' Online Server: https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
' Basic examples: https://plantuml.com/sequence-diagram#5e05164bff244555
' Declaring participant: https://plantuml.com/sequence-diagram#5d2ed256d73a7298
' Message to Self: https://plantuml.com/sequence-diagram#f5050860884ddf31
' Lifeline Activation and Destruction: https://plantuml.com/sequence-diagram#5cc0040514e70f7b
' Incoming and outgoing messages: https://plantuml.com/sequence-diagram#05984b1743e67542
' Comments: https://plantuml.com/commons#8413c683b4b27cc3

participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2 swss.service.j2]]" as swss.service.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh swss.sh]]" as swss.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2 docker_image_ctl.j2]]" as docker_image_ctl.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container container]]" as container
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any docker-wait-any]]" as dockerwaitany

[-> swss.service.j2: sudo systemctl start swss
activate swss.service.j2
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L24 /usr/local/bin/swss.sh start]]
activate swss.sh
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L169-L179 sonic-db-cli APPL_DB FLUSHDB\nsonic-db-cli ASIC_DB FLUSHDB\nsonic-db-cli COUNTERS_DB FLUSHDB\nsonic-db-cli FLEX_COUNTER_DB FLUSHDB\nsonic-db-cli GB_ASIC_DB FLUSHDB\nsonic-db-cli GB_COUNTERS_DB FLUSHDB\nsonic-db-cli RESTAPI_DB FLUSHDB\nsonic-db-cli APPL_STATE_DB FLUSHDB]]
swss.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L186 /usr/bin/swss.sh start]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L351 /usr/local/bin/container start swss]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.start()]]
docker_image_ctl.j2 <- container
deactivate container
swss.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
swss.service.j2 <- swss.sh
deactivate swss.sh
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L25 /usr/local/bin/swss.sh wait]]
activate swss.sh
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L113-L129 /bin/systemctl start syncd\n/bin/systemctl start radv\n/bin/systemctl start bgp\n/bin/systemctl start dhcp_relay]]
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L209-L243 Allow some time for peer container to start]]
swss.sh -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L258 /usr/bin/docker-wait-any -s swss -d syncd dhcp_relay]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L100 t.start()]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L52 docker_client.wait('swss')]]
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L63 g_thread_exit_event.set()]]
deactivate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L100 t.start()]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L52 docker_client.wait('syncd')]]
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L63 g_thread_exit_event.set()]]
deactivate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L104 g_thread_exit_event.wait()]]
swss.sh <- dockerwaitany
deactivate dockerwaitany
swss.service.j2 <- swss.sh
deactivate swss.sh
deactivate swss.service.j2
[-> swss.service.j2: sudo warm-reboot
activate swss.service.j2
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L24 /usr/local/bin/swss.sh start]]
activate swss.sh
swss.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L186 /usr/bin/swss.sh start]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L351 /usr/local/bin/container start swss]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.start()]]
docker_image_ctl.j2 <- container
deactivate container
swss.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
swss.service.j2 <- swss.sh
deactivate swss.sh
swss.service.j2 -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/swss.service.j2#L25 /usr/local/bin/swss.sh wait]]
activate swss.sh
swss.sh -> swss.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L209-L243 Allow some time for peer container to start]]
swss.sh -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/swss.sh#L258 /usr/bin/docker-wait-any -s swss -d syncd dhcp_relay]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L100 t.start()]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L52 docker_client.wait('swss')]]
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L63 g_thread_exit_event.set()]]
deactivate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L100 t.start()]]
activate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L52 docker_client.wait('syncd')]]
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L63 g_thread_exit_event.set()]]
deactivate dockerwaitany
dockerwaitany -> dockerwaitany: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/image_config/misc/docker-wait-any#L104 g_thread_exit_event.wait()]]
swss.sh <- dockerwaitany
deactivate dockerwaitany
swss.service.j2 <- swss.sh
deactivate swss.sh
deactivate swss.service.j2
@enduml
96 changes: 96 additions & 0 deletions doc/warm-reboot/img/swss_going_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions doc/warm-reboot/img/syncd_going_down.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@startuml
' Online Server: https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
' Basic examples: https://plantuml.com/sequence-diagram#5e05164bff244555
' Declaring participant: https://plantuml.com/sequence-diagram#5d2ed256d73a7298
' Message to Self: https://plantuml.com/sequence-diagram#f5050860884ddf31
' Lifeline Activation and Destruction: https://plantuml.com/sequence-diagram#5cc0040514e70f7b
' Incoming and outgoing messages: https://plantuml.com/sequence-diagram#05984b1743e67542
' Comments: https://plantuml.com/commons#8413c683b4b27cc3

participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/syncd.service.j2 syncd.service.j2]]" as syncd.service.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd.sh syncd.sh]]" as syncd.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd_common.sh syncd_common.sh]]" as syncd_common.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2 docker_image_ctl.j2]]" as docker_image_ctl.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container container]]" as container

[-> syncd.service.j2: sudo systemctl stop syncd
activate syncd.service.j2
syncd.service.j2 -> syncd.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/syncd.service.j2#L29 /usr/local/bin/syncd.sh stop]]
activate syncd.sh
syncd.sh -> syncd_common.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd.sh#L153 stop]]
activate syncd_common.sh
syncd_common.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd_common.sh#L166 /usr/bin/syncd.sh stop]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L593 /usr/local/bin/container stop syncd]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.stop()]]
docker_image_ctl.j2 <- container
deactivate container
syncd_common.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
syncd.sh <- syncd_common.sh
deactivate syncd_common.sh
syncd.service.j2 <- syncd.sh
deactivate syncd.sh
deactivate syncd.service.j2
@enduml
42 changes: 42 additions & 0 deletions doc/warm-reboot/img/syncd_going_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions doc/warm-reboot/img/syncd_going_up.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@startuml
' Online Server: https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
' Basic examples: https://plantuml.com/sequence-diagram#5e05164bff244555
' Declaring participant: https://plantuml.com/sequence-diagram#5d2ed256d73a7298
' Message to Self: https://plantuml.com/sequence-diagram#f5050860884ddf31
' Lifeline Activation and Destruction: https://plantuml.com/sequence-diagram#5cc0040514e70f7b
' Incoming and outgoing messages: https://plantuml.com/sequence-diagram#05984b1743e67542
' Comments: https://plantuml.com/commons#8413c683b4b27cc3

participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/syncd.service.j2 syncd.service.j2]]" as syncd.service.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd.sh syncd.sh]]" as syncd.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd_common.sh syncd_common.sh]]" as syncd_common.sh
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2 docker_image_ctl.j2]]" as docker_image_ctl.j2
participant "[[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container container]]" as container

[-> syncd.service.j2: sudo systemctl start syncd
activate syncd.service.j2
syncd.service.j2 -> syncd.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/syncd.service.j2#L27 /usr/local/bin/syncd.sh start]]
activate syncd.sh
syncd.sh -> syncd_common.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd.sh#L153 start]]
activate syncd_common.sh
syncd_common.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd_common.sh#L122 /usr/bin/syncd.sh start]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L351 /usr/local/bin/container start syncd]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.start()]]
docker_image_ctl.j2 <- container
deactivate container
syncd_common.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
syncd.sh <- syncd_common.sh
deactivate syncd_common.sh
syncd.service.j2 <- syncd.sh
deactivate syncd.sh
syncd.service.j2 -> syncd.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/per_namespace/syncd.service.j2#L28 /usr/local/bin/syncd.sh wait]]
activate syncd.sh
syncd.sh -> syncd_common.sh: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd.sh#L153 wait]]
activate syncd_common.sh
syncd_common.sh -> docker_image_ctl.j2: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/scripts/syncd_common.sh#L144 /usr/bin/syncd.sh wait]]
activate docker_image_ctl.j2
docker_image_ctl.j2 -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/files/build_templates/docker_image_ctl.j2#L577 /usr/local/bin/container wait syncd]]
activate container
container -> container: [[https://github.com/sonic-net/sonic-buildimage/blob/df4312f7ef4b8b808320be3df9c09c84b4a3e423/src/sonic-ctrmgrd/ctrmgr/container#L125 container.wait()]]
docker_image_ctl.j2 <- container
deactivate container
syncd_common.sh <- docker_image_ctl.j2
deactivate docker_image_ctl.j2
syncd.sh <- syncd_common.sh
deactivate syncd_common.sh
syncd.service.j2 <- syncd.sh
deactivate syncd.sh
deactivate syncd.service.j2
@enduml
59 changes: 59 additions & 0 deletions doc/warm-reboot/img/syncd_going_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions doc/warm-reboot/system-warmboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
- kill syncd docker
- stop database
- use kexec to reboot, plus one extra kernel argument
![Swss going down](img/swss_going_down.svg)
![Syncd going down](img/syncd_going_down.svg)

Plan to re-use fast-reboot script. Improve the fast-reboot to handle warm-reboot scenario, have a symbol link to warm-reboot.
The script detects the name, and call corresponding reboot.
Expand Down Expand Up @@ -60,6 +62,8 @@ Later if we improve the consistency ```SONIC_BOOT_TYPE=[fast|warm|cold]```, this
- at the same time as swss docker. swss will not read teamd app db until it finishes the comparison logic.
- start bgp docker
- at the same time as swss docker. swss will not read bgp route table until it finishes the comparison logic.
![Swss going up](img/swss_going_up.svg)
![Syncd going up](img/syncd_going_up.svg)

## SAI expectations for warm recovery
- Application sets profile value SAI_KEY_BOOT_TYPE to 1 to indicate WARM BOOT. (0: cold boot, 2: fast boot)
Expand Down