StarCluster - Mailing List Archive

Re: [Starcluster] connection.execute blocks

From: Dan Yamins <no email>
Date: Fri, 16 Apr 2010 07:26:34 -0400

On Fri, Apr 16, 2010 at 1:52 AM, Thomas Deselaers <
deselaers_at_vision.ee.ethz.ch> wrote:

> Hi Dan,
>
> I would recommend looking into the startup scripts of databases that
> come with linux distributions.
>

Thomas -- that's exactly what I ended up doing -- the db I'm using (mongoDB)
has "--fork / --logpath" options which allow me to do exactly what you
describe.

Thanks!
Dan




> Typically they use some tools to start databases in the background
> that also redirect output to logfiles and some other means to make
> them failsafe like lockfiles.
>
> Cheers,
> thomas
>
> On Fri, Apr 16, 2010 at 02:58, Dan Yamins <dyamins_at_gmail.com> wrote:
> > I'm trying to write a plug in that starts database server on on of the
> nodes
> > of my cluster.
> >
> > However, a line like this in my plugin:
> >
> > connection.execute('commands to start the DB')
> >
> > wont' work because the command to start the DB process doesn't return --
> > not until the DB is killed -- so since connection.execute blocks, this
> never
> > returns, and the rest of the execution of the plugin hangs.
> >
> > The same thing happens when I try to run the process in teh background,
> e.g.
> >
> > connection.execute('commands to start the DB &')
> >
> > Fundamentally this is because paramiko.channel.exec_commands blocks.
> >
> >
> > What I should do?
> >
> > _______________________________________________
> > Starcluster mailing list
> > Starcluster_at_mit.edu
> > http://mailman.mit.edu/mailman/listinfo/starcluster
> >
> >
>
>
>
> --
> http://thomas.deselaers.de
>
>
Received on Fri Apr 16 2010 - 07:26:36 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject