Navigation Menu

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

init-ceph: Make init-ceph work under FreeBSD for init-system #13209

Merged
merged 1 commit into from Feb 14, 2017

Conversation

wjwithagen
Copy link
Contributor

  • FreeBSD find does not have printf option
  • ulimit has different grammar
  • use the packaged getopt in /usr/local
  • Only apply user-facts when user ceph is available

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

src/init-ceph.in Outdated
@@ -463,6 +475,7 @@ for name in $what; do
if daemon_is_running $name ceph-$type $id $pid_file; then
printf "$name: running "
do_cmd "$BINDIR/ceph --admin-daemon $asok version 2>/dev/null" || echo unknown
[ `uname` = FreeBSD ] && echo
Copy link
Member

Choose a reason for hiding this comment

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

what's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liewegas
One way or another my Development version strings do not have a '\n' at the end.
And I've been going thru packs of python and other code, but I cannot find.
My linux reference is on CentOS 7 from packages, and that does include a newline in the ceph version output.

And this is a first whack at init-ceph.
It now starts/stops the local deamons, en reports status.
Which is enough IMHO to try and get the package config submitted with FreeBSD ports.

Copy link
Contributor

Choose a reason for hiding this comment

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

@wjwithagen neither does my bin/init-ceph status has \n at the end of daemon status line

$ bin/init-ceph status
=== mon.a ===
mon.a: running {"version":"Development"}=== mon.b ===
mon.b: running {"version":"Development"}=== mon.c ===
mon.c: running {"version":"Development"}=== osd.0 ===
osd.0: not running.
=== osd.1 ===
osd.1: running {"version":"Development"}=== osd.2 ===
osd.2: not running.

i just posted #13351 to address this problem. so probably you can drop this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov
Ah, great.
I'll drop that line.

@wjwithagen
Copy link
Contributor Author

Jenkins retest please

src/init-ceph.in Outdated
GETOPT=/usr/local/bin/getopt
ULIMIT="limit descriptors"
else
GETOPT=getoption
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be getopt, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov
Eh yes it should. I did fix this,
And removed the ULIMIT stuff, since I wrongly thought /bin/sh was different in this.

In the mean time I've found some more enhancements.
I'll put this on DNM and fix.

Note that I have a three system cluster FreeBSD system up and running.... 8-D
But it also means I have a hard time tracking all the fixes to the packages and rc.d files. :(

@wjwithagen wjwithagen changed the title FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system [DNM] FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system Feb 3, 2017
@wjwithagen wjwithagen changed the title [DNM] FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system Feb 4, 2017
src/init-ceph.in Outdated
fi

if id ceph > /dev/null 2&>1; then
SETiCEPHUSER=" --setuser ceph --setgroup ceph"
Copy link
Contributor

Choose a reason for hiding this comment

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

s/SETiCEPHUSER/SETCEPHUSER/ or better off using SET_CEPHUSER_ARGS

@wjwithagen
Copy link
Contributor Author

@tchaikov
Fixed error and name.

@tchaikov
Copy link
Contributor

tchaikov commented Feb 6, 2017

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:84: rados_put:  rados --pool pool-jerasure put obj-eio-24519-0 td/test-erasure-eio/ORIGINAL
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh: line 73: 21842 Terminated              rados --pool $poolname put $objname $dir/ORIGINAL
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:84: rados_put:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:118: rados_put_get:  return 1

see https://jenkins.ceph.com/job/ceph-pull-requests/18001/consoleFull#146776618140526d21-3511-427d-909c-dd086c0d1034

retest this please.

@wjwithagen
Copy link
Contributor Author

Jenkins retest please

Copy link
Contributor Author

@wjwithagen wjwithagen left a comment

Choose a reason for hiding this comment

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

@tchaikov @liewegas
Took out the extra echo/newline

src/init-ceph.in Outdated
@@ -463,6 +475,7 @@ for name in $what; do
if daemon_is_running $name ceph-$type $id $pid_file; then
printf "$name: running "
do_cmd "$BINDIR/ceph --admin-daemon $asok version 2>/dev/null" || echo unknown
[ `uname` = FreeBSD ] && echo
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov
Ah, great.
I'll drop that line.

@tchaikov tchaikov changed the title FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system init-ceph: Make init-ceph work under FreeBSD for init-system Feb 11, 2017
 -  FreeBSD find does not have printf option
 -  use the packaged getopt in /usr/local
 -  Only apply user-facts when user ceph is available

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@liewegas liewegas merged commit e5ae7ba into ceph:master Feb 14, 2017
@wjwithagen wjwithagen deleted the wip-wjw-freebsd-init-ceph branch February 15, 2017 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants