<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's listening ports immediately upon getting<br>the 'shutdown graceful' 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 'shutdown graceful' 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's running<br></blockquote></div><br>This is the flow I used on LJ:<br><br>* connect to existing Perlbal management port<br>
* issue 'shutdown graceful'<br>* start new Perlbal up immediately<br>* wait 10 seconds (usually I'd check the new Perlbal to make sure it's getting traffic here)<br>* if the socket from the first step is still open, issue 'shutdown' command
<br clear="all"><br>If the socket goes away, then Perlbal shut itself down all of the way. If not, then the final 'shutdown' forces an immediate termination. You can do the work with the pid to ensure it's gone away if you want, that'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 'shutdown graceful [timeout]' option where you can specify how many seconds to sit around for, then force a hard exit. Hmm...
<br><br><br>-- <br>Mark Smith / xb95<br><a href="mailto:smitty@gmail.com">smitty@gmail.com</a>