[interfaces-config] use systemd unit properties to configure dependen… #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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)
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)