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

osd: correct epoch setting of osd boot msg #12623

Merged
merged 1 commit into from Feb 21, 2017

Conversation

Projects
None yet
4 participants
@LiumxNL
Contributor

LiumxNL commented Dec 22, 2016

use get_osdmap_epoch() maybe better than superblock's current_epoch, because
_send_boot() might happen when committing new osdmap, superblock.current_epoch
prior to osdmap.epoch, _committed_osd_map() may modify some osd metadata thereafter,
thus, break the consistency between epoch and metadata in boot msg.

Signed-off-by: Mingxin Liu mingxin@xsky.com

osd: correct the boot msg epoch in _send_boot()
use get_osdmap_epoch() maybe better than superblock's current_epoch, because
_send_boot() might happen when committing new osdmap, superblock.current_epoch
prior to osdmap.epoch, _committed_osd_map() may modify some osd metadata thereafter,
thus, break the consistency between epoch and metadata in boot msg.

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
@LiumxNL

This comment has been minimized.

Contributor

LiumxNL commented Dec 22, 2016

@tchaikov pls review, thanks!

@liewegas

This comment has been minimized.

Member

liewegas commented Dec 22, 2016

I think _send_boot happens under osd_lock?

@LiumxNL

This comment has been minimized.

Contributor

LiumxNL commented Dec 22, 2016

@liewegas yeah, but superblock.current_epoch set at handle_osd_map(), then committing osdmap, finally call _commiitted_osd_map and consume map, it will change some metadata, like cluster addr. _send_boot may happen at the interval, sometimes committing into store may laggy if disk busy, and osd_lock racing, expand that time window

@liewegas liewegas self-assigned this Dec 29, 2016

@LiumxNL

This comment has been minimized.

Contributor

LiumxNL commented Feb 19, 2017

@liewegas liewegas added the needs-qa label Feb 19, 2017

@tchaikov tchaikov self-assigned this Feb 19, 2017

@yuriw yuriw merged commit 9d295f7 into ceph:master Feb 21, 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