]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: mark down connections from old peers
authorSage Weil <sage@inktank.com>
Fri, 8 Mar 2013 16:56:44 +0000 (08:56 -0800)
committerSage Weil <sage@inktank.com>
Tue, 12 Mar 2013 00:46:14 +0000 (17:46 -0700)
commit8c16a376a9cbfd6812824fb71e2cc9935e14e667
tree30394a0683773c309e7c553fae5d8f8d8eae899e
parent1affc8b6e8cb82510aed524f90a6165c6edf7513
osd: mark down connections from old peers

Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 881e9d850c6762290f8be24da9e74b9dc112f1c9)
src/osd/OSD.cc