Skip to content
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

Add --no-daemon or --foreground option for supervised systems #315

Open
jac-cbi opened this issue Feb 16, 2021 · 4 comments
Open

Add --no-daemon or --foreground option for supervised systems #315

jac-cbi opened this issue Feb 16, 2021 · 4 comments
Labels
Type: Feature Request A big idea that would be split into smaller pieces

Comments

@jac-cbi
Copy link

jac-cbi commented Feb 16, 2021

I've recently moved most of my servers and VMs to Artix Linux (a derivative of Arch Linux, sans systemd). I chose the runit system for my init and process supervision system on my Artix boxes (s6 is a mess, and OpenRC, well, it's not a supervision system). This has been working great up until I attempted to move my web server from Gentoo to Artix. Everything went smoothly, except for cloudflared.

I use cloudflared for connecting to the Cloudflare network, which caches, and serves my websites. It's a traditional use of Argo tunnel, namely, my web server is not accessible from the Internet, only from CF via Argo tunnel.

Basically, If CF were to add a --no-daemon option, this would allow me to launch the process in a supervised manner, meaning that there is a parent process which receives SIGCHLD and can automatically restart the dead process. Additionally, this means I could allow cloudflared to automagically update itself, and once complete, it can just exit. No races, no PID tracking, and more importantly, no dropped log messages. (runit handles that).

@stevenanthonyrevo
Copy link

Upvote for including this, PID tracking is a pain.

@adamchalmers adamchalmers added the Type: Feature Request A big idea that would be split into smaller pieces label Feb 22, 2021
@andrewheberle
Copy link

I must be missing something here...but cloudflared has always run in the foreground and runs fine under a supervision system in my experience...

@jac-cbi
Copy link
Author

jac-cbi commented May 25, 2021

@andrewheberle Could you provide some more detail? What OS/distro/arch are you running on? What is the command line used to launch cloudflared?

@septatrix
Copy link

I am running cloudflared on Fedora 35 and installed it with the rpm package from the release page. On my system it runs in the foreground. Despite that I can only say that the Dockerfile and systemd service explicitly specify --no-autoupdate so maybe that flag is responsible for making it detach? Also --pidfile did nothing (trying to maybe force detaching) so I am not sure why you are seemingly experiencing something different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request A big idea that would be split into smaller pieces
Projects
None yet
Development

No branches or pull requests

5 participants