MEDIUM: proxy: remove state PR_STPAUSED
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Sep 2020 06:04:27 +0000 (08:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
commitf18d968830ff66638ef99498c241054e3a03195c
tree8d7f85f3d31166dc1519fe7710e6abe115b488a2
parenta17c91b37f9cf421366e5fbda504981916457721
MEDIUM: proxy: remove state PR_STPAUSED

This state was used to mention that a proxy was in PAUSED state, as opposed
to the READY state. This was causing some trouble because if a listener
failed to resume (e.g. because its port was temporarily in use during the
resume), it was not possible to retry the operation later. Now by checking
the number of READY or PAUSED listeners instead, we can accurately know if
something went bad and try to fix it again later. The case of the temporary
port conflict during resume now works well:

  $ socat readline /tmp/sock1
  prompt
  > disable frontend testme3

  > disable frontend testme3
  All sockets are already disabled.

  > enable frontend testme3
  Failed to resume frontend, check logs for precise cause (port conflict?).

  > enable frontend testme3

  > enable frontend testme3
  All sockets are already enabled.
include/haproxy/proxy-t.h
src/proxy.c