]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: fix some erroneous safety asserts in OSDMonitor::try_enable_stretch_mode
authorGreg Farnum <gfarnum@redhat.com>
Tue, 8 Dec 2020 23:28:50 +0000 (23:28 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Thu, 10 Dec 2020 14:35:15 +0000 (14:35 +0000)
commit208957e6d99f1dfe83e5601f6db80a90a96b62cd
treeb1891ec8822ff2ef2336d54e8f82df27ac84bd6b
parentcbaa18e85aa79ee3ba764224ba263b19a226e42f
mon: fix some erroneous safety asserts in OSDMonitor::try_enable_stretch_mode

This function asserts it is not committing in error cases, because it is supposed
to be run first in a trial mode, and then in a commit mode. But I wanted the
asserts to be more informative than that when they are printed, so I included
the failure condition as an OR clause in the assert.

Unfortunately, a few of them were either written wrong or became wrong due to
code movement. Fix these so they are valid and convey the desired information.

Reported-by: Ronen Friedman <rfriedma@redhat.com>
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/mon/OSDMonitor.cc