]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: fix crash due to multiple sessions from daemons with same name 25867/head
authorMykola Golub <mgolub@suse.com>
Thu, 13 Dec 2018 11:12:14 +0000 (13:12 +0200)
committerAshish Singh <assingh@redhat.com>
Wed, 9 Jan 2019 13:22:39 +0000 (18:52 +0530)
commita352d0ac88b9da1fb6acc5bfaa8e52072b65feb2
tree389d6b08e189a54b2c2a4a65e6262f8e0a2f8144
parentca2fea21ed50e592ac44c8761a392f9c3b417665
mgr: fix crash due to multiple sessions from daemons with same name

Don't assume perf counter instances are stable. If there are
multiple sessions from daemons reporting the same name (e.g. rgws),
the instances are cleared in DaemonServer::handle_open.
If the daemons have different counter names (for counters like
"objecter-0x55b6f4f1a630.op_active") it will throw out_of_range in
DaemonPerfCounters::update when accessing the instance removed by
another session.

The regression was introduced when adding avgcount support.

Fixes: https://tracker.ceph.com/issues/36244
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 5b6037aeb43aff90111fdae08807ddda290bc570)

Conflicts:
src/mgr/DaemonState.cc
 - Used the '::decode()' call instead of 'decode()'.
src/mgr/DaemonState.cc