<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Will Perlbal unbind from it&#39;s listening ports immediately upon getting<br>the &#39;shutdown graceful&#39; command? If not, then would I need to somehow
<br>monitor the old instance once I issue the command and then startup a new<br>Perlbal once the old one is completely finished?<br><br>If I were to write a Perlbal psuedo-init script, would the following<br>logic work?<br>
<br>- get Perlbal PID (from file?)<br>- connect to running Perlbal via telnet<br>- issue &#39;shutdown graceful&#39; command<br>- wait until telnet socket is closed (indicating Perlbal has terminated)<br>- double check that Perlbal PID is no more (
i.e. kill -0 $PID)<br>- start a new Perlbal<br>- connect to new Perlbal via telnet to confirm it&#39;s running<br></blockquote></div><br>This is the flow I used on LJ:<br><br>* connect to existing Perlbal management port<br>
* issue &#39;shutdown graceful&#39;<br>* start new Perlbal up immediately<br>* wait 10 seconds (usually I&#39;d check the new Perlbal to make sure it&#39;s getting traffic here)<br>* if the socket from the first step is still open, issue &#39;shutdown&#39; command
<br clear="all"><br>If the socket goes away, then Perlbal shut itself down all of the way.&nbsp; If not, then the final &#39;shutdown&#39; forces an immediate termination.&nbsp; You can do the work with the pid to ensure it&#39;s gone away if you want, that&#39;d certainly be safer.
<br><br>But yes, Perlbal immediately unbinds all listening sockets when you issue a graceful shutdown command.<br><br>As an aside, Perlbal should have a &#39;shutdown graceful [timeout]&#39; option where you can specify how many seconds to sit around for, then force a hard exit.&nbsp; Hmm...
<br><br><br>-- <br>Mark Smith / xb95<br><a href="mailto:smitty@gmail.com">smitty@gmail.com</a>