Supervisord crashes when a second network interface has no gateway
The problem
The problem is rather simple: Supervisord assumes that every network interface will have a set of an IP+CIDR and a gateway address. This is a flawed assumption, as with multiple network cards realistically only the primary one should have a default route gateway.
Attempting to save a config like following, with the enp6s18 being set to DHCP:

Results in an error:

What version of Home Assistant Core has the issue?
2023.2.2
What was the last working version of Home Assistant Core?
N/A
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Supervisord itself
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
I isolated the problem to this exception, produced in the supervisord container:
Additional information
Putting a gateway on that second card seems to solve the issue. However, I'm not sure if it will not cause problems down the line as generally I don't want a gateway on that card.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still broken.
Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of hassio can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign hassioRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
hassio documentation hassio source (message by IssueLinks)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is reproducible on Supervisor 2023.08.1. It seems that also the frontend behaves a bit weird: At times the settings cannot be saved even though changes have been made.
Can confirm, still broken. As a temporary workaround, I could set the gateway to the IP that I assigned to this interface; i.e. referring to itself as gateway. AFAIK, this should work with the underlying logic of routing in Linux. But it would be great if this could be fixed.