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 flag for inetd-style operation #127

Closed
wants to merge 1 commit into from
Closed

Conversation

jsonn
Copy link

@jsonn jsonn commented Oct 26, 2020

What is the purpose of this change? What does it change?

Allow using a pre-created socket passed in via stdin. This is how wait-services in inetd have worked for ages and is still supported by modern replacements.

Was the change discussed in an issue or in the forum before?

Closes #126.

Checklist

  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

This simplifies running the daemon as unprivileged process but still
using a low port.
@rawtaz
Copy link
Contributor

rawtaz commented Oct 27, 2020

Interesting contribution :) I think we should probably name the option --inetd or something less generic than --stdin though, as the latter is quite unclear (it begs the question of "what about stdin?").

@jsonn
Copy link
Author

jsonn commented Oct 27, 2020

I was also considering hooking it up as "stdin" argument to --listen. There is also the option for going for the full socket activation dance, but in my case that would actually be more work to use.

@rawtaz
Copy link
Contributor

rawtaz commented Oct 27, 2020

Using --listen stdin would make sense if we're sure that there's no other change in how rest-server works when put into inetd listening mode. What I mean is that if there's other factors that change besides to what/where it listens, then it's probably better to use a dedicated option like --inetd instead, as --listen stdin only tells part of the truth in that case. Let's see what others think.

@fd0
Copy link
Member

fd0 commented Aug 9, 2021

We've had a discussion about this an decided not to proceed with this PR. We can easily add systemd socket activation (I've got the code already) if needed. All new features we merge need to be carefully balanced for the resources we have, as we will indefinitely maintain them.

Therefore I'm closing this PR for now. Please feel free to add further comments. Thanks!

@fd0 fd0 closed this Aug 9, 2021
@fd0 fd0 mentioned this pull request Aug 9, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support starting rest-server from inetd and similar services
3 participants