foreign-sub / ha_fbx

Home assistant VM image for Freebox Delta (arm64)
GNU General Public License v3.0
23 stars 7 forks source link

Issue with network_manager #10

Open ioannispelelis opened 9 months ago

ioannispelelis commented 9 months ago

Describe the bug When installing a fresh image of ha_fbx there is an issue with network_manager As such we are getting errors in supervisor 23-09-20 22:10:11 WARNING (MainThread) [supervisor.resolution.evaluations.base] NetworkManager is not correctly configured (more-info: https://www.home-assistant.io/more-info/unsupported/network_manager) image

Also it seems that because of this installing addons is not possible because HA thinks there is no internet image

To Reproduce Steps to reproduce the behavior:

  1. install fresh vm on freebox delta with 2023.8.4 or 2023.9.2 (tried on both)
  2. login to http://hafbx.local:4357/ and you will see two errors in supervisor
  3. one for jobs that can be fixed relatively easily by following this https://www.home-assistant.io/more-info/unsupported/job_conditions
  4. And another for network_manager
  5. After that restoring my backups did not work correctly as at some point it must think it does not have internet and it fails to downloads all the addons

Expected behavior NetworkManager should work normally and HA should be able to connect to internet to download addons

I am unable to restore my HomeAssistant to it's normal operation because of this. How can it be fixed? unable to install SSH plugin, or MariaDB, or Samba Share...

ioannispelelis commented 9 months ago

After at least 3 different installs and restores each time same problem. I scratched my head a few days on this until i found out that for some reason NetworkManager would only manage loopback interface. image

So i forced it to manage the ethernet interface image

restarted supervisor and now everything is in the green image

And i can again install and use addons that require network/internet connection.

Do not know however why on each installation attempt of the image the installation would not manage ethernet in NetworkManager First time it happens to me after at least a dozen installations of ha_fbx image... Maybe some bug in the installation cloud ini script?

ioannispelelis commented 8 months ago

it looks like the workaround i explained above is non persistent. after a reboot/shutdown of the VM i have to redo it..

fthiery commented 6 months ago

Reproduced on hafbx-debian-2023.11.3

I'm not sure if that's expected, but systemd-networkd is also running on the VM; tried masking it, just lost network after the next boot.

# nmcli connection show
NAME               UUID                                  TYPE      DEVICE 
lo                 cfc37435-7fa4-4f56-80e8-09589b1e4d1e  loopback  lo     
Supervisor enp0s3  6080cc15-2ad5-3117-b3bb-c9361b827dea  ethernet  --     

To enable it (aka the workaround):

nmcli con up 6080cc15-2ad5-3117-b3bb-c9361b827dea

I tried many things to fix this, including the following: no joy

nmcli con mod 6080cc15-2ad5-3117-b3bb-c9361b827dea connection.autoconnect yes
fthiery commented 6 months ago

I have done an "automated" workaround (ugly) until someone figures out why NetworkManager is skipping the VM network interface:

$ cat /etc/systemd/system/fix-networkmanager.service 
[Unit]
After=network.target

[Service]
ExecStart=nmcli con up 6080cc15-2ad5-3117-b3bb-c9361b827dea

[Install]
WantedBy=multi-user.target

$ systemctl daemon-reload
$ systemctl enable fix-networkmanager.service 
ioannispelelis commented 1 month ago

I have done an "automated" workaround (ugly) until someone figures out why NetworkManager is skipping the VM network interface:

$ cat /etc/systemd/system/fix-networkmanager.service 
[Unit]
After=network.target

[Service]
ExecStart=nmcli con up 6080cc15-2ad5-3117-b3bb-c9361b827dea

[Install]
WantedBy=multi-user.target

$ systemctl daemon-reload
$ systemctl enable fix-networkmanager.service 

Thanks this workaround worked. But it would be nice that this issue is fixed. i just reinstalled the latested build of hafbx-debian-2024.5.3 and again the same issue with the network manager. @foreign-sub any ideas?