Proposed change to vstart.sh
It looks like vstart.sh does not work without authx enabled. Given that, I'd propose to change the default to having cephx be enabled and then use the -x flag to disable cephx.
Interestingly enough, the help output for vstart.sh already states that the -x flag disables authx (which is not the case at present, but is after this patch is applied).
I've attached a patch to vstart that 1) changes the mention of authx to cephx for consistency and 2) defaults vstart.sh to using cephx with the -x flag now serving to disable cephx.
Best,
-Joe Buck
src/vstart.sh +3 -3
@@ -21,7 +21,7 @@ ip="" nodaemon=0 smallmds=0 overwrite_conf=1 -cephx=0 +cephx=1 #turn cephx on by default MON_ADDR=""
@@ -43,7 +43,7 @@ usage=$usage"\t--nodaemon: use ceph-run as wrapper for mon/osd/mds\n" usage=$usage"\t--smallmds: limit mds cache size\n" usage=$usage"\t-m ip:port\t\tspecify monitor address\n" usage=$usage"\t-k keep old configuration files\n" -usage=$usage"\t-x disable authx\n" +usage=$usage"\t-x disable cephx\n" usage=$usage"\t-o config\t\t add extra config parameters to mds section\n" usage_exit() {
@@ -117,7 +117,7 @@ case $1 in shift ;; -x ) - cephx=1 + cephx=0 ;; -k ) overwrite_conf=0
Quoted 11 lines · Joe Buck
It looks like
vstart.shdoes not work without authx enabled. Given that, I'd propose to change the default to having cephx be enabled and then use the -x flag to disable cephx.Interestingly enough, the help output for
vstart.shalready states that the -x flag disables authx (which is not the case at present, but is after this patch is applied).I've attached a patch to vstart that 1) changes the mention of authx to cephx for consistency and 2) defaults
vstart.shto using cephx with the -x flag now serving to disable cephx.
Sounds like a good change, but let's make -x do nothing and -X disable cephx, so that existing habitual typing of -x doesn't lead to failure.
Also, we should fix the auth none usage at some point. :)
sage
Quoted 9 lines · Sage Weil
Quoted 8 lines · Joe Buck
It looks like
vstart.shdoes not work without authx enabled. Given that, I'd propose to change the default to having cephx be enabled and then use the -x flag to disable cephx.Interestingly enough, the help output for
vstart.shalready states that the -x flag disables authx (which is not the case at present, but is after this patch is applied).
Quoted 8 lines
Quoted 3 lines
I've attached a patch to vstart that 1) changes the mention of authx to cephx for consistency and 2) defaults
vstart.shto using cephx with the -x flag now serving to disable cephx.Sounds like a good change, but let's make -x do nothing and -X disable cephx, so that existing habitual typing of -x doesn't lead to failure.
Also, we should fix the auth none usage at some point. :)
Surely it's not hard to fix the non-cephx case? I though slang had done that, actually.
Updated version of the diff with the -X flag used to turn cephX off, -x to turn it on (for historical consistency) and an updated help output that reflects this change. CephX is on by default.
I figured I'd send this out independent of the issues around vstart working when cephX is off getting sorted out.
-Joe Buck
Quoted 12 lines · Sage Weil
Quoted 11 lines · Joe Buck
It looks like
vstart.shdoes not work without authx enabled. Given that, I'd propose to change the default to having cephx be enabled and then use the -x flag to disable cephx.Interestingly enough, the help output for
vstart.shalready states that the -x flag disables authx (which is not the case at present, but is after this patch is applied).I've attached a patch to vstart that 1) changes the mention of authx to cephx for consistency and 2) defaults
vstart.shto using cephx with the -x flag now serving to disable cephx.
Quoted 6 lines
Sounds like a good change, but let's make -x do nothing and -X disable cephx, so that existing habitual typing of -x doesn't lead to failure.
Also, we should fix the auth none usage at some point. :)
sage
src/vstart.sh +7 -3
@@ -21,7 +21,7 @@ ip="" nodaemon=0 smallmds=0 overwrite_conf=1 -cephx=0 +cephx=1 #turn cephx on by default MON_ADDR=""
@@ -43,7 +43,8 @@ usage=$usage"\t--nodaemon: use ceph-run as wrapper for mon/osd/mds\n" usage=$usage"\t--smallmds: limit mds cache size\n" usage=$usage"\t-m ip:port\t\tspecify monitor address\n" usage=$usage"\t-k keep old configuration files\n" -usage=$usage"\t-x disable authx\n" +usage=$usage"\t-x enable cephx (on by default)\n" +usage=$usage"\t-X disable cephx\n" usage=$usage"\t-o config\t\t add extra config parameters to mds section\n" usage_exit() {
@@ -117,7 +118,10 @@ case $1 in shift ;; -x ) - cephx=1 + cephx=1 # this is on be default, flag exists for historical consistency + ;; + -X ) + cephx=0 ;; -k ) overwrite_conf=0
Quoted 3 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
I made some changes a while back to fix the auth none problems with vstart (https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.
Joe what errors do you get with auth none? I'm able to do vstart.sh -n -l (without the -x/-X changes) successfully.
-sam
Quoted 3 lines
Quoted 2 lines
sage
Quoted 5 lines · Sam Lang
Quoted 2 lines · Joe Buck
On 10/21/2012 02:35 PM, Sage Weil wrote:
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Also, we should fix the auth none usage at some point. :)
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.
By the way, I think those changes broke the use of CEPH_BIN env variable.
Yehuda
Quoted 9 lines · Yehuda Sadeh
Quoted 8 lines · Sam Lang
Quoted 5 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
Quoted 6 lines
Quoted 4 lines
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.By the way, I think those changes broke the use of
CEPH_BINenv variable.
I may not be using CEPH_BIN as intended then. What is CEPH_BIN supposed to point to?
I usually setup out-of-tree builds, and point CEPH_BIN at the src dir there:
<in ceph dir>
mkdir build
cd build
../configure ...
make
CEPH_BIN=$PWD/src../src/vstart.sh ...
-sam
Quoted 3 lines
Yehuda
Quoted 30 lines · Sam Lang
Quoted 14 lines · Yehuda Sadeh
Quoted 12 lines · Sam Lang
Quoted 7 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
Quoted 8 lines
Quoted 6 lines
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.By the way, I think those changes broke the use of
CEPH_BINenv variable.I may not be using
CEPH_BINas intended then. What isCEPH_BINsupposed to point to?I usually setup out-of-tree builds, and point
CEPH_BINat the src dir there:
Quoted 8 lines
<in ceph dir>
mkdir build
cd build
../configure ...
make
CEPH_BIN=$PWD/src../src/vstart.sh...
CEPH_BIN should point at the built binaries. I usually set up out of tree builds also, and point CEPH_BIN at the make install target, which should also work. Maybe vstart.sh misuses it (e.g., looks at CEPH_BIN for some other dependency).
Sam,
Here's the last few lines printed when I start vstart.sh
./vstart.sh: 397: ./vstart.sh: btrfs: not found
add osd0 7cf25a23-32dd-4b82-b9d4-d514eb857d02
2012-10-22 09:31:46.788605 7ff87bb4e780 -1 unable to authenticate as client.admin 2012-10-22 09:31:46.790370 7ff87bb4e780 -1 ceph_tool_common_init failed.
I'm invoking vstart.sh like so (my version has the patch I sent out this morning applied):
./vstart.sh -d -n -l -X
The line in vstart.sh that seems to tank is:
$SUDO $CEPH_ADM osd create $uuid
-Joe Buck
Quoted 17 lines · Sam Lang
Quoted 3 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
I made some changes a while back to fix the auth none problems with vstart (https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.Joe what errors do you get with auth none? I'm able to do
vstart.sh(quoted diff) +0
-2-n -l (without the -x/-X changes) successfully. -samQuoted 4 lines
Quoted 3 lines
sage
Quoted 10 lines · Joe Buck
Sam,
Here's the last few lines printed when I start
vstart.sh./vstart.sh: 397: ./vstart.sh: btrfs: not found
add osd0 7cf25a23-32dd-4b82-b9d4-d514eb857d022012-10-22 09:31:46.788605 7ff87bb4e780 -1 unable to authenticate as client.admin 2012-10-22 09:31:46.790370 7ff87bb4e780 -1 ceph_tool_common_init failed.
Quoted 7 lines
I'm invoking
vstart.shlike so (my version has the patch I sent out this morning applied):
./vstart.sh -d -n -l -XThe line in
vstart.shthat seems to tank is:$SUDO $CEPH_ADM osd create $uuid
Possibly related: I just pushed a patch to master that enables cephx auth by default. For the -X case we need to put in ceph.conf:
auth cluster required =
auth service required =
s
Quoted 29 lines
-Joe Buck
Quoted 5 lines · Sam Lang
Quoted 3 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
Quoted 13 lines
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.Joe what errors do you get with auth none? I'm able to do
vstart.sh-n -l (without the -x/-X changes) successfully.-sam
Quoted 3 lines
Quoted 2 lines
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Joe Buck
Sam,
Here's the last few lines printed when I start
vstart.sh./vstart.sh: 397: ./vstart.sh: btrfs: not found
add osd0 7cf25a23-32dd-4b82-b9d4-d514eb857d022012-10-22 09:31:46.788605 7ff87bb4e780 -1 unable to authenticate as client.admin 2012-10-22 09:31:46.790370 7ff87bb4e780 -1 ceph_tool_common_init failed.
Quoted 8 lines
I'm invoking
vstart.shlike so (my version has the patch I sent out this morning applied):
./vstart.sh -d -n -l -XThe line in
vstart.shthat seems to tank is:$SUDO $CEPH_ADM osd create $uuid
Do you have a keyring file in: /etc/ceph/keyring?
-sam
Quoted 27 lines
-Joe Buck
Quoted 16 lines · Sam Lang
Quoted 3 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.Joe what errors do you get with auth none? I'm able to do
vstart.sh(quoted diff) +0
-2-n -l (without the -x/-X changes) successfully. -samQuoted 2 lines
Quoted 2 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
I do, but for a different install. Given that vstart.sh uses the local ceph.conf (in src/), I figured it would use the keyring generated in the same directory. Is this not the case?
-Joe Buck
Quoted 52 lines · Sam Lang
Quoted 10 lines · Joe Buck
Sam,
Here's the last few lines printed when I start
vstart.sh./vstart.sh: 397: ./vstart.sh: btrfs: not found
add osd0 7cf25a23-32dd-4b82-b9d4-d514eb857d022012-10-22 09:31:46.788605 7ff87bb4e780 -1 unable to authenticate as client.admin 2012-10-22 09:31:46.790370 7ff87bb4e780 -1 ceph_tool_common_init failed.Quoted 8 lines
I'm invoking
vstart.shlike so (my version has the patch I sent out this morning applied):
./vstart.sh -d -n -l -XThe line in
vstart.shthat seems to tank is:$SUDO $CEPH_ADM osd create $uuid
Do you have a keyring file in:
/etc/ceph/keyring?
-samQuoted 28 lines
-Joe Buck
Quoted 17 lines · Sam Lang
Quoted 3 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).The -x help text inversion was a bug on my part.
Joe what errors do you get with auth none? I'm able to do
vstart.sh(quoted diff) +0
-2-n -l (without the -x/-X changes) successfully. -samQuoted 2 lines
Quoted 2 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines
Possibly related: I just pushed a patch to master that enables cephx auth by default. For the -X case we need to put in ceph.conf:
auth cluster required =
auth service required =
This was not added, and thus vstart.sh -X is currently broken.
Quoted 39 lines · Yehuda Sadeh
Quoted 30 lines · Sam Lang
Quoted 14 lines · Yehuda Sadeh
Quoted 12 lines · Sam Lang
Quoted 7 lines · Joe Buck
Quoted 1 line · Sage Weil
Also, we should fix the auth none usage at some point. :)
Quoted 8 lines
Quoted 6 lines
I made some changes a while back to fix the auth none problems with vstart
(https://github.com/ceph/ceph/commit/0f7c516f3e1f37c5869f8fbff67f53ca0c90568c).
The -x help text inversion was a bug on my part.By the way, I think those changes broke the use of
CEPH_BINenv variable.I may not be using
CEPH_BINas intended then. What isCEPH_BINsupposed to point to?I usually setup out-of-tree builds, and point
CEPH_BINat the src dir there:Quoted 8 lines
<in ceph dir>
mkdir build
cd build
../configure ...
make
CEPH_BIN=$PWD/src../src/vstart.sh...
Quoted 4 lines
CEPH_BINshould point at the built binaries. I usually set up out of tree builds also, and pointCEPH_BINat the make install target, which should also work. Maybevstart.shmisuses it (e.g., looks atCEPH_BINfor some other dependency).
It was previously doing ./init-ceph (which only worked if run from the ceph srcdir), and now does $CEPH_BIN/init-ceph, which breaks when you point CEPH_BIN at the make install target.
My goal with that change was to be able to run vstart.sh from outside the src dir (namely from the build dir). To do that though, I think we would need to turn it into a autoconf generated file (vstart.sh.in -> vstart.sh). That doesn't seem worth the trouble. I'll put the ./init-ceph back in.
-sam