home-assistant / architecture

Repo to discuss Home Assistant architecture
315 stars 99 forks source link

ADR 14 - NetworkManager not to be actively used #403

Closed borpin closed 4 years ago

borpin commented 4 years ago

Context

ADR 14 states that

"NetworkManager is installed but not actively used."

Some add-ons (AdGuard for one) requires a fixed IP. As far as I am aware, the only way to achieve that is via NetworkManager.

It is also at odds with this documentation.

https://github.com/home-assistant/operating-system/blob/dev/Documentation/network.md#static-ip

Proposal

The restriction is modified to be that "NetworkManager is installed but not actively used other than to set a Fixed IP & Gateway and Static DNS."

Consequences

Honestly, I don't know, I just know that the install instructions for the add-on are now contradicted by the ADR.

frenck commented 4 years ago

ADR-0014 is about the Supervised installation method, your documentation links to the OS method (using HassOS). That is a miss-match and doesn't belong together.

In your AdGuard example, it indeed needs a static IP, however, if one actively uses something other than the Network Manager? For example, Netplan?

borpin commented 4 years ago

Hi @frenck, that page is the page the addon links to in order to meet the requirements of the addon i.e. have a fixed IP. I was just putting forward where, overall, the HA documentation is not 100% consistent.

Is there any reason not to allow the use of NetworkManager to set an underlying Fixed IP etc? one of the pages of my wee blog that gets hit the most is how to set a Fixed IP in HA.

As it stands, the AdGuard addon could not be used in a Supervised install without breaking the rules of the ADR.

If NetPlan is the mechanism to be used (never done so myself), then that could be added to the ADR as an adjunct to not using NetworkManager and also the documentation for the addon be updated to match.

frenck commented 4 years ago

So a couple of things:

A) The add-on you are referring to, is a third-party add-on to Home Assistant. While I am the creator of the AdGuard add-on, it is not part of Home Assistant. Documentation improvement PRs are welcome.

B) There is still an installation type mismatch in the issue you are raising, so I'm still confused on your issue.

C) We don't disallow the use of the network manager?

As it stands, the AdGuard addon could not be used in a Supervised install without breaking the rules of the ADR.

? That is incorrect?

If NetPlan is the mechanism to be used (never done so myself), then that could be added to the ADR as an adjunct to not using NetworkManager and also the documentation for the addon be updated to match.

The ADR for the Supervisor installation method states it needs the network manager to serve the Supervisor, however, it doesn't have to be actively used. I'm not sure how that sentence fit in this issue.

All in all, I'm not sure what the issue is. I feel like you are mixing things up, making this issue invalid at this point.

borpin commented 4 years ago

The issue is that currently it appears that the HA documented way of setting a Fixed IP (for what ever reason) is to use NetworkManager. This is specifically prevented by the ADR (or have I missed something)?

frenck commented 4 years ago

The documentation for that specific (third-party) add-on is aimed at Home Assistant OS (which is ADR-0015, not ADR-0014)...

borpin commented 4 years ago

Ok, but first, that (the docs are for HAOS only) needs to be clear in the addon documentation (it isn't). On this basis AdGuard is currently excluded from being installed for the above reason (ADR-14 states NetworkManager is not to be actively used therefore a fixed IP and DNS cannot be set therefore the addon cannot be used).

I'd also point out that if using networkManager on HAOS (ADR-15) is allowed, then why is it excluded from Supervised (ADR-14)? Having checked, there is no restriction in ADR-15 on a user modifying the network settings in NetworkManager using nmcli. In fact the documentation tells you how to do it.

I'd be happy with an alternative to using NetworkManager like NetPlan (looks interesting), but the installation of Netplan needs to either be part of the install process or be specifically allowed in the ADR.

Cheers

frenck commented 4 years ago

Again, that add-on is third-party... So not a Home Assistant project concern.

The OS method (ADR-0015) ships with only the network manager. Which is fine.

The Supervisor method (ADR-0014) does not have that restriction, it is a more advanced method, which expects the end-user to have expertise in networking.

borpin commented 4 years ago

But @frenk, you are missing the point, if NetworkManager is installed and can be modified by the user in a system installed under ADR-0015, why is that option specificaly excluded from ADR-0014?

Ignore the addon for the moment.

Is a user allowed to use NetworkManager to set a fixed IP in

  1. HA OS installed under ADR-0015 conditions
  2. HA Supervised under ADR-0014 conditions
frenck commented 4 years ago

It is not excluded in ARD-0014. It is required to have installed. It doesn't need to be used actively. That is up to the user.

borpin commented 4 years ago

It doesn't need to be used actively. That is up to the user.

The ADR-0014 specifically excludes a user from actively using it.

"NetworkManager is installed but not actively used."

frenck commented 4 years ago

Right, I get it. That could need an adjustment, agreed.

borpin commented 4 years ago

Brilliant! many thanks for your patience 😄