<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">The service reference is created in the start method of the service. This happens around line 217 in nova/service.py in the current code. You should be able to do something similar by sending a message to service_create on conductor. It will return an error if the service already exists. Note you can also use service_get_by_args in conductor to see if the service exists.<div><br></div><div>Vish</div><div><br><div><div><div>On Apr 15, 2014, at 9:22 PM, Swapnil S Kulkarni <<a href="mailto:coolsvap@gmail.com">coolsvap@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Interesting discussion. Forwarding to openstack-dev.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 9:34 AM, Prashant Upadhyaya <span dir="ltr"><<a href="mailto:prashant.upadhyaya@aricent.com" target="_blank">prashant.upadhyaya@aricent.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am writing a Compute Node Simulator.<u></u><u></u></p><p class="MsoNormal">The idea is that I would write a piece of software using C which honors the RabbitMQ interface towards the Controller, but will not actually do the real thing – everything on the Compute Node will be simulated by my simulator software.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The  problem I am facing, that I have not been able to get my simulated CN listed in the output of
<u></u><u></u></p><p class="MsoNormal">nova-manage service list<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am on Havana, and my simulator is sending a periodic  ‘service_update’ and ‘compute_node_update’ RPC messages to the ‘nova’ exchange and the ‘conductor’ routing key.<u></u><u></u></p><p class="MsoNormal">I can manipulate the above messages at will to fool the controller.<u></u><u></u></p><p class="MsoNormal">(I observe the messages from a real CN and take cues from there to construct a fake one from my simulator)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Question is – what causes the controller to add a new Nova Compute in its database, is it the ‘service_update’ RPC or something else.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hopefully you can help me reverse engineer the interface.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards<u></u><u></u></p><p class="MsoNormal">-Prashant<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p>
</div>
<br>
<font face="Arial" color="Gray" size="1"><br>
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what
 it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this
 message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."<br>
</font>
</div>

<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div></div>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote></div><br></div></div></body></html>