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

crush/CrushWrapper: fix has_incompat_choose_args #15218

Merged
merged 1 commit into from May 23, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented May 23, 2017

If the map has no choose_args it does not have incompat choose args.
This makes the OSDMap::get_features() check

if (crush->has_incompat_choose_args())
features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;

happier.

Signed-off-by: Sage Weil sage@redhat.com

crush/CrushWrapper: fix has_incompat_choose_args
If the map has *no* choose_args it does not have incompat choose args.
This makes the OSDMap::get_features() check

  if (crush->has_incompat_choose_args())
    features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;

happier.

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

@liewegas liewegas requested a review from tchaikov May 23, 2017

@liewegas

This comment has been minimized.

Member

liewegas commented May 23, 2017

This should fix upgrade/jewel-x, which is currently completely broken due luminous mistakeningly requiring the SERVER_LUMINOUS feature from all peers.

@badone

This comment has been minimized.

Contributor

badone commented May 23, 2017

@liewegas could we do this?

if (crush->has_choose_args()) {
if (crush->has_incompat_choose_args())
features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;
}

@liewegas

This comment has been minimized.

Member

liewegas commented May 23, 2017

@badone

badone approved these changes May 23, 2017

OK, well LGTM then if you are happy with it.

@@ -112,7 +112,7 @@ bool CrushWrapper::has_choose_args() const
bool CrushWrapper::has_incompat_choose_args() const
{
if (choose_args.size() != 1)
if (choose_args.size() > 1)

This comment has been minimized.

@badone

badone May 23, 2017

Contributor

Do we need an assert(!choose_args.empty()) here?

@liewegas liewegas merged commit ae19a96 into ceph:master May 23, 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

@liewegas liewegas deleted the liewegas:wip-crush-features branch May 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment