diff mbox

Proposed change to vstart.sh

Message ID 508562A1.2040106@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joe Buck Oct. 22, 2012, 3:13 p.m. UTC
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


On 10/21/2012 02:35 PM, Sage Weil wrote:
> On Sun, 21 Oct 2012, Joe Buck wrote:
>> 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.
> 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

Comments

Sam Lang Oct. 22, 2012, 4:08 p.m. UTC | #1
On 10/22/2012 10:13 AM, Joe Buck wrote:
> On 10/21/2012 02:35 PM, Sage Weil wrote:

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

>>
>> sage
>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yehuda Sadeh Oct. 22, 2012, 4:14 p.m. UTC | #2
On Mon, Oct 22, 2012 at 9:08 AM, Sam Lang <sam.lang@inktank.com> wrote:
> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>
>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>
>
>>> 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
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Lang Oct. 22, 2012, 4:19 p.m. UTC | #3
On 10/22/2012 11:14 AM, Yehuda Sadeh wrote:
> On Mon, Oct 22, 2012 at 9:08 AM, Sam Lang <sam.lang@inktank.com> wrote:
>> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>>
>>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>>
>>
>>>> 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.

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

>
> Yehuda
>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yehuda Sadeh Oct. 22, 2012, 4:28 p.m. UTC | #4
On Mon, Oct 22, 2012 at 9:19 AM, Sam Lang <sam.lang@inktank.com> wrote:
> On 10/22/2012 11:14 AM, Yehuda Sadeh wrote:
>>
>> On Mon, Oct 22, 2012 at 9:08 AM, Sam Lang <sam.lang@inktank.com> wrote:
>>>
>>> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>>>
>>>>
>>>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>>>
>>>
>>>
>>>>> 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.
>
>
> 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 ...
>
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).
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Buck Oct. 22, 2012, 4:35 p.m. UTC | #5
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

On 10/22/2012 09:08 AM, Sam Lang wrote:
> On 10/22/2012 10:13 AM, Joe Buck wrote:
>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>
>>> 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
>
>>>
>>> sage
>>
>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sage Weil Oct. 22, 2012, 4:40 p.m. UTC | #6
On Mon, 22 Oct 2012, Joe Buck wrote:
> 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

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
> 
> -Joe Buck
> 
> On 10/22/2012 09:08 AM, Sam Lang wrote:
> > On 10/22/2012 10:13 AM, Joe Buck wrote:
> > > On 10/21/2012 02:35 PM, Sage Weil wrote:
> > 
> > > > 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
> > 
> > > > 
> > > > sage
> > > 
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Lang Oct. 22, 2012, 5:54 p.m. UTC | #7
On 10/22/2012 11:35 AM, Joe Buck wrote:
> 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
>

Do you have a keyring file in: /etc/ceph/keyring?
-sam

> -Joe Buck
>
> On 10/22/2012 09:08 AM, Sam Lang wrote:
>> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>>
>>>> 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
>>
>>>>
>>>> sage
>>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Buck Oct. 22, 2012, 6:07 p.m. UTC | #8
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

On Mon 22 Oct 2012 10:54:23 AM PDT, Sam Lang wrote:
> On 10/22/2012 11:35 AM, Joe Buck wrote:
>> 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
>>
>
> Do you have a keyring file in: /etc/ceph/keyring?
> -sam
>
>> -Joe Buck
>>
>> On 10/22/2012 09:08 AM, Sam Lang wrote:
>>> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>>>
>>>>> 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
>>>
>>>>>
>>>>> sage
>>>>
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Mick Oct. 23, 2012, 5:22 a.m. UTC | #9
> 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.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Lang Oct. 23, 2012, 11:46 a.m. UTC | #10
On 10/22/2012 11:28 AM, Yehuda Sadeh wrote:
> On Mon, Oct 22, 2012 at 9:19 AM, Sam Lang <sam.lang@inktank.com> wrote:
>> On 10/22/2012 11:14 AM, Yehuda Sadeh wrote:
>>>
>>> On Mon, Oct 22, 2012 at 9:08 AM, Sam Lang <sam.lang@inktank.com> wrote:
>>>>
>>>> On 10/22/2012 10:13 AM, Joe Buck wrote:
>>>>>
>>>>>
>>>>> On 10/21/2012 02:35 PM, Sage Weil wrote:
>>>>
>>>>
>>>>
>>>>>> 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.
>>
>>
>> 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 ...
>>
> 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).

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

>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/vstart.sh b/src/vstart.sh
index 7aaad49..0b24e44 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -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