Skip to content

Fix fast-reboot handling for swss script#5070

Merged
vaibhavhd merged 2 commits intosonic-net:masterfrom
vaibhavhd:swss-script-update
Aug 10, 2020
Merged

Fix fast-reboot handling for swss script#5070
vaibhavhd merged 2 commits intosonic-net:masterfrom
vaibhavhd:swss-script-update

Conversation

@vaibhavhd
Copy link
Copy Markdown
Contributor

- Why I did it
Modified fast/warm reboot handling for swss script.

- How I did it
Changes added:
For Fast and warm reboot, do not stop peer and dependent services.
Do not perform service stop for fast/warm reboot.
Clear FAST_REBOOT flag only when it is NOT fast reboot mode.

- How to verify it
With and without this change, the fast-reboot and warm-reboot procedure continue as usual. So there is no immediate disruption to the existing procedure.

- Which release branch to backport (provide reason below if seleted)

  • 201811
  • 201911
  • 202006

- Description for the changelog

- Warm disabled
sudo systemctl stop swss

Jul 29 19:16:54.206439 str-s6100-acs-4 NOTICE root: Stopping swss service...
Jul 29 19:16:54.214536 str-s6100-acs-4 NOTICE root: Locking /tmp/swss-syncd-lock from swss service
Jul 29 19:16:54.226242 str-s6100-acs-4 NOTICE root: Locked /tmp/swss-syncd-lock (10) from swss service
Jul 29 19:16:54.682275 str-s6100-acs-4 NOTICE root: Warm boot flag: swss false.
Jul 29 19:16:54.909508 str-s6100-acs-4 NOTICE root: Fast boot flag: swss false.
Jul 29 19:16:58.202710 str-s6100-acs-4 INFO containerd[1187]: time="2020-07-29T19:16:58.202515714Z" level=info msg="shim reaped" id=6d4e9eaab90f34f37fe2830156f8b5707bbdbdaff6f480dd1658cee7b8109023
Jul 29 19:16:58.214503 str-s6100-acs-4 INFO dockerd[1188]: time="2020-07-29T19:16:58.213577510Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jul 29 19:16:58.618211 str-s6100-acs-4 INFO swss.sh[3191]: 0
Jul 29 19:16:58.618893 str-s6100-acs-4 INFO swss.sh[7529]: swss
Jul 29 19:16:58.628091 str-s6100-acs-4 NOTICE root: Stopped swss service...

sudo systemctl start swss

Jul 29 19:25:04.566701 str-s6100-acs-4 NOTICE root: Starting swss service...
Jul 29 19:25:04.575282 str-s6100-acs-4 NOTICE root: Locking /tmp/swss-syncd-lock from swss service
Jul 29 19:25:04.585707 str-s6100-acs-4 NOTICE root: Locked /tmp/swss-syncd-lock (10) from swss service
Jul 29 19:25:05.489071 str-s6100-acs-4 NOTICE root: Warm boot flag: swss false.
Jul 29 19:25:05.496695 str-s6100-acs-4 NOTICE root: Flushing APP, ASIC, COUNTER, CONFIG, and partial STATE databases ...
Jul 29 19:25:05.689886 str-s6100-acs-4 INFO swss.sh[10035]: OK
Jul 29 19:25:06.619944 str-s6100-acs-4 INFO bgp#bgpcfgd: Delete command is not supported for set src templates
Jul 29 19:25:06.389959 str-s6100-acs-4 INFO swss.sh[10035]: message repeated 3 times: [ OK]
Jul 29 19:25:08.349384 str-s6100-acs-4 INFO swss.sh[10035]: Starting existing swss container with HWSKU Force10-S6100
Jul 29 19:25:08.621046 str-s6100-acs-4 INFO containerd[1187]: time="2020-07-29T19:25:08.620750843Z" level=info msg="shim containerd-shim started" address="/containerd-shim/moby/6d4e9eaab90f34f37fe2830156f8b5707bbdbdaff6f480dd1658cee7b8109023/shim.sock" debug=false pid=10365
Jul 29 19:25:08.791312 str-s6100-acs-4 INFO swss.sh[10035]: swss
Jul 29 19:25:09.232504 str-s6100-acs-4 NOTICE root: Started swss service...

- Warm enabled

sudo systemctl stop swss

Jul 29 19:30:51.797353 str-s6100-acs-4 NOTICE root: Stopping swss service...
Jul 29 19:30:51.804830 str-s6100-acs-4 NOTICE root: Locking /tmp/swss-syncd-lock from swss service
Jul 29 19:30:51.814063 str-s6100-acs-4 NOTICE root: Locked /tmp/swss-syncd-lock (10) from swss service
Jul 29 19:30:52.286197 str-s6100-acs-4 NOTICE root: Warm boot flag: swss true.
Jul 29 19:30:52.525833 str-s6100-acs-4 NOTICE root: Fast boot flag: swss false.
Jul 29 19:30:52.533910 str-s6100-acs-4 NOTICE root: Clearing FAST_REBOOT flag...
Jul 29 19:30:52.769908 str-s6100-acs-4 NOTICE root: Unlocking /tmp/swss-syncd-lock (10) from swss service
Jul 29 19:30:52.787214 str-s6100-acs-4 INFO systemd[1]: Stopped switch state service.

sudo systemctl start swss

Jul 29 19:31:13.709335 str-s6100-acs-4 INFO systemd[1]: Starting switch state service...
Jul 29 19:31:13.719837 str-s6100-acs-4 NOTICE root: Starting swss service...
Jul 29 19:31:13.727581 str-s6100-acs-4 NOTICE root: Locking /tmp/swss-syncd-lock from swss service
Jul 29 19:31:13.736647 str-s6100-acs-4 NOTICE root: Locked /tmp/swss-syncd-lock (10) from swss service
Jul 29 19:31:14.869476 str-s6100-acs-4 NOTICE root: Warm boot flag: swss true.
Jul 29 19:31:16.578414 str-s6100-acs-4 INFO swss.sh[15481]: Starting existing swss container with HWSKU Force10-S6100
Jul 29 19:31:16.653156 str-s6100-acs-4 INFO swss.sh[15481]: swss
Jul 29 19:31:17.127692 str-s6100-acs-4 NOTICE root: Started swss service...

- A picture of a cute animal (not mandatory but encouraged)

@vaibhavhd vaibhavhd requested a review from yxieca July 29, 2020 19:45
@vaibhavhd vaibhavhd merged commit ca462d6 into sonic-net:master Aug 10, 2020
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
* Fast and warm reboot checks for SWSS start and stop path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants