Allow other FTL process inside docker #2037
Merged
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-FTL
processes running in downstream (!) docker containers as duplicate instances.How can this be reproduced? After installing Pi-hole natively on a device, also start a
docker
container runningpihole-FTL
. Then, try to restartpihole-FTL
on 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
cgroups
to 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:
developmental
branch.