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

1435013: Add splay to all checks done by rhsmcertd #1577

Merged
merged 2 commits into from Apr 6, 2017
Merged

Conversation

cnsnyder
Copy link
Member

@cnsnyder cnsnyder commented Apr 6, 2017

The intervals for heal and cert are maintained but we do not start those timers until the completion of the initial delay. In this way if many systems are started all at the same time, they will perform their cert and heal checks at slightly different times. This was done in an attempt to reduce peak load as a result restarting a large number of systems simultaneously.

There is a new cli option ('-m', '--max-splay-minutes') as well as a new config value read from /etc/rhsm/rhsm.conf rhsmcertd section 'maxSplayMinutes'. By default the random offset generated for checkins is in the range [0, 600] seconds. Setting the new value (specified in minutes) will override this default to allow for more or less splay. Setting the max-splay-minutes to 0 will cause splay not to be added at all.
If the -n or --now options are used on the cli, splay is not added either.

We get the seed for the random number generator from the getrandom
syscall (see 'man getrandom' for more info). The intervals for heal
and cert are maintained but we do not start those timers until the
completion of the initial delay. In this way if many systems are
started all at the same time, they will perform their cert and heal
checks at slightly different times. This was done in an attempt to
reduce peak load as a result restarting a large number of systems
simultaneously.

Add comment with link explaining why we need to generate random numbers this way

Do not delay (or splay) if given the -n option

Add max-splay-minutes cli option and maxSplayMinutes conf option

Ensure a number of minutes larger than RAND_MAX is not used for splay

Allow splay to be disabled by setting it to 0

Update default rhsm.conf and rhsmcertd man page for splay

Add new rhsmcertd option to completion script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants