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

workunits/ceph-helpers.sh: Fixes for FreeBSD #12085

Merged
1 commit merged into from Nov 24, 2016

Conversation

wjwithagen
Copy link
Contributor

  • stat(1) does not have '%T'
  • test compares numeric with -ne
  • Need a bit of delay to get 'osd down' visible

Signed-off-by: Willem Jan Withagen wjw@digiware.nl

__teardown_btrfs $dir
fi
rm -fr $dir
}

function teardown_error() {
Copy link

Choose a reason for hiding this comment

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

where is it used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dachary
At the moment it is not used in this change, but I have further changes to keep post-mortum in developer-mode. SO this would beter go with that change as well.

@@ -206,6 +217,8 @@ function test_kill_daemon() {
kill_daemon $pidfile TERM || return 1
done

# Wait a bit to get things reported down.
sleep 3
Copy link

Choose a reason for hiding this comment

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

this must not be necessary. If it fails, that should be fixed elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dachary
I've seen this happen on very loaded hosts. Where there seemed to be a race and ceph-mon had not processed all status updates. Resulting in weird responses here.
But I'll remove it...

Copy link

Choose a reason for hiding this comment

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

If you ever run into this again, please ping me about it. There is absolutely no reason why timing should be an issue here.

@@ -608,7 +625,7 @@ function activate_osd() {
--mark-init=none \
$osd_data || return 1

[ "$id" = "$(cat $osd_data/whoami)" ] || return 1
[ "$id" -eq "$(cat $osd_data/whoami)" ] || return 1
Copy link

Choose a reason for hiding this comment

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

this is cosmetic and I'd rather not have that change in a portability commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dachary
I'll remove it,
Although it is nor really a cosmetic fix. = is a string compair, and I've seen tools output with an extra so that 3 != 3. -eq does not suffer from that. Especially is there are ""'s around.

@ghost
Copy link

ghost commented Nov 23, 2016

@wjwithagen nit: could you remove the added empty lines as well to keep this commit contained to what is absolutely necessary ? Thanks for being so agreeable !

@ghost ghost self-assigned this Nov 23, 2016
 - stat(1) does not have '%T'

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@wjwithagen
Copy link
Contributor Author

@dachary
Removed lines

@ghost ghost merged commit cca0f59 into ceph:master Nov 24, 2016
@wjwithagen wjwithagen deleted the wip-freebsd-ceph-helpers-2 branch April 28, 2017 09:23
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant