Skip to content

Issue 25728: Add vrf ordering dependency to chrony config#25729

Open
anders-nexthop wants to merge 1 commit intosonic-net:masterfrom
nexthop-ai:anders.25728.ntp.chrony-reload-order-fix
Open

Issue 25728: Add vrf ordering dependency to chrony config#25729
anders-nexthop wants to merge 1 commit intosonic-net:masterfrom
nexthop-ai:anders.25728.ntp.chrony-reload-order-fix

Conversation

@anders-nexthop
Copy link
Contributor

@anders-nexthop anders-nexthop commented Feb 27, 2026

When chrony is configured to start in the mgmt vrf, it needs to be ordered after interfaces-config.service, since that's the service that sets up the mgmt vrf.

Closes #25728

Why I did it
NTP/chrony service is not coming up correctly after reboot/reload when configured to start in the mgmt vrf.

How I did it
When being run in the mgmt vrf, chrony needs to wait to start up until the mgmt vrf is created, so add an After dependency in the chrony config override file that waits for the appropriate service to finish (interfaces-config.service).

How to verify it
Manually verified. Configure the device to enable the mgmt vrf and to have ntp configured to use the mgmt vrf. Then issue a reboot or 'config reload'. Without these changes, chrony will come up incorrectly and require a restart to function (this is a race condition, so the exact failure can be different, and it can even work occasionally, but fails pretty consistently). With these changes, reboot/reload work as expected.

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

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

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)

When chrony is configured to start in the mgmt vrf, it needs to be
ordered after interfaces-config.service, since that's the service that
sets up the mgmt vrf.

NTP/chrony service is not coming up correctly after reboot/reload when
configured to start in the mgmt vrf.

When being run in the mgmt vrf, chrony needs to wait to start up until
the mgmt vrf is created, so add an `After` dependency in the chrony
config override file that waits for the appropriate service to finish
(interfaces-config.service).

Manually verified. Configure the device to enable the mgmt vrf and to
have ntp configured to use the mgmt vrf. Then issue a reboot or 'config
reload'. Without these changes, chrony will come up incorrectly and
require a restart to function (this is a race condition, so the exact
failure can be different, and it can even work occasionally, but fails
pretty consistently). With these changes, reboot/reload work as
expected.

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

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

@saiarcot895 this one is a follow up to the chrony bind issue, apologies if you aren't the right person to bug about this!

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.

Bug: chrony not coming up correctly after reload when running in mgmt VRF

2 participants