]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: local peer socket not bound.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 2 Sep 2019 12:02:28 +0000 (14:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Sep 2019 12:39:38 +0000 (14:39 +0200)
commit9c3a0ceeacebbe9182a5b253e55d37611b98a809
tree728db41bb1c14cc0b458656128569d73f724a350
parentcc1eb1619fbd09bed40c09e312099c1ccd79902c
BUG/MEDIUM: peers: local peer socket not bound.

This bug came with 015e4d7 commit: "MINOR: stick-tables: Add peers process
binding computing" where the "stick" rules cases were missing when computing
the peer local listener process binding. At parsing time we store in the
stick-table struct ->proxies_list the proxies which refer to this stick-table.
The process binding is computed after having parsed the entire configuration file
with this simple loop in cfgparse.c:

     /* compute the required process bindings for the peers from <stktables_list>
      * for all the stick-tables, the ones coming with "peers" sections included.
      */
     for (t = stktables_list; t; t = t->next) {
             struct proxy *p;

             for (p = t->proxies_list; p; p = p->next_stkt_ref) {
                     if (t->peers.p && t->peers.p->peers_fe) {
                             t->peers.p->peers_fe->bind_proc |= p->bind_proc;
                     }
             }
     }

Note that if this process binding is not correctly initialized, the child forked
by the master-worker stops the peer local listener. Should be also the case
when daemonizing haproxy.

Must be backported to 2.0.
src/cfgparse.c