<br><br><div class="gmail_quote">On Fri, Apr 16, 2010 at 1:52 AM, Thomas Deselaers <span dir="ltr">&lt;<a href="mailto:deselaers@vision.ee.ethz.ch">deselaers@vision.ee.ethz.ch</a>&gt;</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&#39;s exactly what I ended up doing -- the db I&#39;m using (mongoDB) has &quot;--fork / --logpath&quot; 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 &lt;<a href="mailto:dyamins@gmail.com">dyamins@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;m trying to write a plug in that starts database server on on of the nodes<br>
&gt; of my cluster.<br>
&gt;<br>
&gt; However, a line like this in my plugin:<br>
&gt;<br>
&gt;        connection.execute(&#39;commands to start the DB&#39;)<br>
&gt;<br>
&gt; wont&#39; work because the command to start the DB process doesn&#39;t return  --<br>
&gt; not until the DB is killed -- so since connection.execute blocks, this never<br>
&gt; returns, and the rest of the execution of the plugin hangs.<br>
&gt;<br>
&gt; The same thing happens when I try to run the process in teh background, e.g.<br>
&gt;<br>
&gt;     connection.execute(&#39;commands to start the DB &amp;&#39;)<br>
&gt;<br>
&gt; Fundamentally this is because paramiko.channel.exec_commands blocks.<br>
&gt;<br>
&gt;<br>
&gt; What I should do?<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Starcluster mailing list<br>
&gt; <a href="mailto:Starcluster@mit.edu">Starcluster@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt;<br>
&gt;<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>