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.

Vish

On Apr 15, 2014, at 9:22 PM, Swapnil S Kulkarni <[email protected]> wrote:

> Interesting discussion. Forwarding to openstack-dev.
> 
> 
> On Wed, Apr 16, 2014 at 9:34 AM, Prashant Upadhyaya 
> <[email protected]> wrote:
> Hi,
> 
>  
> 
> I am writing a Compute Node Simulator.
> 
> 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.
> 
>  
> 
> The  problem I am facing, that I have not been able to get my simulated CN 
> listed in the output of
> 
> nova-manage service list
> 
>  
> 
> 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.
> 
> I can manipulate the above messages at will to fool the controller.
> 
> (I observe the messages from a real CN and take cues from there to construct 
> a fake one from my simulator)
> 
>  
> 
> Question is – what causes the controller to add a new Nova Compute in its 
> database, is it the ‘service_update’ RPC or something else.
> 
>  
> 
> Hopefully you can help me reverse engineer the interface.
> 
>  
> 
> Regards
> 
> -Prashant
> 
>  
> 
>  
> 
> 
> 
> "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."
> 
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : [email protected]
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> [email protected]
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to