<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 9:20 AM, Matthew Treinish <span dir="ltr"><<a href="mailto:mtreinish@kortar.org" target="_blank">mtreinish@kortar.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So I don't necessarily think that there is anything wrong with the current model<br>
for setting the backdoor_port. If you need to explicitly set the port for multiple<br>
services why not just use multiple config files per service?</blockquote><div><br></div><div>I decided to find out how to set a different config file per service and the only thing I could come up with is modifying the files in /etc/init.  For example, /etc/init/nova-api.conf file has a last line that looks like this:<br>
<br>exec su -s /bin/sh -c "exec nova-api --config-file=/etc/nova/nova.conf" nova<br><br></div><div>Am I correct in that changing this line is the best way to get a config file per service?<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 I don't think we want<br>
to default any behavior that auto increments from a base integer value. It gets<br>
sketchy real fast.</blockquote><div><br></div><div>Please clarify how incrementing an integer to find the next port number is any sketchier than randomly picking a port number.  At least Flavio's argument is that it isn't necessary, not that it is any worse.  Let's at least have consensus in that it isn't any worse.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Using the random assigned port with 0 is a workable solution for projects if you<br>

don't want to use multiple config files per service. Take a look at how nova<br>
uses backdoor ports. (with the coverage extension) When the service is created<br>
the backdoor port is stored in the object and an rpc call is used to query the<br>
port when necessary. This can then be exposed anyway deemed necessary (an api<br>
extension, etc.). In nova's case this is used in the coverage extension to<br>
control coverage collection and reporting on all the services.<br></blockquote><div><br></div><div>I'll admit that I read that code and still don't understand the value.  To use the backdoor you have to be on the local machine, so providing a way to get the port number remotely doesn't make sense to me, but I think it is a lack of understanding on my part.  I like the idea of either using "lsof | grep :<first two digits of port number hint>" or just grepping it out of the log files (which requires a change to log the port numbers).<br>
<br></div><div>Ray<br></div></div></div></div>