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

[SONiC Application Extension] support warm/fast reboot for extension packages #7286

Merged
merged 35 commits into from
Jul 11, 2021

Conversation

stepanblyschak
Copy link
Collaborator

Why I did it

I made this change to support warm/fast reboot for SONiC extension packages as per HLD sonic-net/SONiC#682.

How I did it

I extended manifest.json.j2 with new warm/fast reboot related fields and also extended sonic_debian_extension.j2 script template to generate the shutdown order files for warm and fast reboot.

How to verify it

There is an open example extension I pushed to Docker Hub stepanblischak/cpu-report:warm.
It can be installed on the switch:

admin@sonic:~$ sudo sonic-package-manager show package manifest --from-repository stepanblischak/cpu-report:warm | grep warm -A 6
        "warm-shutdown": {
            "after": [
                "swss"
            ],
            "before": [
                "syncd"
            ]
admin@sonic;~$ sudo sonic-package-manager install --from-repository stepanblischak/cpu-report:warm -y -v DEBUG

Then perform warm-reboot and observe that cpu-report is stopped at the right place in shutdown sequence:

admin@sonic:~$ sudo warm-reboot -v
sudo warm-reboot -v
Wed 31 Mar 2021 12:54:10 PM UTC Saving counters folder before warmboot...
Wed 31 Mar 2021 12:54:13 PM UTC Prepare MLNX ASIC to fastfast-reboot: install new FW if required
Wed 31 Mar 2021 12:54:15 PM UTC Pausing orchagent ...
Wed 31 Mar 2021 12:54:15 PM UTC Collecting logs to check ssd health before fastfast-reboot...
Wed 31 Mar 2021 12:54:15 PM UTC Stopping lldp ...
Wed 31 Mar 2021 12:54:17 PM UTC Stopped lldp
Wed 31 Mar 2021 12:54:17 PM UTC Stopping nat ...
Dumping conntrack entries failed
Wed 31 Mar 2021 12:54:18 PM UTC Stopped nat
Wed 31 Mar 2021 12:54:18 PM UTC Stopping radv ...
Wed 31 Mar 2021 12:54:18 PM UTC Stopped radv
Wed 31 Mar 2021 12:54:18 PM UTC Stopping sflow ...
Wed 31 Mar 2021 12:54:18 PM UTC Stopped sflow
Wed 31 Mar 2021 12:54:18 PM UTC Stopping bgp ...
Wed 31 Mar 2021 12:54:22 PM UTC Stopped bgp
Wed 31 Mar 2021 12:54:22 PM UTC Stopping swss ...
Wed 31 Mar 2021 12:54:31 PM UTC Stopped swss
Wed 31 Mar 2021 12:54:31 PM UTC Initialize pre-shutdown ...
Wed 31 Mar 2021 12:54:31 PM UTC Requesting pre-shutdown ...
Wed 31 Mar 2021 12:54:32 PM UTC Waiting for pre-shutdown ...
Wed 31 Mar 2021 12:54:41 PM UTC Pre-shutdown succeeded, state: pre-shutdown-succeeded ...
Wed 31 Mar 2021 12:54:41 PM UTC Backing up database ...
Wed 31 Mar 2021 12:54:41 PM UTC Stopping cpu-report...
Wed 31 Mar 2021 12:54:41 PM UTC Stopped cpu-report
Wed 31 Mar 2021 12:54:41 PM UTC Stopping teamd ...
Wed 31 Mar 2021 12:54:48 PM UTC Stopped teamd
Wed 31 Mar 2021 12:54:48 PM UTC Stopping syncd ...
Wed 31 Mar 2021 12:54:51 PM UTC Stopped syncd
Wed 31 Mar 2021 12:54:51 PM UTC Stopping all remaining containers ...
Wed 31 Mar 2021 12:54:53 PM UTC Stopped all remaining containers ...
Wed 31 Mar 2021 12:54:55 PM UTC Enabling Watchdog before fastfast-reboot
Watchdog armed for 180 seconds
Wed 31 Mar 2021 12:54:56 PM UTC Rebooting with /sbin/kexec -e to SONiC-OS-master.0-ae9ccf39 ...

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

Support warm/fast reboot for SONiC extension packages

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

stepanblyschak and others added 30 commits November 16, 2020 22:27
Previously all docker images built into SONiC binary were tagged with
SONiC version string. With the introduction of container upgrades and
SONiC extension framework all docker images should have their own
version numbers that do not relate with SONiC version. All dockers are
tagged with version 1.0.0 in this PR. Whenever changes are introduced to
a docker image that require a version change, the docker image
maintainer should update the version number.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Previously all docker images built into SONiC binary were tagged with
SONiC version string. With the introduction of container upgrades and
SONiC extension framework all docker images should have their own
version numbers that do not relate with SONiC version. All dockers are
tagged with version 1.0.0 in this PR. Whenever changes are introduced to
a docker image that require a version change, the docker image
maintainer should update the version number.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
…rs_manifest

Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
…rs_version_tags

Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
…rs_manifest

Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
…c-buildimage into dockers_manifest

Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
…rs_manifest

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
…ildimage into dockers_manifest

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@renukamanavalan
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Pull request contains merge conflicts.

…2_warm

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Collaborator Author

Build fails as requires sonic-net/sonic-utilities#1554 to be first in.

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 3a2b8c6 into sonic-net:master Jul 11, 2021
judyjoseph pushed a commit that referenced this pull request Aug 7, 2021
…packages (#7286)

#### Why I did it

I made this change to support warm/fast reboot for SONiC extension packages as per HLD sonic-net/SONiC#682.

#### How I did it

I extended manifest.json.j2 with new warm/fast reboot related fields and also extended sonic_debian_extension.j2 script template to generate the shutdown order files for warm and fast reboot.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…packages (sonic-net#7286)

#### Why I did it

I made this change to support warm/fast reboot for SONiC extension packages as per HLD sonic-net/SONiC#682.

#### How I did it

I extended manifest.json.j2 with new warm/fast reboot related fields and also extended sonic_debian_extension.j2 script template to generate the shutdown order files for warm and fast reboot.
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.

6 participants