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

[201811][interfaces-config.sh] Force lo interface down #4149

Merged
merged 1 commit into from
Feb 14, 2020
Merged

[201811][interfaces-config.sh] Force lo interface down #4149

merged 1 commit into from
Feb 14, 2020

Conversation

jleveque
Copy link
Contributor

- What I did
Force "lo" interface down in interfaces-config.sh to prevent interface-config.service from failing with the following error:

-- The result is failed.
systemd[1]: networking.service: Unit entered failed state.
systemd[1]: networking.service: Failed with result 'exit-code'.
interfaces-config.sh[29232]: Job for networking.service failed because the control process exited with error code.
interfaces-config.sh[29232]: See "systemctl status networking.service" and "journalctl -xe" for details.
interfaces-config.sh[29232]: ifdown: interface lo not configured
interfaces-config.sh[29232]: RTNETLINK answers: File exists
interfaces-config.sh[29232]: ifup: failed to bring up lo
systemd[1]: interfaces-config.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Update interfaces configuration.
-- Subject: Unit interfaces-config.service has failed

Failure to bring down the interface will result in a failure to subsequently bring the interface back up.

- How I did it
Add --force flag

- How to verify it
Repeatedly test that systemctl restart interfaces-config.service doesn't fail to bring down the lo interface.

@yxieca
Copy link
Contributor

yxieca commented Feb 13, 2020

Why do we only need this change for 201811 branch? What is the plan for other branches?

Never mind, found the answer in the related PR.

@jleveque
Copy link
Contributor Author

Retest broadcom please

@lguohan lguohan merged commit 4af3e50 into sonic-net:201811 Feb 14, 2020
@jleveque jleveque deleted the force_lo_down_201811 branch February 14, 2020 17:56
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Feb 9, 2021
Force "lo" interface down in interfaces-config.sh to prevent interface-config.service from failing with the following error:

```
-- The result is failed.
systemd[1]: networking.service: Unit entered failed state.
systemd[1]: networking.service: Failed with result 'exit-code'.
interfaces-config.sh[29232]: Job for networking.service failed because the control process exited with error code.
interfaces-config.sh[29232]: See "systemctl status networking.service" and "journalctl -xe" for details.
interfaces-config.sh[29232]: ifdown: interface lo not configured
interfaces-config.sh[29232]: RTNETLINK answers: File exists
interfaces-config.sh[29232]: ifup: failed to bring up lo
systemd[1]: interfaces-config.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Update interfaces configuration.
-- Subject: Unit interfaces-config.service has failed
```

Failure to bring down the interface will result in a failure to subsequently bring the interface back up.
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.

4 participants