home-assistant / supervised-installer

Installer for a generic Linux system
Apache License 2.0
1.7k stars 583 forks source link

Leaving network interface and resolved configuration to the system #364

Open Yayg opened 4 months ago

Yayg commented 4 months ago

Hi,

First thanks for maintaining this package which is really helpful for custom installation. I have a proposal here because I ran into the same problems as people in issues:

Thus the proposal is to leave network interface and resolved configuration to the system administrator. Now that being said most of this configuration is handled by Debian installer so it should not be a problem for anyone.

Sincerely

home-assistant[bot] commented 4 months ago

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

agners commented 3 months ago

We do mention that systemd-resolved must be installed in the README, so this commands should work in general. Also, systemd-resolved is mandatory for Supervisor, as the DNS plug-in uses it to resolve things via mDNS for the Core/Supervisor/Add-ons etc.

But if we can get rid of unnecessary interference, I am not against it. Is installing systemd-resolved automatically enabling it on Debian 12, so that manually enabling it no longer necessary?

Yayg commented 3 months ago

We do mention that systemd-resolved must be installed in the README, so this commands should work in general. Also, systemd-resolved is mandatory for Supervisor, as the DNS plug-in uses it to resolve things via mDNS for the Core/Supervisor/Add-ons etc.

Systemd-resolved is installed and the configuration should not be directly changed because it will conflict with the maintainer's default. Also it creates situations where the URL becomes unresolved because the configuration given is not correct ATM.

But if we can get rid of unnecessary interference, I am not against it. Is installing systemd-resolved automatically enabling it on Debian 12, so that manually enabling it no longer necessary?

Yes the necessary is already there in the base package. Also, as you mentioned, it is explicitly said in the supervised guide to install the dependencies, so I guess leave it all to the system is the best way to go.

Same for interfaces config, they broke the network for me.

ikifar2012 commented 3 months ago

While I do agree the NetworkManager config has caused issues in some scenarios and I am looking into possible solutions to that, I do not think removing systemd-resolved is necessary

Yayg commented 3 months ago

While I do agree the NetworkManager config has caused issues in some scenarios and I am looking into possible solutions to that, I do not think removing systemd-resolved is necessary

As seen and detailed in https://github.com/home-assistant/supervised-installer/issues/339 systemd-resolved is problematic with the same consequences.

Depending on the network setup the user may have to specify manually in the configuration it's internal DNS.

Moreover, any reinstallation of the package wipes the configuration handwritten if necessary.

Yayg commented 3 months ago

Btw, if any configuration should be added by HA or it should be in etc/systemd/resolved.conf.d/. Not directly in the main configuration file.

litinoveweedle commented 2 months ago

Depending on the network setup the user may have to specify manually in the configuration it's internal DNS.

Moreover, any reinstallation of the package wipes the configuration handwritten if necessary.

I can confirm this, I reported also in #374. During each package upgrade, install or re-install my DNS setting are lost and manual recovery is required. At least now I already know what to do, as for few first times I had to go through systemd DNS implementation rabbit hole. Again my understanding is, that supervised is for skilled admin users, who probably already have working system setup including networking and can maintain it (if the decide even without NetworkManager).