user12345678

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by user12345678

  1. It was fixed for a time, then it came back in 6.12, reported here: Not sure how to elevate it to the devs, it's a simple fix. In the mean time I went back to my workaround/hack.
  2. Greetings. This issue was previously reported: And subsequently fixed in 6.11.1: 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!!
  3. Already installed. I've run macvlan on this setup since I've been running Unraid and I've only ever seen maybe two or three call traces and they never brought my system down so I never thought much of them, never worried much about them. I had switched recently to ipvlan in anticipation of eventually upgrading to 6.12.x and decided I don't care much for ipvlan. I thought maybe I'd switch back to macvlan and this 'fix' may ward-off call traces since they seem to increase with the kernel in 6.12.x. I can either just try & see or stay on ipvlan I guess. I was just wondering if there was something about *just* using the physical interface vs some layer on top (like bridge, bond, etc.) or if it was *just* bridges that were the issue. Anyway, thanks for your thoughts!
  4. Greetings. Is it *only* bridges that have the macvlan issue? I have a LACP bond that also acts as a VLAN trunk, from there I have several interfaces defined for various VLANs. 'Enable Bridging' is currently set to 'Yes' on that bond and as a result those interfaces are, for example, br2.10, br2.20, etc. I have several docker networks defined across those VLAN interfaces, they show as, for example, 'IPv4 custom network on interface br2.10', 'IPv4 custom network on interface br2.20', etc. If I simply set 'Enable Bridging' to 'No' on that bond, will this macvlan fix work then for all those custom docker networks? (I would assume I'd be looking at interface names like 'bond0.10' and 'bond0.20' then instead of 'br2.10', etc.)
  5. Thank you for picking this up & incorporating it, I can get rid of my go hack that replaces the rc script at boot when this comes out. Many thanks!!
  6. Greetings. Any chance of including something like this in the 6.11 release? https://forums.unraid.net/bug-reports/stable-releases/6102-etcrcdrcdocker-ignores-additional-container-networks-and-cant-auto-start-affected-containers-r1983/ (I didn't look at any of the 6.11 RCs to see if this was in them, I just assumed not by lack of replies to my previous thread.) If not I can just keep doing what I'm doing, I just thought including this would help others who have ran into this & aren't keen on making these kinds of scripting changes, etc. in the core OS. Thanks!
  7. I found that already, posted about it a little ways up (asking if the names on the dashboard could match) Ok, knowing that /dev/sd[n] assignments are fundamentally unpredictable I'll just assume a 7x coincidence. In any case, my issue is resolved and I kindly thank you for the help!
  8. I rebooted 7 times (excessive, I know) and it looks like this did the trick. I also noticed the drives aren't 'jumping around' anymore among 'Dev n' nor '/dev/sd[n]' assignments, does this also stabilize that in some way? Or perhaps that's just a 7x coincidence...
  9. Greetings. I posted about this in a few places hoping to gain some visibility, including here: So I'm trying a new 'bug report' now... The gist is that if the 'Post Arguments' field is used on a container (that is set to auto-start) to do something like '&& docker network connect...' with the intent of adding a second (or third, etc.) network to a container the rc script is unable to start the container on reboot, docker restart, etc. because it doesn't re-attach the network (after re-creating it) like it does for the main container network and since the container still references the old network id it fails with something like: unraid rc.docker: Plex-Media-Server: Error response from daemon: network ea31527bec520a923c5c8a466c0e265b775ba66262c7613d08684c786f5de5b4 not found unraid rc.docker: Error: failed to start containers: Plex-Media-Server My solution was to modify the rc.docker script in a hacky-way & add a loop to examine the container for additional networks and, if any are found, add them to the array that gets looped over later to re-attach. basically I added the following: # the loop above is based on the xml template which only defines one network - what about # containers where someone has done docker network connect <second network> <container>? # for those additional networks we need to cycle through them and add them to the array also ALL_CONTAINER_NETWORKS=$(docker container inspect $CONTAINER\ --format='{{range $key, $value := .NetworkSettings.Networks}}{{$key}}, {{if $value.IPAMConfig}} {{if $value.IPAMConfig.IPv4Address}}{{$value.IPAMConfig.IPv4Address}}{{end}} {{if $value.IPAMConfig.IPv6Address}}{{$value.IPAMConfig.IPv6Address}}{{end}} {{end}} |{{end}}'\ ) # an unfortunate side-effect of spreading the command above across multiple lines (for readability) is those newlines # sometimes end up in the final string, so take this opportunity to remove extra spaces and newlines from the result ALL_CONTAINER_NETWORKS=${ALL_CONTAINER_NETWORKS//[ $'\n']/} for CN in ${ALL_CONTAINER_NETWORKS//|/ }; do AN_ADDITIONAL_CONTAINER_NETWORK=${CN%,*} AN_ADDITIONAL_CONTAINER_IP=${CN#*,} if [[ -n $AN_ADDITIONAL_CONTAINER_NETWORK ]] && [[ $AN_ADDITIONAL_CONTAINER_NETWORK != $THIS_NETWORK ]]; then echo "container $CONTAINER has an additional network that will be restored: $CN" | logger -t $(basename $0) NETRESTORE[$AN_ADDITIONAL_CONTAINER_NETWORK]="$THIS_ID,$AN_ADDITIONAL_CONTAINER_IP ${NETRESTORE[$AN_ADDITIONAL_CONTAINER_NETWORK]}" fi done Immediately after line 197 (in-between the 'fi' and the 'done'). This seems to work really well and covers all the oddball situations that would otherwise be missed by either a go script hack or user script hack or some combination of that, however I admit I may have missed something. Any chance some cleaned-up version of this could make its way into the next release? Thanks!! EDIT: I didn't attach diagnostics since I felt I explained things pretty well & have a solution, plus I'd have to un-do the solution in order to produce the diagnostics. However if they must be supplied let me know and I can attach. Thanks!
  10. Greetings. Tried this in the General Support forum: trying here as well... I have 12 unassigned drives, three of them have one-time high CRC error counts due to bad cables which I've since replaced and everything is fine now except... On every reboot they swap 'Dev n' numbers with other drives and I get new CRC error alerts (same three drives, CRC error counts never increase, they are just on a different 'Dev n' after reboot) and I have to re-acknowledge them. Is there any way to get a drive to 'stick' to the same 'Dev n' number after reboot or otherwise get the 'acknowledge' that I do manually to follow the drive by its serial or something? Thanks in advance!
  11. Greetings. A quick question with a (hopefully) quick & easy answer... I have 12 unassigned drives, three of them have one-time high CRC error counts due to bad cables which I've since replaced and everything is fine now except... On every reboot they swap 'Dev n' numbers with other drives and I get new CRC error alerts (same three drives, CRC error counts never increase, they are just on a different 'Dev n' after reboot) and I have to re-acknowledge them. Is there any way to get a drive to 'stick' to the same 'Dev n' number after reboot or otherwise get the 'acknowledge' that I do manually to follow the drive by its serial or something? Thanks in advance!
  12. Greetings. This is minor, however I thought I'd ask & see what could be done... Any chance that the customized device name from the Main tab: could appear on the Dashboard tab (instead of the default 'Dev n'): Thanks in advance!
  13. HA! that was the first thing I tried. In order to use a user script you would have to mark the container to NOT auto start and you'd have to both attach your network as well as start the container in your user script and you'd have to schedule it for first array start. The issue with that approach is it leaves a LOT of holes, for example simply stopping and starting the docker service will destroy & re-create the networks then when you manually start your container (because it's not set to auto-start, remember?) it will fall flat on its face. When I went down this path it turned out to be full of holes and the effort to work around all the holes was far more than the solution I noted above. In order to do this properly you need to intervene AFTER the rc script has destroyed & re-created the docker networks but BEFORE it tries to start up the containers. No amount of go file or user script magic will work, unfortunately. The only place to intervene is that spot in the rc script I noted in my previous post. To get you started do: mkdir /boot/scripts cp /etc/rc.d/rc.docker /boot/scripts/rc.docker.hack nano /boot/scripts/rc.docker.hack Then make the changes I described in the nano editor, save it (ctrl-x and answer y when it asks to save). To test it copy it to /tmp (since unraid won't allow anything to execute from the flash drive, even if you chmod it executable): cp /boot/scripts/rc.docker.hack /tmp/ && chmod u+x /tmp/rc.docker.hack #stop /tmp/rc.docker.hack stop #start /tmp/rc.docker.hack start #restart /tmp/rc.docker.hack restart Once you're satisfied it works copy it back to /boot/scripts/: cp /tmp/rc.docker.hack /boot/scripts/ (it'll overwrite) and then edit /boot/config/go: nano /boot/config/go And add the line I noted in my previous post, save it like before. *This will copy-in your 'hack' script to /etc/rc.d very early in the boot process (since lines in the go file are ran very early) so YOUR script is ran to start docker, not the original one, at boot as well as any time the docker service is restarted (either by you from the GUI or when the array is stopped and started, etc.). This is the cleanest way to get things working as they should.
  14. I'm going back over posts I found while researching my similar issue, hoping my results can help others. I believe we have the same issue (if you are even still having this issue), I found out what is happening: Hopefully this helps...
  15. Old topic, I know, but I came across this (and other topics) while researching my very similar issue. The error diagnostics / error messages from @Caennanu posted by @JorgeB caught my eye: Do these containers have additional networks, as in 'docker network connect...'? If so I think I found the issue, I posted about it here: Hopefully this helps (if you are still even having the issue...)
  16. A few days ago I had this issue as well, I spent a little time researching it. Unraid re-creates the Docker networks on reboot (actually, the service script destroys them on stop then re-creates them on start, so this happens even if you just restart the docker service). When the networks are re-created they get new network ids. Problem is, the container config still references the old network ids (you can see this if you do a docker container inspect <container>) so if you look in syslog you'll see messages like these: unraid rc.docker: Plex-Media-Server: Error response from daemon: network ea31527bec520a923c5c8a466c0e265b775ba66262c7613d08684c786f5de5b4 not found unraid rc.docker: Error: failed to start containers: Plex-Media-Server If you try to start it in the GUI it's not very good at relaying the actual error message, you just get a 'No Such Container' error (as you noted). If you look carefully through /etc/rc.d/rc.docker you'll see how Unraid deals with this with respect to the 'default' network assigned to the container (the one you chose in the GUI when you created the container) - it will read the GUI-stored container 'config' from an xml template under /boot/config/plugins/dockerMan/templates-user/my<container>.xml and in there is a <Network> tag with the network name, it'll make note of the container and the network in an array and later in the script it will loop over the array and re-connect the networks to the containers so the network id is current and they will start. Problem is it ignores any additional networks that are attached later (outside the GUI, or even in the GUI but with the 'Post Arguments' trick you so often see in the forums). Sooo... I spent a little time 'massaging' the rc.docker script to also add any additional networks into the same array so they, too, will be re-attached later. If you want to do the same you'll need to edit /etc/rc.d/rc.docker and, around line ~179 you should see a block of code like this: # get container settings for custom networks to reconnect later declare -A NETRESTORE CONTAINERS=$(docker container ls -a --format='{{.Names}}'|tr '\n' ' ') for CONTAINER in $CONTAINERS; do # the file case (due to fat32) might be different so use find to match XMLFILE=$(find /boot/config/plugins/dockerMan/templates-user -maxdepth 1 -iname my-${CONTAINER}.xml) if [[ -n $XMLFILE ]]; then THIS_NETWORK= THIS_IP= while read_dom; do [[ $ENTITY == Network ]] && THIS_NETWORK=$CONTENT [[ $ENTITY == MyIP ]] && THIS_IP=${CONTENT// /} && THIS_IP=${THIS_IP//,/;} done <$XMLFILE # only restore valid networks if [[ -n $THIS_NETWORK ]]; then THIS_ID=$(docker container inspect "$CONTAINER" --format='{{.ID}}') NETRESTORE[$THIS_NETWORK]="$THIS_ID,$THIS_IP ${NETRESTORE[$THIS_NETWORK]}" fi fi #<-- insert additional code BETWEEN this line done #<-- and this line You'll need to insert the following, additional code in-between the last 'fi' and the last 'done' (see my 'insert here' style comments above): # the loop above is based on the xml template which only defines one network - what about # containers where someone has done docker network connect <second network> <container>? # for those additional networks we need to cycle through them and add them to the array also ALL_CONTAINER_NETWORKS=$(docker container inspect $CONTAINER\ --format='{{range $key, $value := .NetworkSettings.Networks}}{{$key}}, {{if $value.IPAMConfig}} {{if $value.IPAMConfig.IPv4Address}}{{$value.IPAMConfig.IPv4Address}}{{end}} {{if $value.IPAMConfig.IPv6Address}}{{$value.IPAMConfig.IPv6Address}}{{end}} {{end}} |{{end}}'\ ) # an unfortunate side-effect of spreading the command above across multiple lines (for readability) is those newlines # sometimes end up in the final string, so take this opportunity to remove extra spaces and newlines from the result ALL_CONTAINER_NETWORKS=${ALL_CONTAINER_NETWORKS//[ $'\n']/} for CN in ${ALL_CONTAINER_NETWORKS//|/ }; do AN_ADDITIONAL_CONTAINER_NETWORK=${CN%,*} AN_ADDITIONAL_CONTAINER_IP=${CN#*,} if [[ -n $AN_ADDITIONAL_CONTAINER_NETWORK ]] && [[ $AN_ADDITIONAL_CONTAINER_NETWORK != $THIS_NETWORK ]]; then echo "container $CONTAINER has an additional network that will be restored: $CN" | logger -t $(basename $0) NETRESTORE[$AN_ADDITIONAL_CONTAINER_NETWORK]="$THIS_ID,$AN_ADDITIONAL_CONTAINER_IP ${NETRESTORE[$AN_ADDITIONAL_CONTAINER_NETWORK]}" fi done Then save it and try to stop/start the docker service & see if it works OK. If so, you'll need a way to make it permanent since /etc is sitting on a ramdisk and will be blown away on the next reboot. The simplest way I found is to store a copy of the modified rc.docker script under /boot/scripts (I created the scripts directory for this) and then add a line to /boot/config/go to replace the one under /etc/rc.d with the modified one, like so: mv /etc/rc.d/rc.docker /etc/rc.d/rc.docker_orig && cp /boot/scripts/rc.docker.hack /etc/rc.d/rc.docker && chmod 755 /etc/rc.d/rc.docker This will run very early on in the boot process, before docker is started. This seems to work well for me, I am on 6.10 at the moment, I make no guarantees that it will work for everyone but feel free to tweak it for your needs if it doesn't! What would be great is if some form of this could make it into the next release so we don't have to make hacks like these!