(sorry about being paranoid on this issue)

On Thu, Jun 22, 2017 at 9:09 AM, Zhimeng Shi <zhimeng....@gmail.com> wrote:

> I think I didn't provide enough detail about what I would do for this
> issue. Basically what we need is just creating the needed folders when
> found there is no folders , which normally happens on new machine when call
> format. Rather than exit the process, it will make deployment much simpler.
>

There are two sides on this behavior. From your perspective, you might
think it make deployment much simpler. However, it introduces another
problem.
Because typically on production, people mount different disks for different
directories. If mounting does work as expected, you might create a
directory on a disk that you don't want to put the directory too, which it
typically becomes the root disk partition on a machine.

mounting disks, creating directories, running bookie format are related and
they should be part of deployment procedure, rather than in the bookkeeper
code.

for example, at Twitter, we use puppet to configure the disk layout,
creating the directories and mount the disks to corresponding directories
when a new machine is allocated for production.
same thing for k8s, your wrote the k8s yaml file to ask for the disk
volumes, creating the directories, and make sure the disk volumes are
mounted correctly to corresponding directories.

I am not sure what is your deployment story. But I think the correct thing
to do this is out side of bookkeeper, part of the deployment procedure.

- Sijie


>
> At the beginning I want to reuse the format function to avoid duplicate
> code. But I understand the concern of losing data when always call format
> automatically. So I will write a new function to do that, it will only
> create folder, without any deletion logic.
>
> Enrico Olivelli (JIRA) <j...@apache.org>于2017年6月22日 周四上午8:55写道:
>
> >
> >     [
> > https://issues.apache.org/jira/browse/BOOKKEEPER-1099?
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&
> focusedCommentId=16059570#comment-16059570
> > ]
> >
> > Enrico Olivelli commented on BOOKKEEPER-1099:
> > ---------------------------------------------
> >
> > I am fine with closing this issue as won't do
> >
> > > Make bookie automatically create folders on new machine.
> > > --------------------------------------------------------
> > >
> > >                 Key: BOOKKEEPER-1099
> > >                 URL:
> > https://issues.apache.org/jira/browse/BOOKKEEPER-1099
> > >             Project: Bookkeeper
> > >          Issue Type: Improvement
> > >          Components: bookkeeper-server
> > >            Reporter: Zhimeng Shi
> > >            Priority: Minor
> > >   Original Estimate: 24h
> > >  Remaining Estimate: 24h
> > >
> > > When bookie start and found it need run bookie format to create folders
> > it should do that automatically. That way will make new machine
> deployment
> > and machine replacement process much simpler without manually call the
> > bookieformat command.
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.4.14#64029)
> >
>

Reply via email to