-
Notifications
You must be signed in to change notification settings - Fork 31
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
Ufw rules are not cleaned when multiple containers are killed #11
Comments
I think I've got something working on branch ufw-threads. I'm not sure this is the right approach, from what I am understanding subprocesses are running at the same time ufw commands and ufw can't handle requests at the same time. Some time rules were updated and some time not. For readability I could put the lock at the beginning and the end of the handler |
That's a great observation ! and makes sense. |
ufw-threads branch is up to date with ufw-comment idea. |
This issue is a consequence of using docker API to retrieve container information. I abandoned ufw-threads branch because there is no point of using threading if it can't update ufw rules simultanously (I had to use locks). ufw-update-onrestart branch is the most recent version that I use currently. |
I think the script can handle one event at a time, when it needs to continue to listen to other events. Maybe with subprocess the script could open a dedicated child process for cleaning rules for a container and continue to listen on the main process ?
The text was updated successfully, but these errors were encountered: