Re: Allow to connect on a CLI during a soft-stop or a reload

2018-11-16 Thread William Lallemand
On Fri, Nov 16, 2018 at 05:07:41PM +0100, Willy Tarreau wrote: > On Fri, Nov 16, 2018 at 04:57:19PM +0100, William Lallemand wrote: > > This patch series allows you to connect to a leaving process from the > > master CLI, which might be convenient for debugging purpose :-) > > Now merged, thank

Re: Allow to connect on a CLI during a soft-stop or a reload

2018-11-16 Thread Willy Tarreau
On Fri, Nov 16, 2018 at 04:57:19PM +0100, William Lallemand wrote: > This patch series allows you to connect to a leaving process from the > master CLI, which might be convenient for debugging purpose :-) Now merged, thank you. However when I try it I get an error message indicating that it

[PATCH 3/3] MEDIUM: cli: worker socketpair is unstoppable

2018-11-16 Thread William Lallemand
In master-worker mode, the socketpair CLI listener of the worker is now marked unstoppable, which allows to connect to the CLI of an old process which is in a leaving state, allowing to debug it. --- src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.c

[PATCH 1/3] MEDIUM: jobs: support unstoppable jobs for soft stop

2018-11-16 Thread William Lallemand
This patch allows a process to properly quit when some jobs are still active, this feature is handled by the unstoppable_jobs variable, which must be atomically incremented. During each new iteration of run_poll_loop() the break condition of the loop is now (jobs - unstoppable_jobs) == 0. The

Allow to connect on a CLI during a soft-stop or a reload

2018-11-16 Thread William Lallemand
This patch series allows you to connect to a leaving process from the master CLI, which might be convenient for debugging purpose :-)

[PATCH 2/3] MEDIUM: listeners: support unstoppable listener

2018-11-16 Thread William Lallemand
An unstoppable listener is a listener which won't be stop during a soft stop. The unstoppable_jobs variable is incremented and the listener won't prevent the process to leave properly. It is not a good idea to use this feature (the LI_O_NOSTOP flag) with a listener that need to be bind again on