Fix --daemon flag being silently dropped in webless mode - #480
Open
gkr0110 wants to merge 2 commits into
Open
Conversation
scripts/pulsar forwards "$@" to the underlying command for every mode (gunicorn, uwsgi, etc.) except webless, where it was ignored entirely. This meant 'pulsar --mode webless --daemon' silently ran pulsar-main in the foreground instead of daemonizing - no error, just the wrong behavior, discovered while debugging a webless AMQP deployment. pulsar-main also doesn't share pulsar-serve's flag names (-d/--daemonize instead of --daemon, and no --stop-daemon support at all), so this translates/validates args before forwarding rather than passing them through unchanged.
Contributor
Author
|
@jmchilton - Could you please review this PR? |
mvdbeek
reviewed
Jul 31, 2026
Removed deprecated comments regarding webless mode argument handling.
Contributor
Author
|
@mvdbeek - removed the comments as you suggested, could you please review and merge if it's good? |
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.
Summary
scripts/pulsarforwards"$@"to the underlying command for every launch mode (gunicorn,uwsgi,chaussette,circusd,paster) exceptwebless, where the arguments are dropped entirely. As a result,pulsar --mode webless --daemonsilently startspulsar-mainin the foreground, attached to the caller's shell, instead of daemonizing it. No error is raised, so this is easy to miss — the process looks like it started fine until the terminal session closes and it dies with it.This came up while standing up a webless/AMQP-driven Pulsar deployment talking to a RabbitMQ broker: the AMQP consumers bound and started heartbeating correctly, but the process wasn't actually backgrounded despite
--daemonbeing passed.Root cause
Compare to every other branch, e.g. gunicorn mode:
Simply adding
"$@"to the webless branch isn't quite enough on its own, though, becausepulsar-maindoesn't sharepulsar-serve's flag names:Testing
Manually tested against a live webless deployment connecting to RabbitMQ over AMQPS (password auth, TLS via
amqp_connect_ssl_ca_certs):pulsar --mode webless --daemonnow correctly forks into the background and writes to the expected log file, instead of staying attached to the invoking shell.bash -n scripts/pulsarpasses.ps/process inspection that the daemonized process survives the originating SSH session closing.Related
None found — searched existing issues/PRs for
webless+daemonwithout a match before opening this.