Ok, this one has me stumped.
I have OpenWRT v24.10.0-rc2 on x86_64, I installed docker w/ opkg install luci-app-dockerman
and then successfully loaded and configured my docker container. All is well on that side.
The issue I'm having is that I noticed my snmpd client application acted like the server (OpenWRT) stopped responding. I rebooted OpenWRT, still broken. I shutdown my docker container, restarted snmpd, and it works fine. I start my docker container, and it stops working.
For reference, I have snmpd, not mini_snmpd. Can anyone think of why this might be? I am stumped here.
EDIT: some more info, I have been looking into it further, I installed mini_snmpd and it seems to work OK w/ the docker container running, however I can't seem to get it to give info about my RNDIS eth1 adapter. The config file says to use the UCI name and when I do, all interfaces no longer work in my client.
FINAL EDIT:
After playing around a bit, I discovered that my client would break if the interfaces were labeled as having speeds > 1Gbps. The virtual interfaces docker0 and vethxxxxxxx were both coming through as 10Gbps. This is why the docker container broke my SNMP client. The fix, through crude was the following:
Edit /etc/init.d/snmpd and add the following line in the iface for-loop:
for iface in $(ls /sys/class/net 2>/dev/null); do
echo interface "$iface" 6 0 >> $CONFIGFILE
procd_append_param netdev "$iface"
done
This makes snmpd set all known interfaces to 0Mbps on startup. Recall that vethxxxxxxx is dynamic and changes each time a docker container launches, so we can't just add one static interface to the $CONFIGFILE and be done w/ it.
Next write a custom hotplug.d script to restart snmpd anytime a vethxxxxxxx interface is added.
Create /etc/hotplug.d/net/99-snmp-fix
#!/bin/sh
[ "$ACTION" = add ] && {
isRight=$(echo $DEVICENAME | grep -c "veth")
If [ isRight > 0 ] {
sleep 5
/etc/init.d/snmpd restart
}
}
This makes snmpd restart when the vethxxxxxxx interface is added on docker container start.
Like I say, it's crude, but it's working... docker may have a place to put a bash script that launches on startup too, if you wanna go that way.