]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: fix crash due to multiple sessions from daemons with same name 25864/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 12:25:48 +0000 (17:55 +0530)
commitc38db34118b43550760af8c6e46335e4e687b8a4
treec427c63cc592392fb72eb97e9116bc25a08669a3
parent11dca72b7234ff6cae1ccb79bf8343ac32c7e87d
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)
src/mgr/DaemonState.cc