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

tests: fix ceph-helpers.sh wait_for_clean delays #12095

Merged
merged 1 commit into from Nov 21, 2016
Merged

tests: fix ceph-helpers.sh wait_for_clean delays #12095

merged 1 commit into from Nov 21, 2016

Conversation

ghost
Copy link

@ghost ghost commented Nov 21, 2016

The TENTH_TIMEOUT was not delcared as an int and failed to be set with
the correct number. The test of the function did not catch this.

Implement computing of the increasingly large sleep delays in a separate
function so that it can be tested more easily. Give up on sub-second
sleep because a the function will not sleep at all if the cluster is
already clean. And if it is not already clean, it is very unlikely to
become clean within less than a second. The downside of having very
short sleep time is that it needlessly stress the machine and also
possibly spam the logs.

Refs: http://tracker.ceph.com/issues/17830

Signed-off-by: Loic Dachary loic@dachary.org

@ghost ghost added bug-fix tests labels Nov 21, 2016
@ghost ghost added this to the kraken milestone Nov 21, 2016
@ghost ghost assigned tchaikov Nov 21, 2016
@ghost ghost changed the title tests: fix ceph-helpers.sh wait_for_clean delays DNM: tests: fix ceph-helpers.sh wait_for_clean delays Nov 21, 2016
The TENTH_TIMEOUT was not delcared as an int and failed to be set with
the correct number. The test of the function did not catch this.

Implement computing of the increasingly large sleep delays in a separate
function so that it can be tested more easily. Give up on sub-second
sleep because a the function will not sleep at all if the cluster is
already clean. And if it is not already clean, it is very unlikely to
become clean within less than a second. The downside of having very
short sleep time is that it needlessly stress the machine and also
possibly spam the logs.

Refs: http://tracker.ceph.com/issues/17830

Signed-off-by: Loic Dachary <loic@dachary.org>
@ghost ghost changed the title DNM: tests: fix ceph-helpers.sh wait_for_clean delays tests: fix ceph-helpers.sh wait_for_clean delays Nov 21, 2016
@ghost ghost mentioned this pull request Nov 21, 2016
@tchaikov tchaikov merged commit a6aa737 into ceph:master Nov 21, 2016
@ghost
Copy link
Author

ghost commented Nov 21, 2016

@tchaikov thanks!

@dzafman
Copy link
Contributor

dzafman commented Nov 21, 2016

@dachary This could take the timeout input in seconds, but needs to have initial sleep as .1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants