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

Projects
None yet
3 participants
@wjwithagen
Contributor

wjwithagen commented Feb 1, 2017

  • 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

@liewegas liewegas added the build/ops label Feb 1, 2017

@@ -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

This comment has been minimized.

@liewegas

liewegas Feb 1, 2017

Member

what's this for?

This comment has been minimized.

@wjwithagen

wjwithagen Feb 1, 2017

Contributor

@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.

This comment has been minimized.

@tchaikov

tchaikov Feb 10, 2017

Contributor

@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?

This comment has been minimized.

@wjwithagen

wjwithagen Feb 11, 2017

Contributor

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

@wjwithagen

This comment has been minimized.

Contributor

wjwithagen commented Feb 2, 2017

Jenkins retest please

GETOPT=/usr/local/bin/getopt
ULIMIT="limit descriptors"
else
GETOPT=getoption

This comment has been minimized.

@tchaikov

tchaikov Feb 3, 2017

Contributor

it should be getopt, right?

This comment has been minimized.

@wjwithagen

wjwithagen Feb 3, 2017

Contributor

@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 from FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system to [DNM] FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system Feb 3, 2017

@wjwithagen wjwithagen changed the title from [DNM] FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system to FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system Feb 4, 2017

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

This comment has been minimized.

@tchaikov

tchaikov Feb 6, 2017

Contributor

s/SETiCEPHUSER/SETCEPHUSER/ or better off using SET_CEPHUSER_ARGS

@wjwithagen

This comment has been minimized.

Contributor

wjwithagen commented Feb 6, 2017

@tchaikov
Fixed error and name.

@tchaikov

This comment has been minimized.

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

This comment has been minimized.

Contributor

wjwithagen commented Feb 10, 2017

Jenkins retest please

@wjwithagen

@tchaikov @liewegas
Took out the extra echo/newline

@@ -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

This comment has been minimized.

@wjwithagen

wjwithagen Feb 11, 2017

Contributor

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

@tchaikov tchaikov changed the title from FreeBSD/init-ceph: Make init-ceph work under FreeBSD for init-system to init-ceph: Make init-ceph work under FreeBSD for init-system Feb 11, 2017

init-ceph.in: Make init-ceph work under FreeBSD for init-system
 -  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

2 of 3 checks passed

default Build finished.
Details
Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details

@wjwithagen wjwithagen deleted the wjwithagen:wip-wjw-freebsd-init-ceph branch Feb 15, 2017

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