<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 12:29 PM, Andrew Laski <span dir="ltr"><<a href="mailto:andrew.laski@rackspace.com" target="_blank">andrew.laski@rackspace.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 03/17/14 at 01:11pm, Chris Friesen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 03/17/2014 11:59 AM, John Garbutt wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 17 March 2014 17:54, John Garbutt <<a href="mailto:john@johngarbutt.com" target="_blank">john@johngarbutt.com</a>> wrote:<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Given the scheduler split, writing that value into the nova db from<br>
the scheduler would be a step backwards, and it probably breaks lots<br>
of code that assumes the host is not set until much later.<br>
</blockquote></blockquote>
<br>
Why would that be a step backwards? The scheduler has picked a host for the instance, so it seems reasonable to record that information in the instance itself as early as possible (to be incorporated into other decision-making) rather than have it be implicit in the destination of the next RPC message.<br>
<br>
Now I could believe that we have code that assumes that having "instance.host" set implies that it's already running on that host, but that's a different issue.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I forgot to mention, I am starting to be a fan of a two-phase commit<br>
approach, which could deal with these kinds of things in a more<br>
explicit way, before starting the main boot process.<br>
<br>
Its not as elegant as a database transaction, but that doesn't seems<br>
possible in the log run, but there could well be something I am<br>
missing here too.<br>
</blockquote>
<br>
I'm not an expert in this area, so I'm curious why you think that database transactions wouldn't be possible in the long run.<br>
</blockquote>
<br></div>
There has been some effort around splitting the scheduler out of Nova and into its own project. So down the road the scheduler may not have direct access to the Nova db.</blockquote><div><br></div><div>If we do pull out the nova scheduler it can have its own DB, so I don't think this should be an issue.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Given that the database is one of the few services that isn't prone to races, it seems reasonable to me to implement decision-making as transactions within the database.<br>
<br>
Where possible it seems to make a lot more sense to have the database do an atomic transaction than to scan the database, extract a bunch of (potentially unnecessary) data and transfer it over the network, do logic in python, send the result back over the network and update the database with the result.<br>
<br>
Chris<br>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>