]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: peers: Alway show the table info for disconnected peers.
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 6 Nov 2019 09:41:03 +0000 (10:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Nov 2019 13:48:21 +0000 (14:48 +0100)
This patch enable us to dump the stick-table information of remote or local peers
without already opened peer session. This may be the case also for the local peer
during synchronizations with an old processus (reload).

src/peers.c

index 4695b5ee0642b4efddfc94abc69dee7f33c4819f..47ca9b1bb91536d16ac1bc0262a73f55b1c33b85 100644 (file)
@@ -3081,18 +3081,18 @@ static int peers_dump_peer(struct buffer *msg, struct stream_interface *si, stru
 
        appctx = peer->appctx;
        if (!appctx)
-               goto end;
+               goto table_info;
 
        chunk_appendf(&trash, " appctx:%p st0=%d st1=%d task_calls=%u", appctx, appctx->st0, appctx->st1,
                                                                        appctx->t ? appctx->t->calls : 0);
 
        peer_si = peer->appctx->owner;
        if (!peer_si)
-               goto end;
+               goto table_info;
 
        peer_s = si_strm(peer_si);
        if (!peer_s)
-               goto end;
+               goto table_info;
 
        chunk_appendf(&trash, " state=%s", si_state_str(si_opposite(peer_si)->state));
 
@@ -3120,6 +3120,7 @@ static int peers_dump_peer(struct buffer *msg, struct stream_interface *si, stru
                break;
        }
 
+ table_info:
        if (peer->remote_table)
                chunk_appendf(&trash, "\n        remote_table:%p id=%s local_id=%d remote_id=%d",
                              peer->remote_table,