← Back to team overview

openstack team mailing list archive

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

 

VTJ NOTSU Arata <notsu@xxxxxxxxxxxxxx> wrote on 08/27/2012 07:30:40 PM:

> From: VTJ NOTSU Arata <notsu@xxxxxxxxxxxxxx>
> To: Michael J Fork/Rochester/IBM@IBMUS,
> Cc: David Kang <dkang@xxxxxxx>, "openstack@xxxxxxxxxxxxxxxxxxx
> (openstack@xxxxxxxxxxxxxxxxxxx)" <openstack@xxxxxxxxxxxxxxxxxxx>,
> openstack-bounces+mjfork=us.ibm.com@xxxxxxxxxxxxxxxxxxx, OpenStack
> Development Mailing List <openstack-dev@xxxxxxxxxxxxxxxxxxx>
> 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

References