BUG/MEDIUM: peers: make the soft-stop "dont_stop" state per peers section
Commit
608e23c49 ("MINOR: peers: Use a static variable to wait a resync on
reload") replaced the PEERS_F_DONOTSTOP flag with a static variable in
__process_stopping_peer_sync(), considering that it was only used in this
function. But this function is called by the sync task of each peers
section, so the variable is shared between all sections. With more than one
peers section, upon soft-stop, only the first section to process the signal
arms its resync timeout, requests the local reconnect and kills its
sessions; the other ones see dont_stop already set and skip this, so they
never push their tables to the new process. Then the first section which
completes (or times out) decrements jobs and resets the variable, letting
the old process leave without releasing the table refcounts of the other
sections. As a result, on each reload, the stick-tables of all sections but
one are lost.
Let's store this state in the peers section itself.
This fixes GitHub issue #3517. This must be backported to 3.0.