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

osd: correct epoch setting of osd boot msg #12623

Merged
merged 1 commit into from Feb 21, 2017
Merged

Conversation

LiumxNL
Copy link
Contributor

@LiumxNL 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

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
Copy link
Contributor Author

LiumxNL commented Dec 22, 2016

@tchaikov pls review, thanks!

@liewegas
Copy link
Member

I think _send_boot happens under osd_lock?

@LiumxNL
Copy link
Contributor Author

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

@LiumxNL
Copy link
Contributor Author

LiumxNL commented Feb 19, 2017

@liewegas

@tchaikov tchaikov self-assigned this Feb 19, 2017
@yuriw yuriw merged commit 9d295f7 into ceph:master Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants