New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luminous: mon: osd feature checks with 0 up osds #18364

Merged
merged 2 commits into from Oct 26, 2017

Conversation

Projects
None yet
5 participants
@kmroz

kmroz commented Oct 17, 2017

@tchaikov tchaikov added this to the luminous milestone Oct 18, 2017

@kmroz kmroz requested a review from liewegas Oct 20, 2017

Show outdated Hide outdated src/mon/MonCommands.h
Show outdated Hide outdated src/mon/OSDMonitor.cc

@theanalyst theanalyst changed the title from luminous: mon: osd feature checks with 0 up osds to DNM luminous: mon: osd feature checks with 0 up osds Oct 20, 2017

liewegas and others added some commits Sep 19, 2017

osd/OSDMap: ignore xinfo if features == 0
Some old bug (e.g., http://tracker.ceph.com/issues/20751) could
result in an UP+EXISTS osd having features==0.  If that happens,
we shouldn't crash the mon, which (reasonably) does

   if (osdmap.get_epoch()) {
     if (osdmap.get_num_up_osds() > 0) {
       assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB);
       check_subs();
     }
   }

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 8399833)
mon/OSDMonitor: mon osd feature checks with 0 up osds
get_up_osd_features() returns 0 if no osds are up which causes feature
checks to fail.

Fixes: http://tracker.ceph.com/issues/21471

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit 26ba0ba)

Conflicts:
	src/mon/MonCommands.h
          - removed mimic reference
	src/mon/OSDMonitor.cc
          - removed mimic-only command path
@kmroz

This comment has been minimized.

Show comment
Hide comment
@kmroz

kmroz Oct 20, 2017

@liewegas - I dropped the mimic reference in MonCommands.h and the mimic block in OSDMonitor.cc, relying on the original

    if (rel == CEPH_RELEASE_LUMINOUS) {
      if (!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_LUMINOUS)) {
	ss << "not all up OSDs have CEPH_FEATURE_SERVER_LUMINOUS feature";
	err = -EPERM;
	goto reply;
      }
    }

Please have a look, thanks.

kmroz commented Oct 20, 2017

@liewegas - I dropped the mimic reference in MonCommands.h and the mimic block in OSDMonitor.cc, relying on the original

    if (rel == CEPH_RELEASE_LUMINOUS) {
      if (!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_LUMINOUS)) {
	ss << "not all up OSDs have CEPH_FEATURE_SERVER_LUMINOUS feature";
	err = -EPERM;
	goto reply;
      }
    }

Please have a look, thanks.

@liewegas

looks good, thanks!

@liewegas liewegas changed the title from DNM luminous: mon: osd feature checks with 0 up osds to luminous: mon: osd feature checks with 0 up osds Oct 20, 2017

@liewegas liewegas merged commit a175c03 into ceph:luminous Oct 26, 2017

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment