Allow other FTL process inside docker#2037
Merged
Merged
Conversation
Do not refuse to (re)start if there is another pihole-FTL process already running *inside* a docker container on the same host. Currently, (re)starting on the host is prevented when FTL detects during startup that another process is running on the machine (the one inside the container) even when they can obviously run alongside perfectly fine. This is caused by the host being able to see *all* processes, not only the one in its own cgroup. This actually hinders development/testing natively on the host. This commit fixes this by not considering pihole-FTL processes running in downstream (!) docker containers as duplicate instances. Signed-off-by: DL6ER <dl6er@dl6er.de>
yubiuser
approved these changes
Aug 25, 2024
yubiuser
left a comment
Member
There was a problem hiding this comment.
Tested. Works nicely as described.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix?
Do not refuse to (re)start if there is another pihole-FTL process already running inside a docker container on the same host.
Currently, (re)starting on the host is prevented when FTL detects during startup that another process is running on the machine (the one inside the container) even when they can obviously run alongside perfectly fine. This is caused by the host being able to see all processes, not only the one in its own container, i.e., in its own
cgroup*. This actually hinders development/testing natively on the host.This commit fixes this by not considering
pihole-FTLprocesses running in downstream (!) docker containers as duplicate instances.How can this be reproduced? After installing Pi-hole natively on a device, also start a
dockercontainer runningpihole-FTL. Then, try to restartpihole-FTLon the host and observe that this is prevented as the task running inside the container is considered a duplicate process. This is quite obviously a false-positive detection.*) Docker utilizes
cgroupsto control and limit the resources available to containers.This is a regression of #2025
Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase)Checklist:
developmentalbranch.