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: add warn info for osds were removed from osdmap but still kept in crushmap #12273

Merged
merged 1 commit into from Feb 7, 2017

Conversation

Projects
None yet
6 participants
@songbaisen

songbaisen commented Dec 2, 2016

if the osds were removed from osdmap but still kept in crushmap.This will result in

the pg can not change to active+clean.So we should provide a warn info to the user

let they known.

Signed-off-by:song baisen song.baisen@zte.com.cn

continue;
if (!osdmap.exists(i))
continue;
osds.erase(i);

This comment has been minimized.

@branch-predictor

branch-predictor Dec 2, 2016

Member

Instead of generating set of OSDs from name_map then erasing most of them, you could just check if they're in name_map and then add them to the set if they're not in osdmap.

@@ -3005,6 +3010,15 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
summary.push_back(make_pair(HEALTH_WARN, ss.str()));
}
if (!osds.empty()) {
ostringstream ss;
ss << "osd have removed form osdmap, but still keep in crushmap";

This comment has been minimized.

@branch-predictor

branch-predictor Dec 2, 2016

Member

How about "OSDs were removed from OSD map, but they're still referenced by crushmap"?

ss << "osd have removed form osdmap, but still keep in crushmap";
summary.push_back(make_pair(HEALTH_WARN, ss.str()));
if (detail) {
ss << " osds: [" << osds << "]";

This comment has been minimized.

@branch-predictor

branch-predictor Dec 2, 2016

Member

Also, you could collect detailed info here, reducing cpu and memory consumption when no details are requested.

@songbaisen songbaisen changed the title from mon: add warn info for osd remove from osdmap but still keep in crushmap to mon: add warn info for osds were removed from osdmap but still keep in crushmap Dec 5, 2016

@songbaisen

This comment has been minimized.

songbaisen commented Dec 5, 2016

@branch-predictor Thank you for review good eyes man. Good ideas. Done all.

@@ -3005,6 +3012,15 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
summary.push_back(make_pair(HEALTH_WARN, ss.str()));
}
if (!osds.empty()) {
ostringstream ss;
ss << "osds were removed form osdmap, but still keep in crushmap";

This comment has been minimized.

@xiexingguo

xiexingguo Dec 5, 2016

Member

s/form/from
s/keep/kept

This comment has been minimized.

@songbaisen

@songbaisen songbaisen changed the title from mon: add warn info for osds were removed from osdmap but still keep in crushmap to mon: add warn info for osds were removed from osdmap but still kept in crushmap Dec 5, 2016

songbaisen
mon: add warn info for osds were removed from osdmap,but still kept i…
…n crushmap

if the osd were removed from osdmap but still kept in crushmap.This will result in

the pg can not change to active+clean.So we should provide a warn info to the user

let they known.

Signed-off-by:song baisen <song.baisen@zte.com.cn>

@yuriw yuriw merged commit 9f937aa into ceph:master Feb 7, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment