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

luminous: osd: cast 'whoami' to unsigned so it can be used as the seed for RNG #24659

Merged
merged 1 commit into from Oct 25, 2018

Conversation

Projects
None yet
4 participants
@tchaikov
Contributor

tchaikov commented Oct 18, 2018

default_random_engine's result_type is unsigned int, so we need to
pass an unsigned int as its seed.

Fixes: http://tracker.ceph.com/issues/26890
Signed-off-by: Kefu Chai kchai@redhat.com

Conflicts:
src/osd/OSD.cc: this breaks the build with clang. and in master
we are not using std::default_random_engine for setting the scrub
interval. so this change is not cherry-picked from master.

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug
osd: cast `whoami` to unsigned so it can be used as the seed for RNG
default_random_engine's result_type is `unsigned int`, so we need to
pass an `unsigned int` as its seed.

Fixes: http://tracker.ceph.com/issues/26890
Signed-off-by: Kefu Chai <kchai@redhat.com>

Conflicts:
	src/osd/OSD.cc: this breaks the build with clang. and in master
we are not using std::default_random_engine for setting the scrub
interval. so this change is not cherry-picked from master.

@tchaikov tchaikov added this to the luminous milestone Oct 18, 2018

@tchaikov tchaikov requested review from smithfarm and wjwithagen Oct 18, 2018

@wjwithagen

LGTM
That is how I fixed it in my temp builds as well, so I'm sure that is working.

@smithfarm smithfarm changed the title from luminous: osd: cast `whoami` to unsigned so it can be used as the seed for RNG to luminous: osd: cast 'whoami' to unsigned so it can be used as the seed for RNG Oct 18, 2018

@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Oct 18, 2018

(replaced backticks with simple apostrophes in the PR title - I have backtick defined as a magic character in my GNU Screen setup, so copy-pasting it causes my GNU Screen to interpret the following characters as commands!)

@yuriw

This comment has been minimized.

Contributor

yuriw commented Oct 19, 2018

@yuriw yuriw merged commit 61fccd3 into ceph:luminous Oct 25, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@tchaikov tchaikov deleted the tchaikov:luminous-26890 branch Oct 26, 2018

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