Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[6.12.4] /ETC/RC.D/RC.DOCKER IGNORES ADDITIONAL CONTAINER NETWORKS AND CAN'T AUTO-START AFFECTED CONTAINERS (AGAIN)

  • Solved
  • Minor

Greetings.

 

This issue was previously reported:

 

 

And subsequently fixed in 6.11.1:

 

 

On 10/6/2022 at 5:56 PM, limetech said:

Updated docker to v20.10.18 and improved networking:

  • When DHCP is used, wait for IPv4 assignment before proceeding on system startup, this avoids a possible race-condition at boot time when host access to custom networks is enabled.
  • Allow user defined networks to be reconnected at docker service start. Now all defined networks will be automatically reconnected.

 

However it's back now in 6.12.4.

 

Looking closely at /etc/rc.d/rc.docker, there are two issues:

 

Issue #1 - line 296:

 

if [[ -n $MY_NETWORK && $MY_NETWORK != $MY_NETWORK ]]; then

 

- The point of the if-statement is to skip processing MY_NETWORK from the inner loop if it is the same as MY_NETWORK from the outer loop. This situation would represent the case where we are looking at the default network that is defined in the XML, that will be processed like normal in the outer loop, hence the attempt to skip it in the inner loop. However, someone has done some 'clean up' and re-named the variables in this inner loop the same as the ones in the outer loop, specifically MY_NETWORK, which overwrites our only handle to the one in the outer loop. As-is, it just skips everything because MY_NETWORK is always equal to MY_NETWORK. In order to fix this, we'll need a new variable to hold the value of MY_NETWORK before this inner loop starts and we'll need to reference that in the if-statement, like so:
 

OUTER_LOOP_NETWORK=$MY_NETWORK #save-off the value to use in the if-statement below
for ROW in $USER_NETWORKS; do
  ROW=(${ROW/;/ })
  MY_NETWORK=${ROW[0]}
  MY_IP=${ROW[1]/,/;}
  if [[ -n $MY_NETWORK && $MY_NETWORK != $OUTER_LOOP_NETWORK ]]; then
    LABEL=${MY_NETWORK//[0-9.]/}
    if [[ "br bond eth" =~ $LABEL && $LABEL != ${PORT:0:-1} ]]; then
      MY_NETWORK=${MY_NETWORK/$LABEL/${PORT:0:-1}}
    fi
    logger -t $(basename $0) "container $CONTAINER has an additional network that will be restored: $MY_NETWORK"
    NETRESTORE[$MY_NETWORK]="$CONTAINER,$MY_IP ${NETRESTORE[$MY_NETWORK]}"
  fi
done

 

Issue #2 - lines 297 - 300:

 

LABEL=${MY_NETWORK//[0-9.]/}
if [[ "br bond eth" =~ $LABEL && $LABEL != ${PORT:0:-1} ]]; then
  MY_NETWORK=${MY_NETWORK/$LABEL/${PORT:0:-1}}
fi

 

- I am guessing this has something to do with re-working network names when a user has applied the macvlan fix introduced in 6.12.4, maybe this tries to do an automatic 'translation' of sorts? It doesn't seem to 'translate' things very well, for me anyway it always just wants to change 'bond' to 'eth' so I get a bunch of 'eth2.10', 'eth2.20', etc. instead of what they should be - 'bond2.10' or 'bond2.20', etc.

 

I have to completely comment this in order for the script to correctly restore my networks.

 

It was obviously put here for a particular situation, but it seems to break other situations.

 

My initial thought would be to just get rid of it entirely and let users know they will need to update their Post Arguments to correctly reference the proper network name(s), but I admit I am not aware of the exact, original reason this was put here so I may be missing something.

 

Any thoughts?

 

Thanks!! 

 

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.