<br><br><div class="gmail_quote">On Fri, Apr 16, 2010 at 1:52 AM, Thomas Deselaers <span dir="ltr"><<a href="mailto:deselaers@vision.ee.ethz.ch">deselaers@vision.ee.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Dan,<br>
<br>
I would recommend looking into the startup scripts of databases that<br>
come with linux distributions.<br></blockquote><div><br>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.<br>
<br>Thanks!<br>Dan<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Typically they use some tools to start databases in the background<br>
that also redirect output to logfiles and some other means to make<br>
them failsafe like lockfiles.<br>
<br>
Cheers,<br>
thomas<br>
<div><div></div><div class="h5"><br>
On Fri, Apr 16, 2010 at 02:58, Dan Yamins <<a href="mailto:dyamins@gmail.com">dyamins@gmail.com</a>> wrote:<br>
> I'm trying to write a plug in that starts database server on on of the nodes<br>
> of my cluster.<br>
><br>
> However, a line like this in my plugin:<br>
><br>
> connection.execute('commands to start the DB')<br>
><br>
> wont' work because the command to start the DB process doesn't return --<br>
> not until the DB is killed -- so since connection.execute blocks, this never<br>
> returns, and the rest of the execution of the plugin hangs.<br>
><br>
> The same thing happens when I try to run the process in teh background, e.g.<br>
><br>
> connection.execute('commands to start the DB &')<br>
><br>
> Fundamentally this is because paramiko.channel.exec_commands blocks.<br>
><br>
><br>
> What I should do?<br>
><br>
</div></div>> _______________________________________________<br>
> Starcluster mailing list<br>
> <a href="mailto:Starcluster@mit.edu">Starcluster@mit.edu</a><br>
> <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
<a href="http://thomas.deselaers.de" target="_blank">http://thomas.deselaers.de</a><br>
<br>
</font></blockquote></div><br>