Skip to content
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

mon: remove pre-luminous compat cruft (2 of many) #17322

Merged
merged 38 commits into from Sep 7, 2017

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Aug 28, 2017

This rips out a ton of pre-luminous compat cruft from the monitor, mainly
include PGMonitor.

  • rebase on top of pt 1
  • update incompat flags in object corpus for PGMap[::Incremental]


class HealthMonitor : public PaxosService
{
map<int,HealthService*> services;
version_t version = 0;
map<int,health_check_map_t> quorum_checks; // for each quorum member
health_check_map_t leader_checks; // leader only

public:
HealthMonitor(Monitor *m, Paxos *p, const string& service_name);
~HealthMonitor() override {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. just remove this dtor.

*/

// note: this should be replaced shortly!
COMMAND_WITH_FLAG("pg force_create_pg name=pgid,type=CephPgid", \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove the reference of force_create_pg, set_full_ratio and set_nearfull_ratio in ceph.rst as well?

src/mon/PGMap.cc Outdated
// or old mon running.
}
epoch_t e;
::decode(e, p);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to decode the epoch if we don't check it.

src/mon/PGMap.cc Outdated
@@ -936,85 +936,35 @@ void PGMap::get_rules_avail(const OSDMap& osdmap,
// ---------------------
// PGMap

/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why shall we keep this around instead of just yanking it?

@@ -9072,10 +9072,6 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
<< " < firefly, which is required for primary-temp";
err = -EPERM;
goto reply;
} else if (!g_conf->mon_osd_allow_primary_temp) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are covered by require_osd_release in the OSDMap.

i understand that OSDs are required to be all luminous+ in post luminous. but how can we educate old clients to understand this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options are superceded by the new osdmap require-min-compat-client which controls which newish incompat things are allowed to be used.

fi
fi
if [ "$cores" = "yes" -o "$dumplogs" = "1" ]; then
if [ "$dumplogs" = "1" ]; then
Copy link
Contributor

@tchaikov tchaikov Sep 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the EXPECT_DEATH tests should not create cores. the last of them who were dumping cores were fixed by 6beaf0b.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas @tchaikov
I have not find the time to actually make the EXPECT_DEATH tests not dump cores.
So although I agree with you, factual this is not the case on FreeBSD.
Perhaps excluding *unittest* cores while grepping?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas @wjwithagen since #17447 has been merged. can we drop this commit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
I think you also have to ask @dzafman, since he is the original submitter of this part.
The problem with this fix I had is amended by #17447, because there are no more cores.
And I'm very much in favor of making dumplogs optional, since it really bloats output, also in cases where there are other means of capturing the logs..

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from f7f4e8b, lgtm. i think the core check feature is still useful for us to check for regressions in ceph-helper based tests. and the false alarms should have been taken care of. so i guess it's safe to keep it?

@wjwithagen
Copy link
Contributor

@liewegas @tchaikov
Running this one thru jenkins/FreeBSB-master.

@wjwithagen wjwithagen self-requested a review September 6, 2017 12:11
Copy link
Contributor

@wjwithagen wjwithagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from f7f4e8b, which I needed to remove, it tested oke for FreeBSD. But that is cause of other patches.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
The only service this provided was mon space notifications, which
are now handled explicitly by the new HealthMonitor's
check_member_health(), and communited by the new MMonHealthChecks.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
There is only one user and one implementation; this just makes the
code hard to read.

Signed-off-by: Sage Weil <sage@redhat.com>
These are left over from health cleanup

Signed-off-by: Sage Weil <sage@redhat.com>
The only user left is 'pg getmap' and ceph-dencoder; we can drop
the compat cruft.

Signed-off-by: Sage Weil <sage@redhat.com>
These were used by PGMonitor when stored in per-pg and per-osd k/v
pairs.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
These were used by PGMonitor.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
These are covered by require_osd_release in the OSDMap.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
…_ratio

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas
Copy link
Member Author

liewegas commented Sep 6, 2017

@tchaikov ok thanks, dropped that commit and rebased!

@dzafman
Copy link
Contributor

dzafman commented Sep 6, 2017

@liewegas (re: f7f4e8b) We could just "rm -rf td" in run-standalone.sh to clear any previous testing using "td" the test directory. This would clear any cores generated by unit tests. Presumably, those tests aren't using run-standalone.sh because they would always fail. If you wanted to make them runnable with run-standalone, just preserve the core_pattern then set it to something that doesn't begin or end with "core". After the test runs set it back. This would only work as long as run-standalone continues to be single threaded.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 1006b62 into ceph:master Sep 7, 2017
@liewegas liewegas deleted the wip-post-luminous-mon branch September 7, 2017 18:47
@gregsfortytwo
Copy link
Member

-5k lines w00t!

@liewegas
Copy link
Member Author

liewegas commented Sep 7, 2017 via email

@renhwztetecs
Copy link
Contributor

renhwztetecs commented Sep 18, 2017

@liewegas @tchaikov
whether we consider this part of the commit into the Luminous, because like c4728db can solve http://tracker.ceph.com/issues/21300.

@tchaikov
Copy link
Contributor

@renhwztetecs i am not sure that change is backward compatible. instead, i think we should fix http://tracker.ceph.com/issues/21300

@renhwztetecs
Copy link
Contributor

@tchaikov

  1. start Mon and Mgr
  2. stop Mgr
  3. stop Mon
  4. start Mon
  5. use command "ceph --verbose osd df", you can get Mon Coredump info

@tchaikov
Copy link
Contributor

@renhwztetecs thanks for the reproducer! will leave this to Joao.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants