You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by marek <md...@gmail.com> on 2013/11/14 00:18:24 UTC

Auto create "chroot" on server start up?

Hey,

I'm trying to feel-out if auto creating the broker's registration path
on server start up would be wanted as a code contribution.

How do the maintainers feel about:

1.
Having configurable server parameter:

    auto.create.chroot = true | false

2.
If (1) is set to true, the chroot would be create automatically in the
case that the it is missing from zookeeper, and the server would start
up normal.

If the maintainers are OK with this idea I'll code it up, it would
solve a use case we have at my work, and I would send in a patch or
follow any contribution process given.


Right now if you specify zookeeper.connect as:

    host1:port1,host2:port2,host3:port3/chroot/path

and /chroot/path does not exist in zookeeper, the server does not operate.


-Marek

Re: Auto create "chroot" on server start up?

Posted by marek <md...@gmail.com>.
Hello Kostya,

The "chroot" that the zookeeper.connect parameter takes as a suffix is just
an analogy to the UNIX command "chroot", but it has nothing to do with
actually using the command line tool.

For clarity check out the "broker config" section at:

http://kafka.apache.org/documentation.html


Hopefully it will make sense.


On Wednesday, November 13, 2013, Kostya Golikov wrote:

> Just one word: Windows.
>
> I'm not a maintainer, but AFAIK kafka targets Windows as well and isn't
> chroot is a Unix-specific feature?
>
>
> 2013/11/14 marek <mdmarek@gmail.com <javascript:;>>
>
> > Hey,
> >
> > I'm trying to feel-out if auto creating the broker's registration path
> > on server start up would be wanted as a code contribution.
> >
> > How do the maintainers feel about:
> >
> > 1.
> > Having configurable server parameter:
> >
> >     auto.create.chroot = true | false
> >
> > 2.
> > If (1) is set to true, the chroot would be create automatically in the
> > case that the it is missing from zookeeper, and the server would start
> > up normal.
> >
> > If the maintainers are OK with this idea I'll code it up, it would
> > solve a use case we have at my work, and I would send in a patch or
> > follow any contribution process given.
> >
> >
> > Right now if you specify zookeeper.connect as:
> >
> >     host1:port1,host2:port2,host3:port3/chroot/path
> >
> > and /chroot/path does not exist in zookeeper, the server does not
> operate.
> >
> >
> > -Marek
> >
>

Re: Auto create "chroot" on server start up?

Posted by David Arthur <mu...@gmail.com>.
I don't think its too much to ask people to create their ZK paths: 
zkCli.sh -server localhost:2181 create /kafka kafka

Asking a ZK application to use a non-existent chroot is like asking tar 
to extract to a non-existent directory. An error is appropriate. I think 
the fix here is to give a better error than the very unhelpful/cryptic 
"Path length must be > 0" (https://issues.apache.org/jira/browse/KAFKA-294)

Cheers
-David

On 11/13/13 11:13 PM, marek wrote:
> Thank you Joel, got it.
>
> I cloned the git repo and am working in trunk.
>
> This is the correct branch for the latest in 0.8, is that right?
>
> Or should I work against one of the other branches?
>
> -Marek
>
> On Wednesday, November 13, 2013, Joel Koshy wrote:
>
>> Marek was referring to the zookeeper namespace - Marek, there are
>> jira(s)
>> https://issues.apache.org/jira/browse/KAFKA-294
>> https://issues.apache.org/jira/browse/KAFKA-404
>>
>> Should be straightforward to finish that up - want to give that a go?
>>
>> Thanks,
>>
>> Joel
>>
>> On Thu, Nov 14, 2013 at 03:48:01AM +0400, Kostya Golikov wrote:
>>> Just one word: Windows.
>>>
>>> I'm not a maintainer, but AFAIK kafka targets Windows as well and isn't
>>> chroot is a Unix-specific feature?
>>>
>>>
>>> 2013/11/14 marek <mdmarek@gmail.com <javascript:;>>
>>>
>>>> Hey,
>>>>
>>>> I'm trying to feel-out if auto creating the broker's registration path
>>>> on server start up would be wanted as a code contribution.
>>>>
>>>> How do the maintainers feel about:
>>>>
>>>> 1.
>>>> Having configurable server parameter:
>>>>
>>>>      auto.create.chroot = true | false
>>>>
>>>> 2.
>>>> If (1) is set to true, the chroot would be create automatically in the
>>>> case that the it is missing from zookeeper, and the server would start
>>>> up normal.
>>>>
>>>> If the maintainers are OK with this idea I'll code it up, it would
>>>> solve a use case we have at my work, and I would send in a patch or
>>>> follow any contribution process given.
>>>>
>>>>
>>>> Right now if you specify zookeeper.connect as:
>>>>
>>>>      host1:port1,host2:port2,host3:port3/chroot/path
>>>>
>>>> and /chroot/path does not exist in zookeeper, the server does not
>> operate.
>>>>
>>>> -Marek
>>>>
>>


Re: Auto create "chroot" on server start up?

Posted by marek <md...@gmail.com>.
Thank you Joel, got it.

I cloned the git repo and am working in trunk.

This is the correct branch for the latest in 0.8, is that right?

Or should I work against one of the other branches?

-Marek

On Wednesday, November 13, 2013, Joel Koshy wrote:

> Marek was referring to the zookeeper namespace - Marek, there are
> jira(s)
> https://issues.apache.org/jira/browse/KAFKA-294
> https://issues.apache.org/jira/browse/KAFKA-404
>
> Should be straightforward to finish that up - want to give that a go?
>
> Thanks,
>
> Joel
>
> On Thu, Nov 14, 2013 at 03:48:01AM +0400, Kostya Golikov wrote:
> > Just one word: Windows.
> >
> > I'm not a maintainer, but AFAIK kafka targets Windows as well and isn't
> > chroot is a Unix-specific feature?
> >
> >
> > 2013/11/14 marek <mdmarek@gmail.com <javascript:;>>
> >
> > > Hey,
> > >
> > > I'm trying to feel-out if auto creating the broker's registration path
> > > on server start up would be wanted as a code contribution.
> > >
> > > How do the maintainers feel about:
> > >
> > > 1.
> > > Having configurable server parameter:
> > >
> > >     auto.create.chroot = true | false
> > >
> > > 2.
> > > If (1) is set to true, the chroot would be create automatically in the
> > > case that the it is missing from zookeeper, and the server would start
> > > up normal.
> > >
> > > If the maintainers are OK with this idea I'll code it up, it would
> > > solve a use case we have at my work, and I would send in a patch or
> > > follow any contribution process given.
> > >
> > >
> > > Right now if you specify zookeeper.connect as:
> > >
> > >     host1:port1,host2:port2,host3:port3/chroot/path
> > >
> > > and /chroot/path does not exist in zookeeper, the server does not
> operate.
> > >
> > >
> > > -Marek
> > >
>
>

Re: Auto create "chroot" on server start up?

Posted by Joel Koshy <jj...@gmail.com>.
Marek was referring to the zookeeper namespace - Marek, there are
jira(s)
https://issues.apache.org/jira/browse/KAFKA-294
https://issues.apache.org/jira/browse/KAFKA-404

Should be straightforward to finish that up - want to give that a go?

Thanks,

Joel

On Thu, Nov 14, 2013 at 03:48:01AM +0400, Kostya Golikov wrote:
> Just one word: Windows.
> 
> I'm not a maintainer, but AFAIK kafka targets Windows as well and isn't
> chroot is a Unix-specific feature?
> 
> 
> 2013/11/14 marek <md...@gmail.com>
> 
> > Hey,
> >
> > I'm trying to feel-out if auto creating the broker's registration path
> > on server start up would be wanted as a code contribution.
> >
> > How do the maintainers feel about:
> >
> > 1.
> > Having configurable server parameter:
> >
> >     auto.create.chroot = true | false
> >
> > 2.
> > If (1) is set to true, the chroot would be create automatically in the
> > case that the it is missing from zookeeper, and the server would start
> > up normal.
> >
> > If the maintainers are OK with this idea I'll code it up, it would
> > solve a use case we have at my work, and I would send in a patch or
> > follow any contribution process given.
> >
> >
> > Right now if you specify zookeeper.connect as:
> >
> >     host1:port1,host2:port2,host3:port3/chroot/path
> >
> > and /chroot/path does not exist in zookeeper, the server does not operate.
> >
> >
> > -Marek
> >


Re: Auto create "chroot" on server start up?

Posted by Kostya Golikov <jo...@gmail.com>.
Just one word: Windows.

I'm not a maintainer, but AFAIK kafka targets Windows as well and isn't
chroot is a Unix-specific feature?


2013/11/14 marek <md...@gmail.com>

> Hey,
>
> I'm trying to feel-out if auto creating the broker's registration path
> on server start up would be wanted as a code contribution.
>
> How do the maintainers feel about:
>
> 1.
> Having configurable server parameter:
>
>     auto.create.chroot = true | false
>
> 2.
> If (1) is set to true, the chroot would be create automatically in the
> case that the it is missing from zookeeper, and the server would start
> up normal.
>
> If the maintainers are OK with this idea I'll code it up, it would
> solve a use case we have at my work, and I would send in a patch or
> follow any contribution process given.
>
>
> Right now if you specify zookeeper.connect as:
>
>     host1:port1,host2:port2,host3:port3/chroot/path
>
> and /chroot/path does not exist in zookeeper, the server does not operate.
>
>
> -Marek
>