This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Add support for custom rclone options and fix defuct processes#85
Open
ppacher wants to merge 2 commits intoctrox:masterfrom
Open
Add support for custom rclone options and fix defuct processes#85ppacher wants to merge 2 commits intoctrox:masterfrom
ppacher wants to merge 2 commits intoctrox:masterfrom
Conversation
pruiz
added a commit
to pruiz/csi-s3
that referenced
this pull request
Mar 10, 2024
chris-zetier
suggested changes
Oct 14, 2024
| // Since all available mounters are instructed to daemonize, we need to reap | ||
| // the daemonized processes since their parent (the mounter) exists once the daemon | ||
| // is running. | ||
| go func() { |
There was a problem hiding this comment.
I don't like this resolution. You assume you're running as PID-1 which you never check. And you globally reap all children which would mess up any code waiting for a process to exit. IMO the proper resolution would be to reap the child after you signal it to exit.
Author
|
Hi, since I'm not using this anymore for some time now, and the PR is already 2y old, I don't have the time to improve on this. Close as you like |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hi and thanks for your work on this!
This PR includes the following changes:
Mounter Parameters
This PR adds support for custom mounter parameters (although it is only implemented for rclone as of now). I needed to be able to specify additional parameters to rclone as the
--s3-provider=AWSflag broke support for mounting MinIO buckets. I'm not sure why the tests didn't catch that (I guess thedev-fullis not updated) but with this PR it's possible to overwrite the flags. The additional mounter parameters must be prefixed with the mounter name so it's more obvious what those parameters are for.An example would be:
Build Tags
It's now possible to include/exclude support for mounters from the binary. The mounters are still installed in the Docker image. I basically needed this since I wasn't able to get the go build with goofys to work as it always errors with some strange Go runtime linking in
github.com/kahing/fusego.By default, the docker image will contain support for all mounters but it's now possible to specify it:
Defunct Processes
Additionally, this PR fixes the issue with
defunctprocesses.We're running in the container as PID-1 which gets some special treatment by the kernel. In particular, if a process in the container terminates and there are still active child processes, the kernel will move those orphaned processes to be child processes of PID-1.
Init-systems are expected to handle this case by reaping those "orphan" processes once they exit. The kernel notifies the then active parent process (either the real parent or PID-1 in case the real parent terminated) by sending a
SIGCHLD.Since all available mounters are instructed to daemonize, we need to reap the daemonized processes since their parent (the mounter) exists once the daemon is running.