From: William Lallemand Date: Tue, 25 Jun 2019 16:00:19 +0000 (+0200) Subject: BUG/MEDIUM: mworker/cli: command pipelining doesn't work anymore X-Git-Tag: v2.1-dev1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19338011368b787b18598aac00bd639657f22bfa;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mworker/cli: command pipelining doesn't work anymore Since commit 829bd471 ("MEDIUM: stream: rearrange the events to remove the loop"), the pipelining in the master CLI does not work anymore. Indeed when doing: echo "@1 show info; @2 show info; @3 show info" | socat /tmp/haproxy.master - the CLI will only show the response of the first command. When debugging we can observe that the command is sent, but the client closes the connection before receiving the response. The problem is that the flag CF_READ_NULL is not cleared when we reiniate the flags of the response and we rely on this flag to close. Must be backported in 2.0 --- diff --git a/src/cli.c b/src/cli.c index 25743d92cc..44ddc7bfb0 100644 --- a/src/cli.c +++ b/src/cli.c @@ -2319,7 +2319,7 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit) s->si[1].exp = TICK_ETERNITY; s->si[1].flags &= SI_FL_ISBACK | SI_FL_DONT_WAKE; /* we're in the context of process_stream */ s->req.flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT|CF_WAKE_CONNECT|CF_WROTE_DATA); - s->res.flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT|CF_WROTE_DATA); + s->res.flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT|CF_WROTE_DATA|CF_READ_NULL); s->flags &= ~(SF_DIRECT|SF_ASSIGNED|SF_ADDR_SET|SF_BE_ASSIGNED|SF_FORCE_PRST|SF_IGNORE_PRST); s->flags &= ~(SF_CURR_SESS|SF_REDIRECTABLE|SF_SRV_REUSED); s->flags &= ~(SF_ERR_MASK|SF_FINST_MASK|SF_REDISP);