[openstack-dev] [Openstack] Discussion about where to put database for bare-metal provisioning (review 10726)

Michael J Fork mjfork at us.ibm.com
Tue Aug 28 00:49:34 UTC 2012


VTJ NOTSU Arata <notsu at virtualtech.jp> wrote on 08/27/2012 07:30:40 PM:

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

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.

> Thanks,
> Arata
>
>

<BIG SNIP>


Michael

-------------------------------------------------
Michael Fork
Cloud Architect, Emerging Solutions
IBM Systems & Technology Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120827/6856be29/attachment-0001.html>


More information about the OpenStack-dev mailing list