Skip to content

[Arista SKUs] Use more generic JSON reboot cause extra info file#22638

Merged
rlhui merged 1 commit intosonic-net:masterfrom
ymd-arista:greboot_update
Aug 13, 2025
Merged

[Arista SKUs] Use more generic JSON reboot cause extra info file#22638
rlhui merged 1 commit intosonic-net:masterfrom
ymd-arista:greboot_update

Conversation

@ymd-arista
Copy link
Contributor

Use a more structured file format to hold reboot cause information.
Also match the cause and user to that used in the tests.

Why I did it

During design discussion, it was pointed out that having a file with no schema to
hold the reboot cause info is a bad idea. This patch addresses that change.

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202405

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ymd-arista
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ymd-arista
Copy link
Contributor Author

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 22638 in repo sonic-net/sonic-buildimage

arlakshm added a commit to Azure/sonic-buildimage-msft that referenced this pull request May 28, 2025
<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it

- rpc: api: Create flag file on linecard during reboot via supervisor
- uart: Assign timer function prior to starting the timer


##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it

Updated both submodules to update the driver code.

#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

Note that sonic-net/sonic-buildimage#22638 is also required for this
functionality to work.

1. Boot the image onto an Arista T2 chassis.
2. Reboot the supervisor via the `reboot` CLI utility.
3. Log into a linecard and verify that the reboot cause shows "Reboot
from Supervisor".
@arlakshm arlakshm requested a review from liamkearney-msft June 4, 2025 22:49
@liamkearney-msft
Copy link
Contributor

is there a companion PR for this that you could link here?

@ymd-arista
Copy link
Contributor Author

@liamkearney-msft : This is a single PR and it's not part of an umbrella PR.

@liamkearney-msft
Copy link
Contributor

@ymd-arista in that case, who / what is populating reboot-extra-info.json ? is this existing functionality ?
i dont see where in this PR this is being done :

During design discussion, it was pointed out that having a file with no schema to hold the reboot cause info is a bad idea. This patch addresses that change.

@ymd-arista
Copy link
Contributor Author

ymd-arista commented Jun 10, 2025

@liamkearney-msft : Ah, I see the confusion.

We populate that file in our platform library, specifically here: https://github.com/aristanetworks/sonic/blob/master/arista/utils/rpc/api.py#L224. These changes were integrated with #22539.

@liamkearney-msft
Copy link
Contributor

ah - excellent. thanks @ymd-arista !

@ymd-arista
Copy link
Contributor Author

ymd-arista commented Jul 14, 2025

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 22638 in repo sonic-net/sonic-buildimage

@ymd-arista
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@judyjoseph
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ymd-arista
Copy link
Contributor Author

ymd-arista commented Jul 15, 2025

First 3 PR checks seems to be failing due to sonic-net/sonic-mgmt#19263 based on this comment.

Remaining PR checks were not triggered again after May 19.

Use a more structured file format to hold reboot cause information.
Also match the cause and user to that used in the tests.

Signed-off-by: Mohan Yelugoti <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ymd-arista
Copy link
Contributor Author

@judyjoseph : To clarify some questions from the Chassis meeting, this only affects Chassis systems not fixed box ones. As this json meta data file is only created on LCs by supervisor on Chassis systems.

@abdosi
Copy link
Contributor

abdosi commented Jul 23, 2025

@rlhui : can you help merge this

@deepak-singhal0408
Copy link
Contributor

@yxieca could you help merge this PR.. thanks,

@rlhui rlhui merged commit d506eab into sonic-net:master Aug 13, 2025
20 checks passed
ccroy-arista pushed a commit to ccroy-arista/sonic-buildimage that referenced this pull request Aug 14, 2025
Use a more structured file format to hold reboot cause information.
Also match the cause and user to that used in the tests.

Signed-off-by: Mohan Yelugoti <[email protected]>
arlakshm pushed a commit to Azure/sonic-buildimage-msft that referenced this pull request Sep 18, 2025
Use a more structured file format to hold reboot cause information.
Also match the cause and user to that used in the tests.

Cherry picking changes from
sonic-net/sonic-buildimage#22638

<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it

During design discussion, it was pointed out that having a file with no
schema to
hold the reboot cause info is a bad idea. This patch addresses that
change.

##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it

#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->

<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

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

Signed-off-by: Mohan Yelugoti <[email protected]>
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Dec 4, 2025
Use a more structured file format to hold reboot cause information.
Also match the cause and user to that used in the tests.

Signed-off-by: Mohan Yelugoti <[email protected]>
Signed-off-by: Feng Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants