Skip to content

Set the RTC from the system time after NTP sync during deploy-mg#12212

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
wangxin:set-hwclock
Mar 28, 2024
Merged

Set the RTC from the system time after NTP sync during deploy-mg#12212
StormLiangMS merged 1 commit intosonic-net:masterfrom
wangxin:set-hwclock

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Mar 28, 2024

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

SONiC currently does not support NTP long jump. In case there is a big difference between RTC and NTP server's time, the NTP service may long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time to NTP server. However, during tests, the DUT may be power-cycled. After power cycle, RTC time will be used as system time. In case the difference between RTC and NTP server is too big, the system time of DUT may be inaccurate because NTP long jump is not supported yet.

How did you do it?

This change added a step to set system time to RTC after system time is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server won't be too big after DUT is power-cycled.

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

SONiC currently does not support NTP long jump. In case there is a big
difference between RTC and NTP server's time, the NTP service may
long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time
to NTP server. However, during tests, the DUT may be power-cycled.
After power cycle, RTC time will be used as system time. In case the
difference between RTC and NTP server is too big, the system time
of DUT may be inaccurate because NTP long jump is not supported yet.

This change added a step to set system time to RTC after system time
is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server
won't be too big after DUT is power-cycled.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin requested a review from lizhijianrd March 28, 2024 05:18
Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS StormLiangMS merged commit 14f334f into sonic-net:master Mar 28, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 28, 2024
…ic-net#12212)

SONiC currently does not support NTP long jump. In case there is a big
difference between RTC and NTP server's time, the NTP service may
long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time
to NTP server. However, during tests, the DUT may be power-cycled.
After power cycle, RTC time will be used as system time. In case the
difference between RTC and NTP server is too big, the system time
of DUT may be inaccurate because NTP long jump is not supported yet.

This change added a step to set system time to RTC after system time
is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server
won't be too big after DUT is power-cycled.

Signed-off-by: Xin Wang <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 28, 2024
…ic-net#12212)

SONiC currently does not support NTP long jump. In case there is a big
difference between RTC and NTP server's time, the NTP service may
long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time
to NTP server. However, during tests, the DUT may be power-cycled.
After power cycle, RTC time will be used as system time. In case the
difference between RTC and NTP server is too big, the system time
of DUT may be inaccurate because NTP long jump is not supported yet.

This change added a step to set system time to RTC after system time
is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server
won't be too big after DUT is power-cycled.

Signed-off-by: Xin Wang <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202305: #12217

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #12218

mssonicbld pushed a commit that referenced this pull request Mar 28, 2024
)

SONiC currently does not support NTP long jump. In case there is a big
difference between RTC and NTP server's time, the NTP service may
long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time
to NTP server. However, during tests, the DUT may be power-cycled.
After power cycle, RTC time will be used as system time. In case the
difference between RTC and NTP server is too big, the system time
of DUT may be inaccurate because NTP long jump is not supported yet.

This change added a step to set system time to RTC after system time
is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server
won't be too big after DUT is power-cycled.

Signed-off-by: Xin Wang <[email protected]>
mssonicbld pushed a commit that referenced this pull request Mar 28, 2024
)

SONiC currently does not support NTP long jump. In case there is a big
difference between RTC and NTP server's time, the NTP service may
long time to have system time synched with NTP server.

During deploy-mg, there are steps to force sync DUT's system time
to NTP server. However, during tests, the DUT may be power-cycled.
After power cycle, RTC time will be used as system time. In case the
difference between RTC and NTP server is too big, the system time
of DUT may be inaccurate because NTP long jump is not supported yet.

This change added a step to set system time to RTC after system time
is force synched with NTP server during deploy minigraph.

With this change, the time difference between DUT and NTP server
won't be too big after DUT is power-cycled.

Signed-off-by: Xin Wang <[email protected]>
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.

5 participants