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

os/bluestore: invoke _prepare_ondisk_format_super as the last op #34616

Merged
merged 1 commit into from Apr 29, 2020

Conversation

ifed01
Copy link
Contributor

@ifed01 ifed01 commented Apr 17, 2020

Fixes: https://tracker.ceph.com/issues/45133

Signed-off-by: Igor Fedotov ifedotov@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@gregsfortytwo
Copy link
Member

This looks plausible to me at a quick glance. Are we okay splitting up the format number update from the actual disk changes transaction, given that it could crash in between?

Will pull this into today's cephfs integration run to check it fixes those, anyway.

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 20, 2020

This looks plausible to me at a quick glance. Are we okay splitting up the format number update from the actual disk changes transaction, given that it could crash in between?

Well, this might be the case if crash happens during the upgrade from 1 to 2, and one decides to revert back to Ceph release with version 1.
Other versions upgrades are safe IMO.
Changing the patch a bit to resolve. Thanks!

@ifed01 ifed01 force-pushed the wip-ifed-fix-upgrade-super branch from 5f9b5ab to 3689255 Compare April 20, 2020 11:21
@gregsfortytwo
Copy link
Member

This is working for the upgrade tests in the FS suite

ceph_assert(r == 0);

ondisk_format = 4;
} else {
Copy link
Member

Choose a reason for hiding this comment

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

But I'm confused about this, if somebody's on bluestore v1 they have to upgrade more than once? I'm not sure what major releases this corresponds to but it makes me nervous.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right. Fixed.

@ifed01 ifed01 force-pushed the wip-ifed-fix-upgrade-super branch 2 times, most recently from bb81de5 to dea3a34 Compare April 22, 2020 12:49
@yuriw
Copy link
Contributor

yuriw commented Apr 22, 2020

@@ -11084,6 +11084,9 @@ int BlueStore::_upgrade_super()
t->rmkey(PREFIX_SUPER, "min_min_alloc_size");
}
ondisk_format = 2;

// make sure upgrade is performed within a single transaction
// hence preparing new super record here other than at the end
_prepare_ondisk_format_super(t);
Copy link
Member

Choose a reason for hiding this comment

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

Well now I'm confused because AFAIK we just can't ever invoke _prepare_ondisk_format_super() until ondisk_format==4 (for now, the latest version anyway).

So either we have to fix whatever that requires, or else we have to do all the disk format changes in sequence and only invoke _prepare_ondisk_format_super() at the end.

I don't really know which pieces of what are important here so I can't help with those invariants unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I understand what's wrong with this version except being a bit sub-optimal. But here is another turn.

@yuriw
Copy link
Contributor

yuriw commented Apr 25, 2020

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

LGTM

@yuriw yuriw merged commit 84fbf1c into ceph:master Apr 29, 2020
@ifed01 ifed01 deleted the wip-ifed-fix-upgrade-super branch April 29, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants