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

problem with network manager "connection.autoconnect-ports: unknown property" #3396

Closed
Stan-Gobien opened this issue May 31, 2024 · 2 comments

Comments

@Stan-Gobien
Copy link

Stan-Gobien commented May 31, 2024

Describe the issue you are experiencing

I'm trying to change the route-metric on the 2 NIC's I have in HomeAssistant because it's using the wrong one as default outgoing route.

Removing the DNS server or the gateway doesn't work in the UI, you can't save without them.
So i'm trying the change route-metric using the nmcli.

However nmcli is broken.
nmcli connection modify "Supervisor enp2s4" ipv4.route-metric 103 Warning: nmcli (1.46.0) and NetworkManager (1.44.2) versions don't match. Restarting NetworkManager is advised. Error: Failed to modify connection 'Supervisor enp2s4': connection.autoconnect-ports: unknown property

For now I have used ha network info to set the gateway address to it's own IP address, that seems to have helped setting the other interface default with a lower/preferred metric.

using nmcli should work and it's broken it seems.

What operating system image do you use?

ova (for Virtual Machines)

What version of Home Assistant Operating System is installed?

12.3

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

Edit any setting using nmcli
For instance nmcli connection modify "Supervisor enp2s4" ipv4.route-metric 103

Warning: nmcli (1.46.0) and NetworkManager (1.44.2) versions don't match. Restarting NetworkManager is advised.
Error: Failed to modify connection 'Supervisor enp2s4': connection.autoconnect-ports: unknown property

Anything in the Supervisor logs that might be useful for us?

Nothing

Anything in the Host logs that might be useful for us?

2024-05-31 23:07:06.159 HomeAssistantSvr-intern NetworkManager[414]: <info>  [1717196826.1594] audit: op="connection-update" uuid="8489e5d7-b972-43bd-86ff-536a6fa0ea23" name="Supervisor enp2s4" result="fail" reason="connection.autoconnect-ports: unknown property"

System information

No response

Additional information

No response

@bangcrash
Copy link

I have come across the same problem while trying to add a VLAN connection to my HA server.
The command that I used is:
nmcli con add type vlan con-name eno1@vlan30 dev eno1 id 30 ip4 10.xx.xx.20/24 ipv4.dns 10.xx.xx.1 gw4 10.xx.xx.1

The error given was:
Warning: nmcli (1.46.0) and NetworkManager (1.44.2) versions don't match. Restarting NetworkManager is advised. Error: Failed to add 'eno1@vlan30' connection: connection.autoconnect-ports: unknown property

I'm running HASSOS 12.3 on an Intel NUC and HA 2024.5.5 with Supervisor 2024.05.1

@sairon sairon added the wontfix label Jun 12, 2024
@sairon
Copy link
Member

sairon commented Jun 12, 2024

The error with the version mismatch is coming from the fact that you're accessing the Network Manager backend from nmcli running in a container, so it's not a surprise the versions don't match. While HAOS has a specific version coming from the latest Buildroot (plus eventually some HAOS modifications), the containers use nmcli from the Alpine Linux repositories. A (very dirty) workaround would be to manually install/compile an older version of the nmcli and use that.

However, using NM directly is something that's rather unsupported and discouraged - now that HAOS has ha network ... commands in the CLI, those should be used instead. In case you're missing any functionality there, please file a feature request for that, as it's the way how we should move forward. Closing this, since it's not an OS issue.

@sairon sairon closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants