doguitar Posted February 10, 2022 Share Posted February 10, 2022 Is there a practical reason why there's not "Delay" option for docker images? Quote Link to comment
Squid Posted February 10, 2022 Author Share Posted February 10, 2022 Because until (very recently) it has been impossible to determine (and still can't be determined for everything). I'm adding it to the white board to include this now. (Thanks for bringing it to my attention) Quote Link to comment
doguitar Posted February 10, 2022 Share Posted February 10, 2022 24 minutes ago, Squid said: Because until (very recently) it has been impossible to determine (and still can't be determined for everything). I'm adding it to the white board to include this now. (Thanks for bringing it to my attention) I figured there'd be a technical reason behind it. It's definitely a requested feature from me but I get it. Quote Link to comment
jonitfcfan Posted February 15, 2022 Share Posted February 15, 2022 For some reason my Docker containers aren't updating automatically with this plugin. I get the notifications to say whenever a container has an update available but it doesn't update itself. Not sure if I've configured something wrong here... Currently it's the qbittorrent and postgresql containers that have an update on my server. Quote Link to comment
Squid Posted February 15, 2022 Author Share Posted February 15, 2022 It's never checking for updates (Update Check Frequency) Quote Link to comment
jonitfcfan Posted February 15, 2022 Share Posted February 15, 2022 2 hours ago, Squid said: It's never checking for updates (Update Check Frequency) But it says "do not overlap with autoupdate" underneath that. I thought perhaps it meant "do not enable this option if any container has been set to autoupdate below", as if the two options somehow would conflict. Quote Link to comment
Squid Posted February 15, 2022 Author Share Posted February 15, 2022 It actually should say with a backup schedule. Quote Link to comment
jonitfcfan Posted February 15, 2022 Share Posted February 15, 2022 (edited) 29 minutes ago, Squid said: It actually should say with a backup schedule. OK that makes more sense, I'll enable that option and wait. Thanks for the help. [EDIT]: Yep it worked, thanks again. Edited February 15, 2022 by jonitfcfan Quote Link to comment
Squid Posted February 22, 2022 Author Share Posted February 22, 2022 On 2/10/2022 at 3:46 PM, doguitar said: Is there a practical reason why there's not "Delay" option for docker images? So I started thinking about this today and ran into an immediate problem Let's take netdata as an example. It's updated pretty much every day. So, since any delay period causes the update "days" counter to restart again this would never actually get updated. How would you handle this? Quote Link to comment
freeridekid Posted March 17, 2022 Share Posted March 17, 2022 Would there be a reason all my dockers restart every night when this plugin runs? Quote Link to comment
Squid Posted March 17, 2022 Author Share Posted March 17, 2022 If there's an update available for them it has to restart it. If there's no update then the container should stay running Quote Link to comment
Renegade605 Posted March 27, 2022 Share Posted March 27, 2022 I'm looking for an option to have a container autoupdate most of the time, but not all of the time. For context, the use case is homeassistant updates are on a frequent minor revision with bug fixes and a monthly major revision with potential breaking changes. I'd like to have the autoupdate on while the latest version is only a minor revision but off when it's a major revision so I can manually review the breaking changes before updating. I've already figured a way for homeassistant itself to see a new version available and decide if autoupdate should be allowed or not. My plan was to have it modify the contents of "/boot/config/plugins/ca.update.applications/DockerUpdateSettings.json" to turn on/off the autoupdates. I can confirm this works by editing the file through the terminal, but I've been unable to give a docker container write access to this (or any) files on the flash drive. If someone knows how to achieve this, my problem is solved please let me know how. Failing this approach, is there another way that I can toggle the settings? My docker container can make http requests, send tcp or udp packets, connect via a websocket, and probably many more through extensions if there's a good way to accomplish this. It can also execute shell commands, but as far as I know that won't help because the shell will be jailed. If I'm wrong about any of this, please let me know. Basically if anyone has any idea how I could do this, please let me know. Side note: when editing the DockerUpdateSettings.json file, I noticed that setting a container '"update": false' makes the settings page show that the container is not autoupdating, but it still does. To stop it, the entire key must be deleted from the file. I'm sure this isn't high priority since you aren't intending for anyone to edit this file directly, but I thought I'd let you know anyway. Quote Link to comment
Squid Posted March 28, 2022 Author Share Posted March 28, 2022 Completely impossible to be able to determine what version of the application is actually within the container You would want to delete the references to the container within the update settings (while maintaining proper json formatting) Quote Link to comment
Renegade605 Posted March 28, 2022 Share Posted March 28, 2022 2 minutes ago, Squid said: Completely impossible to be able to determine what version of the application is actually within the container You would want to delete the references to the container within the update settings (while maintaining proper json formatting) Yes, I'm aware of that. I'm asking what other ways I can toggle on or off the update. Can I give a Docker container write access to the settings file? If so, how? chmod doesn't seem to do anything. Quote Link to comment
Boergen Posted March 30, 2022 Share Posted March 30, 2022 On 12/6/2019 at 6:17 AM, m8ty said: In the "Docker Auto Update Settings" settings tab, there is the setting "Time to wait for docker graceful stop before killing". What unit of time does this use? Seconds or minutes? Hi, I very much would like to know this, too. Though I'm 90% sure it's seconds, a specific unit in the description would indeed be helpul. Quote Link to comment
henris Posted April 2, 2022 Share Posted April 2, 2022 On 2/23/2022 at 12:34 AM, Squid said: So I started thinking about this today and ran into an immediate problem Let's take netdata as an example. It's updated pretty much every day. So, since any delay period causes the update "days" counter to restart again this would never actually get updated. How would you handle this? The logic should/could be to look for the latest version which is older than the delay period and install it. This is heavily depending on bad versions being removed from the repositories once major problems have been discovered (I do not know if this is the case). If they only release a newer fix version without removing the bad release then there is no solution. I just got bit by latest qBittorent version defaulting to save the downloads into config folder, filling my cache drive and bringing all dockers down. Thankfully it seems like nothing was corrupted and I didn't have to restore anything from backups. I like the autoupdating plugins/dockers but really would like to have a delay on dockers too. I do not constantly tinker with my server so manual updates resulted in very long update intervals with multitude of problems when making the jump. Quote Link to comment
Squid Posted April 2, 2022 Author Share Posted April 2, 2022 5 hours ago, henris said: The logic should/could be to look for the latest version which is older than the delay period and install it. Can't be done. If it's using :latest (which everything does that any update is going to be used for) the "date" is the time of the last update, and even if it could be discerned, the update would wind up installing the latest version since that's how the container is tagged. I'll still think about implementing. Netdata and some others would never actually wind up updating because they are constantly updated. Quote Link to comment
henris Posted April 3, 2022 Share Posted April 3, 2022 (edited) 13 hours ago, Squid said: Can't be done. If it's using :latest (which everything does that any update is going to be used for) the "date" is the time of the last update, and even if it could be discerned, the update would wind up installing the latest version since that's how the container is tagged. I'll still think about implementing. Netdata and some others would never actually wind up updating because they are constantly updated. I was more thinking to use the Github API to determine which release and when to grab. So we would not be pulling the release with the latest tag but the newest release which is newer than the current but older than the defined delay period. I have no idea how the current mechanism is implemented but this would most likely be much more complex. GitHub API provides the needed "published_at" attribute for releases: https://api.github.com/repos/binhex/arch-qbittorrentvpn/releases Edit: But all this might be in vain. The broken qBittorent 4.4.2 release is still up and marked as the latest in Binhex's repo. I guess this might work if you made an assumption that completely broken releases get a fix say within two weeks time. You could then make a safe delay of 4 weeks which should give you a buffer of additional two weeks for broken releases to receive a fix. Edited April 3, 2022 by henris Quote Link to comment
ryry Posted April 17, 2022 Share Posted April 17, 2022 On 12/6/2019 at 12:17 AM, m8ty said: I have a question about a setting: In the "Docker Auto Update Settings" settings tab, there is the setting "Time to wait for docker graceful stop before killing". What unit of time does this use? Seconds or minutes? What command is used for a graceful stop versus killing? Does it kill dockerd or only containers currently running? Thank you! I'd also like to know this. Quote Link to comment
Squid Posted April 18, 2022 Author Share Posted April 18, 2022 Seconds. And this is primarily a legacy setting since 6.9+ also include this setting for Docker (defaults to 10 seconds) If the container doesn't stop gracefully when being asked to within 10 seconds, then docker itself kills the processes off. Quote Link to comment
JustOverride Posted June 26, 2022 Share Posted June 26, 2022 Thanks @Squid, exactly what I was looking for. Making my unraid more and more automated so that 'everything just works' and I have less and less to do on it. Quote Link to comment
alturismo Posted August 8, 2022 Share Posted August 8, 2022 On 3/16/2017 at 3:46 AM, Squid said: Actually hadn't forgotten... I have to wait until Friday's round of lsio updates, but what I'm going to do is this. No GUI as I see this as rather limited in user needs Prior to stopping containers, if it exists, something like "/boot/config/plugins/ca.update.applications/scripts/stopping/stop_all" will be called if it exists Prior to stopping any particular container, a script called "/boot/config/plugins/ca.update.applications/scripts/stopping/nameOfContainer" will be called if it exists After restarting any particular container, a script called "/boot/config/plugins/ca.update.applications/scripts/starting/nameOfContainer" will be called if it exists After restarting all the containers, a script called "/boot/config/plugins/ca.update.applications/scripts/starting/start_all" will be called if it exists Should allow you the flexibility to do just about anything you want. Work for you? Hi @Squid, may i just dont see the way to go here whenever i start, update or force update the docker plex here, i dont see anything happen inside the docker nor in the logs (when i understood correctly, at least a info that the script is executed should appear) located like this root@AlsServer:~# ls -la /boot/config/plugins/ca.update.applications/scripts/starting/ total 48 drwx------ 2 root root 16384 Aug 8 16:09 ./ drwx------ 4 root root 16384 Jul 7 2019 ../ -rw------- 1 root root 56 Aug 8 16:11 plex root@AlsServer:~# docker name is also plex lower case root@AlsServer:~# docker exec -it plex bash root@715fd6aaed70:/# now, may just to clarify for me, this is just executed through the automatic updater, nothing else will execute the script ? not even a force update etc ... ? or do i havee to call the script different like plex.sh plex.bash ... ? Quote Link to comment
Revan335 Posted September 2, 2022 Share Posted September 2, 2022 Can you add the option for higher Update Frequency like hourly/4 hours/6 hours or other Time without Cron? @Squid Quote Link to comment
kizer Posted September 2, 2022 Share Posted September 2, 2022 On 3/27/2022 at 1:47 PM, Renegade605 said: I'm looking for an option to have a container autoupdate most of the time, but not all of the time. For context, the use case is homeassistant updates are on a frequent minor revision with bug fixes and a monthly major revision with potential breaking changes. I'd like to have the autoupdate on while the latest version is only a minor revision but off when it's a major revision so I can manually review the breaking changes before updating. I've already figured a way for homeassistant itself to see a new version available and decide if autoupdate should be allowed or not. My plan was to have it modify the contents of "/boot/config/plugins/ca.update.applications/DockerUpdateSettings.json" to turn on/off the autoupdates. I can confirm this works by editing the file through the terminal, but I've been unable to give a docker container write access to this (or any) files on the flash drive. If someone knows how to achieve this, my problem is solved please let me know how. Failing this approach, is there another way that I can toggle the settings? My docker container can make http requests, send tcp or udp packets, connect via a websocket, and probably many more through extensions if there's a good way to accomplish this. It can also execute shell commands, but as far as I know that won't help because the shell will be jailed. If I'm wrong about any of this, please let me know. Basically if anyone has any idea how I could do this, please let me know. Side note: when editing the DockerUpdateSettings.json file, I noticed that setting a container '"update": false' makes the settings page show that the container is not autoupdating, but it still does. To stop it, the entire key must be deleted from the file. I'm sure this isn't high priority since you aren't intending for anyone to edit this file directly, but I thought I'd let you know anyway. Easy go into your Dockers tab for this plugin. Disable auto updates for all and then manually check each docker and not Homeassistant so you can update that particular one when you want, but all others will be updated. Its the same thing I do. I have a VPN running with a killswitch to some of my dockers. When it updates it sometimes wrecks my connections to my other dockers. So I update all my other dockers and I manually update my VPN so I know to gracefully shut everything else down, update and restart my other dockers. Same with the MyServer Plugin. I have that disabled as well because I've lost all outside connections before. So now I only update that one when I'm home. You just have to remember to enable/disable future Dockers or Plugins if you turn off the all update feature. This solution isn't perfect for HomeAssistant, but at least you have more control. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.