-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to allow script to manage docker containers on multiple remote hosts #24
Conversation
Added variables to allow script to pause containers that could modify files during diff/sync/scrub
Added code to pause docker containers that could modify files during diff/sync/scrub, either locally or on a remote machine.
Changed "unpause" to "resume"
Pause/Unpause was throwing errors, changed to Stop/Start.
Changed where and how `stop_services` is called. `get_counts` was failing, modified order and added counts to match `snapraid diff` output
Updated script to be able to pause/stop docker containers on multiple remote hosts. This would probably also work for local docker instances as well.
Hello! Thanks for this contribution. I don't have the time to review it now, but I want to ensure it doesn't affect other functionalities, especially the |
Hi @tehniemer, I've done some testing and everything looks good, so the IFS modifications haven't impacted other areas of the script. The only thing I don't like is that standard containers are separated by a space, instead remote containers use comma without spaces. Do you think you can adjust the remote containers to use space? |
I did try that at first, but couldn't get it to work. Bash can't handle multidimensional arrays and this was the only way I could figure out how to approximate one given my limited scripting knowledge. I can take another look, but it may take some time. |
My scripting capabilities are limited too, so don't worry. I'll ask some friends who know bash, but if you eventually figure it it out you can always make another PR. |
I made some updates to the way remote hosts are handled to allow management across multiple IP addresses. I had to change a few things in the way
IFS
was used in the config file to allow this to work. This is working to pause containers on three machines I have docker services on.