]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: Verify non-empty list in get_active_daemon functions
authorAdam King <adking@redhat.com>
Thu, 27 Aug 2020 16:22:49 +0000 (12:22 -0400)
committerSebastian Wagner <sebastian.wagner@suse.com>
Mon, 7 Sep 2020 09:01:03 +0000 (11:01 +0200)
commit7aa11aa169cd40390d5c0ba717f4939dcc5d4817
tree398d29c3a561fae5d89c12805723b7d1137b9e4a
parentaf37cae6db6310ed988e093601673e2842705304
mgr/cephadm: Verify non-empty list in get_active_daemon functions

The get_active_daemon functions for monitoring stack daemons
were just returning the first or last daemon in the given list
without checking the list actually contained any daemons

Fixes: https://tracker.ceph.com/issues/47171
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 2c440edebf7cd4e535bcb680bd7131f0d22daf7a)
src/pybind/mgr/cephadm/services/monitoring.py