OK. I will try the env vars.

Guodong


On Wed, Jun 5, 2013 at 10:30 AM, Benjamin Mahler
<[email protected]>wrote:

> That works, but I would recommend not using the conf/mesos.* files at all,
> and rather just creating separate wrapper scripts for the master and the
> slave with the appropriate environment variables / command-line flags as
> benh suggested.
>
>
> On Mon, Jun 3, 2013 at 8:07 PM, 王国栋 <[email protected]> wrote:
>
> > Something must be wrong with gmail. I can see the attachment.
> >
> > Anyway, I send it again in this mail.  :)
> >
> > if you haven't received the file, please refer the following content.
> > Thanks.
> >
> > diff --git a/src/deploy/mesos-daemon.sh.in b/src/deploy/
> mesos-daemon.sh.in
> > index b89f72d..19f8449 100644
> > --- a/src/deploy/mesos-daemon.sh.in
> > +++ b/src/deploy/mesos-daemon.sh.in
> > @@ -10,5 +10,24 @@ PROGRAM=${1}
> >
> >  shift # Remove PROGRAM from the argument list (since we pass ${@}
> below).
> >
> > +# find the confs in conf file and use them for cmd argument
> > +ARGS=""
> > +if [ "$PROGRAM" == "mesos-master" ]
> > +then
> > +  for i in $(grep -v -e "^#" ${prefix}/var/mesos/conf/mesos.master |
> grep
> > -v -e "^$")
> > +  do
> > +    ARGS="$ARGS --$i"
> > +  done
> > +fi
> > +
> > +if [ "$PROGRAM" == "mesos-slave" ]
> > +then
> > +  for i in $(grep -v -e "^#" ${prefix}/var/mesos/conf/mesos.slave| grep
> > -v -e "^$")
> > +  do
> > +    ARGS="$ARGS --$i"
> > +  done
> > +fi
> > +
> > +
> >  nohup @sbindir@/${PROGRAM} \
> > -  --conf=@localstatedir@/mesos/conf ${@} </dev/null >/dev/null 2>&1 &
> > +  $ARGS ${@} </dev/null >/dev/null 2>&1 &
> >
> >
> > Guodong
> >
> >
> > On Tue, Jun 4, 2013 at 10:51 AM, Benjamin Mahler <
> > [email protected]> wrote:
> >
> >> Forgot to attach?
> >>
> >>
> >> On Mon, Jun 3, 2013 at 7:47 PM, 王国栋 <[email protected]> wrote:
> >>
> >> > Hi Ben,
> >> >
> >> > Yesterday, I changed the mesos-daemon. In my solution, I split the old
> >> > conf file into 2 conf files, one for masters, the other for slaves.
> >> >
> >> > My patch is attached. But I am not sure whether my solution matches
> your
> >> > purpose. If your purpose is to discard the conf file, I think the
> second
> >> > way you mentioned(using env vars) will be a better way.
> >> >
> >> > If my solution is OK, I would like to post a review.
> >> >
> >> > Thanks.
> >> >
> >> >
> >> > Guodong
> >> >
> >> >
> >> > On Tue, Jun 4, 2013 at 1:48 AM, Benjamin Hindman <
> >> [email protected]>wrote:
> >> >
> >> >> Hi Guodong,
> >> >>
> >> >> We'd like to simplify things a bit so we're moving to only allowing
> >> flags
> >> >> on the command line or via environment variables. I have two
> >> suggestions:
> >> >>
> >> >> (1) If you currently use a configuration file, turn that
> configuration
> >> >> file
> >> >> into a script that actually launches one of the binaries and puts the
> >> >> flags
> >> >> directly on the command line.
> >> >>
> >> >> (2) Change your configuration file to actually just put all the
> >> options in
> >> >> the environment via MESOS_ (e.g., master=ip:port would now be
> >> >> MESOS_master=ip:port). You can then source this file before launching
> >> the
> >> >> master or slave.
> >> >>
> >> >> Thanks for pointing out that mesos-daemon.sh needs to get updated
> too.
> >> >> I've
> >> >> created this ticket <https://issues.apache.org/jira/browse/MESOS-490
> >
> >> >> that
> >> >> you can track (or better yet, please contribute!).
> >> >>
> >> >> Ben.
> >> >>
> >> >>
> >> >> On Sun, Jun 2, 2013 at 7:27 PM, 王国栋 <[email protected]> wrote:
> >> >>
> >> >> > Hi guys,
> >> >> >
> >> >> > I have checked out the latest code from the git repo.
> >> >> >
> >> >> > But I can not run the mesos-slave and mesos-master with the
> >> >> > script mesos-daemon.sh. I check the option of mesos-master and
> >> >> mesos-slave,
> >> >> > is the '--conf' removed ?
> >> >> >
> >> >> > How to start the cluster for the new code?
> >> >> >
> >> >> > Best
> >> >> >
> >> >> > Guodong
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Reply via email to