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

[Smartswitch] Fix time format for dpu states #583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gpunathilell
Copy link
Contributor

@gpunathilell gpunathilell commented Jan 9, 2025

Description

Currently the time format being updated by the DPU and Switch are not aligned, this PR takes the common format from the HLD for all 3 states - midplane state, controlplane state and dataplane state
This also fixes the issue where the local time was represented incorrectly as UTC time

Motivation and Context

Current format:

Name    Oper-Status     State-Detail             State-Value    Time                             Reason
------  --------------  -----------------------  -------------  -------------------------------  --------
DPU0    Partial Online  dpu_midplane_link_state  up             Wed Jan 15 12:17:44 PM UTC 2025
                        dpu_control_plane_state  up             2024-11-25 04:32:45
                        dpu_data_plane_state     down           2024-11-25 04:32:45

After fix:

Name    Oper-Status     State-Detail             State-Value    Time                             Reason
------  --------------  -----------------------  -------------  -------------------------------  --------
DPU0    Partial Online  dpu_midplane_link_state  up             Wed Jan 15 12:17:44 PM UTC 2025
                        dpu_control_plane_state  up             Wed Jan 15 12:09:44 PM UTC 2025
                        dpu_data_plane_state     down           Wed Jan 15 12:09:44 PM UTC 2025

How Has This Been Tested?

Additional Information (Optional)

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Pull request is closed

@gpunathilell gpunathilell reopened this Jan 15, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gpunathilell gpunathilell changed the title [Smartswitch] Fix time format [Smartswitch] Fix time format for dpu states Jan 15, 2025
@gpunathilell
Copy link
Contributor Author

@rameshraghupathy @vvolam
Please review

Copy link

@vvolam vvolam left a comment

Choose a reason for hiding this comment

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

@gpunathilell Looks good to me.

Can we have a test case where we can check the time format for all states is same UTC?

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.

4 participants