UnraidUnraid
Unraid OS Prerelease (Bugs & Feedback)

[7.3.0-beta.1] Containers start with random mac

Hello.

tl;dr is “Unraid doesn't respect my --mac-address= at docker service start or reboot.”

I am running 7.3.0-beta.1 and I am seeing some weird behavior with my docker containers. I use macvlan (bond and bridge off) and the Network type: custom : eth0 with fixed IPs (outside dhcp range) for about 30 containers because I want to keep track of them and their stats in my router. I set names for all containers (in the router and it matches by mac). Also for things like AdGuard Home/pihole etc to be able to read correct hostnames of clients.

The problem is that every time I restart the docker service or reboot the server, all my containers get new, random MAC addresses. This leaves a massive list of offline ghost devices in my router. I have tried adding --mac-address="02:42:xx:xx:xx:xx" to the extra parameters, but it seems to be completely ignored during the initial startup. The only way to get the container to actually use my defined MAC is to make a dummy change in the template and hit apply. Then it works (and the router thinks two different macs using the same ip for a while, doh), until the next Unraid reboot or docker service restart (and it adds ~30 more random macs without my set names).

On stable they at least kept the Mac-addresses they got so no flood of random macs in router tables and so on.

I also noticed these lines in my syslog for every container:

Mar 22 05:05:32 Server rc.docker: container <snip> has an additional network that will be restored: IP

Do we have a network called “IP” now or should it print some var? It feels like the new restoration logic in rc.docker is stepping on the toes of the extra parameters.

Is this a bug or am I missing something in the new config? I can send diagnostics on demand (not public, please). :)

Thanks!

Docker custom network type:

macvlan

Host access to custom networks:

Enabled

Preserve user defined networks:

No (Yes or No doesn't matter here)

Enable bonding:

No

Enable bridging:

No

(why eth0 and not br0, that changed back in time when we had trouble with call traces from macvlan, don’t remember all fixes and workarounds we did then but at some point it changed from br0 to eth0 but it has worked great since)

  1. In Review
  2. Planned
  3. In Progress
  4. Completed
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...