summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2018-04-23 15:25:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-01 15:13:08 -0700
commit6044c69297adb224e4a2ec1bc8680b2e51428cc9 (patch)
tree3ada8bb931cd1ce6ff0993aa043ba42651d291b4 /net
parent480179a1570d5d251be6c6bc02634611850d3c9a (diff)
downloadlinux-stable-6044c69297adb224e4a2ec1bc8680b2e51428cc9.tar.gz
linux-stable-6044c69297adb224e4a2ec1bc8680b2e51428cc9.tar.bz2
linux-stable-6044c69297adb224e4a2ec1bc8680b2e51428cc9.zip
libceph: reschedule a tick in finish_hunting()
commit 7b4c443d139f1d2b5570da475f7a9cbcef86740c upstream. If we go without an established session for a while, backoff delay will climb to 30 seconds. The keepalive timeout is also 30 seconds, so it's pretty easily hit after a prolonged hunting for a monitor: we don't get a chance to send out a keepalive in time, which means we never get back a keepalive ack in time, cutting an established session and attempting to connect to a different monitor every 30 seconds: [Sun Apr 1 23:37:05 2018] libceph: mon0 10.80.20.99:6789 session established [Sun Apr 1 23:37:36 2018] libceph: mon0 10.80.20.99:6789 session lost, hunting for new mon [Sun Apr 1 23:37:36 2018] libceph: mon2 10.80.20.103:6789 session established [Sun Apr 1 23:38:07 2018] libceph: mon2 10.80.20.103:6789 session lost, hunting for new mon [Sun Apr 1 23:38:07 2018] libceph: mon1 10.80.20.100:6789 session established [Sun Apr 1 23:38:37 2018] libceph: mon1 10.80.20.100:6789 session lost, hunting for new mon [Sun Apr 1 23:38:37 2018] libceph: mon2 10.80.20.103:6789 session established [Sun Apr 1 23:39:08 2018] libceph: mon2 10.80.20.103:6789 session lost, hunting for new mon The regular keepalive interval is 10 seconds. After ->hunting is cleared in finish_hunting(), call __schedule_delayed() to ensure we send out a keepalive after 10 seconds. Cc: stable@vger.kernel.org # 4.7+ Link: http://tracker.ceph.com/issues/23537 Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/mon_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index be3567447b41..500481003de4 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -1124,6 +1124,7 @@ static void finish_hunting(struct ceph_mon_client *monc)
monc->hunting = false;
monc->had_a_connection = true;
un_backoff(monc);
+ __schedule_delayed(monc);
}
}