<html><body>
<p><tt><font size="2">VTJ NOTSU Arata <notsu@virtualtech.jp> wrote on 08/27/2012 07:30:40 PM:<br>
<br>
> From: VTJ NOTSU Arata <notsu@virtualtech.jp></font></tt><br>
<tt><font size="2">> To: Michael J Fork/Rochester/IBM@IBMUS, </font></tt><br>
<tt><font size="2">> Cc: David Kang <dkang@isi.edu>, "openstack@lists.launchpad.net <br>
> (openstack@lists.launchpad.net)" <openstack@lists.launchpad.net>, <br>
> openstack-bounces+mjfork=us.ibm.com@lists.launchpad.net, OpenStack <br>
> Development Mailing List <openstack-dev@lists.openstack.org></font></tt><br>
<tt><font size="2">> Date: 08/27/2012 07:30 PM</font></tt><br>
<tt><font size="2">> Subject: Re: [Openstack] [openstack-dev] Discussion about where to <br>
> put database for bare-metal provisioning (review 10726)</font></tt><br>
<tt><font size="2">> <br>
> Hi Michael,<br>
> <br>
> > Looking at line 203 in nova/scheduler/filter_scheduler.py, the <br>
> target host in the cast call is weighted_host*.*host_state*.*host <br>
> and not a service host. (My guess is this will likely require a fair<br>
> number of changes in the scheduler area to change cast calls to <br>
> target a service host instead of a compute node)<br>
> <br>
> weighted_host.host_state.host still seems to be service['host']...<br>
> Please look at it again with me.<br>
> <br>
> # First, HostStateManager.get_all_host_states:<br>
> # host_manager.py:264<br>
>          compute_nodes = db.compute_node_get_all(context)<br>
>          for compute in compute_nodes:<br>
> # service is from services table (joined-loaded with compute_nodes)<br>
>              service = compute['service']<br>
>              if not service:<br>
>                  LOG.warn(_("No service for compute ID %s") % compute['id'])<br>
>                  continue<br>
>              host = service['host']<br>
>              capabilities = self.service_states.get(host, None)<br>
> # go to HostState constructor:<br>
> # the 1st parameter 'host' is service['host']<br>
>              host_state = self.host_state_cls(host, topic,<br>
>                      capabilities=capabilities,<br>
>                      service=dict(service.iteritems()))<br>
> <br>
> # host_manager.py:101<br>
>      def __init__(self, host, topic, capabilities=None, service=None):<br>
>          self.host = host<br>
>          self.topic = topic<br>
> # here, HostState.host is service['host']<br>
> <br>
> Then, update_from_compute_node(compute) is called but it leaves <br>
> self.host unchanged.<br>
> WeightedHost.host_state is this HostState. So, host at <br>
> filter_scheduler.py:203 is service['host']. We can use existing code<br>
> about RPC target. Do I miss something?</font></tt><br>
<br>
<tt><font size="2">Agreed, you can use the existing RPC target.  Sorry for the confusion.  This actually answers the question in David's last e-mail asking if the host field can be used from the services table - it already is.</font></tt><br>
<tt><font size="2"> <br>
> Thanks,<br>
> Arata<br>
> <br>
> <br>
</font></tt><br>
<tt><font size="2"><BIG SNIP></font></tt><br>
<tt><font size="2"><br>
</font></tt><br>
<font size="2" face="sans-serif">Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Cloud Architect, Emerging Solutions<br>
IBM Systems & Technology Group</font></body></html>