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

[interfaces-config] use systemd unit properties to configure dependen… #84

Closed
wants to merge 1 commit into from

Conversation

stepanblyschak
Copy link
Owner

…cy for networking service

When switch boots up it is possible that networking service starts first before interfaces-config and brings eth0 up. For this case there is a syncrhonization mechanism implemented in interfaces-config.sh that will wait for networking service to finish and bring eth0 down and then restart networking service unconditionally at the end. This method works but takes more time for service to become started and blocks swss, teamd, bgp services which delays the restoration for fast and warm boot. The ideal order is: interfaces-config starts first at boot, generates /etc/network/interfaces and then systemd starts networking service. In case of "systemctl restart interfaces-config" systemd brings networking service down, restarts interfaces-config and starts networking service again.

Signed-off-by: Stepan Blyschak stepanb@nvidia.com

Why I did it

To optimize boot sequence

How I did it

Put a dependency configuration in interfaces-config.service file

How to verify it

Boot switch with no MGMT_INTERFACE table, verify we get mgmt IP from dhcp.
Boot with MGMT_INTERFACE config, verify we get mgmt IP set statically.
Restart interfaces-config.sh, verify mgmt interface is configured properly.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for 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

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

…cy for networking service

When switch boots up it is possible that networking service starts first
before interfaces-config and brings eth0 up. For this case there is a
syncrhonization mechanism implemented in interfaces-config.sh that will
wait for networking service to finish and bring eth0 down and then
restart networking service unconditionally at the end. This method works
but takes more time for service to become started and blocks swss,
teamd, bgp services which delays the restoration for fast and warm boot.
The ideal order is: interfaces-config starts first at boot, generates
/etc/network/interfaces and then systemd starts networking service. In
case of "systemctl restart interfaces-config" systemd brings networking
service down, restarts interfaces-config and starts networking service
again.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
stepanblyschak pushed a commit that referenced this pull request Dec 5, 2023
…utomatically (sonic-net#17371)

#### Why I did it
src/sonic-host-services
```
* e8ae2af - (HEAD -> master, origin/master, origin/HEAD) [featured]: Add database services for DPU (#84) (24 hours ago) [Ze Gan]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

1 participant