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

Wrong MTU assigned to the docker containers #5194

Open
r3pek opened this issue Jul 20, 2024 · 8 comments
Open

Wrong MTU assigned to the docker containers #5194

r3pek opened this issue Jul 20, 2024 · 8 comments
Labels

Comments

@r3pek
Copy link

r3pek commented Jul 20, 2024

Describe the issue you are experiencing

I recently had to change the MTU on the host adapter (VM) because the interface is running over a VXLAN. That beeing said, no addon has internet connection since the veth interfaces still get configured as 1500 MTU and by the looks of it, there's no way to edit the docker configuration file (/etc/docker/daemon.json) to account for the different MTU.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Change the Host adapter to an MTU lower than 1500 (1450 in my case)
  2. No docker container can talk to the internet

...

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

Just a bunch of error messages complaining about git can't access anything (checking for addon updates)

System Health information

System Information

version core-2024.7.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Europe/Lisbon
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1459
Downloaded Repositories 13
HACS Data ok
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.4
update_channel stable
supervisor_version supervisor-2024.06.2
agent_version 1.6.0
docker_version 26.1.4
disk_total 30.8 GB
disk_used 22.1 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (18.0.0), Studio Code Server (5.15.0), Nextcloud Backup (0.17.7), Node-RED (18.0.4), Matter Server (6.2.1), ESPHome (2024.6.6), Mosquitto broker (6.4.1)
Instituto Português do Mar e Atmosfera (IPMA)
api_endpoint_reachable ok
Dashboards
dashboards 2
resources 5
views 10
mode storage
Recorder
oldest_recorder_run July 23, 2023 at 21:36
current_recorder_run July 20, 2024 at 15:43
estimated_db_size 1667.86 MiB
database_engine mysql
database_version 10.5.22
Spotify
api_endpoint_reachable ok
Xiaomi Miot Auto
component_version 0.7.19
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 2

Supervisor diagnostics

config_entry-hassio-9be3d9d992b1c6c5034faedb044b986d.json

Additional information

I've also reported the same issue here (home-assistant/operating-system#3480), but I'm reporting it here too since I'm not really sure where's the correct place to do it.

@r3pek r3pek added the bug label Jul 20, 2024
@r3pek r3pek changed the title Wrong MTU assinged to the docker containers Wrong MTU assingned to the docker containers Jul 20, 2024
@r3pek r3pek changed the title Wrong MTU assingned to the docker containers Wrong MTU assigned to the docker containers Jul 20, 2024
Copy link

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.

@github-actions github-actions bot added the stale label Aug 19, 2024
@r3pek
Copy link
Author

r3pek commented Aug 19, 2024

Still happens on latest version (2024.8.2)

@github-actions github-actions bot removed the stale label Aug 19, 2024
@agners
Copy link
Member

agners commented Aug 20, 2024

Hm, should Docker maybe handle that more gracefully? If so we should report it upstream to Docker so it automatically sets the MTU correctly. 🤔

Alternatively, we could probably teach Supervisor to set an MTU.

Currently, the HA ecosystem doesn't really deal with MTUs. How did you set the MTU on HAOS in first place? 🤔

@r3pek
Copy link
Author

r3pek commented Aug 20, 2024

@agners

I think the "easy" way would be to just populate the docker config (/etc/docker/daemon.json) with whatever MTU is configured on the interface on bootup. What is not "easy" is figuring out which interface one should monitor (but that can't be done with maybe some simple greps on the route -4n command).

The way I dot it is a 2-step process.

  1. Change the MTU of all veth* interfaces
  2. get a shell inside the supervisor container and change the MTU of the first interface.

I have to do that after every reboot...

EDIT: If you ment how did I change the MTU of the "host" itself, the virtio driver reads that from qemu so the driver already sets the correct MTU on the interface after a bootup (it's running on proxmox)

Copy link

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.

@github-actions github-actions bot added the stale label Sep 19, 2024
@r3pek
Copy link
Author

r3pek commented Sep 19, 2024

No bot, it still happens :)

@github-actions github-actions bot removed the stale label Sep 19, 2024
Copy link

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.

@github-actions github-actions bot added the stale label Oct 19, 2024
@r3pek
Copy link
Author

r3pek commented Oct 21, 2024

No, the issue still isn't solved :)

@github-actions github-actions bot removed the stale label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants