<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>This begins to sound like a hierarchical reservation system to me. Are databases even capable of doing this correctly?</div>
<div><br>
</div>
<div>If I was going to do something like this say in zookeeper it would appear that this is just a atomic write to paths to resources (using the concept of a zookeeper txn to ensure this write happens atomically). With gantt will there be read-db slaves, or
just 1 database. Will there be some required hierarchal locking scheme (always lock in the same order) like zookeeper would require (to avoid deadlock)? If more than 1 db (master-master, master-slave?), how will this work? Forgive me for my limited DB knowledge,
but I thought RDBMs used MVCC which means that the read could be different data than what is written (so the write will fail?). What about using something like raft,zookeeper,…</div>
<div><br>
</div>
<div>-Josh</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Chris Friesen <<a href="mailto:chris.friesen@windriver.com">chris.friesen@windriver.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Monday, March 17, 2014 at 2:08 PM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [nova] question about e41fb84 "fix anti-affinity race condition on boot"<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>
<div>
<div>On 03/17/2014 02:30 PM, Sylvain Bauza wrote:</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>There is a global concern here about how an holistic scheduler can</div>
<div>perform decisions, and from which key metrics.</div>
<div>The current effort is leading to having the Gantt DB updated thanks to</div>
<div>resource tracker for scheduling appropriately the hosts.</div>
<div><br>
</div>
<div>If we consider these metrics as not enough, ie. that Gantt should</div>
<div>perform an active check to another project, that's something which needs</div>
<div>to be considered carefully. IMHO, on that case, Gantt should only access</div>
<div>metrics thanks to the project REST API (and python client) in order to</div>
<div>make sure that rolling upgrades could happen.</div>
<div>tl;dr: If Gantt requires accessing Nova data, it should request Nova</div>
<div>REST API, and not perform database access directly (even thru the conductor)</div>
</blockquote>
<div><br>
</div>
<div>Consider the case in point.</div>
<div><br>
</div>
<div>1) We create a server group with anti-affinity policy. (So no two </div>
<div>instances in the group should run on the same compute node.)</div>
<div>2) We boot a server in this group.</div>
<div>3) Either simultaneously (on a different scheduler) or immediately after </div>
<div>(on the same scheduler) we boot another server in the same group.</div>
<div><br>
</div>
<div>Ideally the scheduler should enforce the policy without any races. </div>
<div>However, in the current code we don't update the instance entry in the </div>
<div>database with the chosen host until we actually try and create it on the </div>
<div>host. Because of this we can end up putting both of them on the same </div>
<div>compute node.</div>
<div><br>
</div>
<div>Currently we only detect the problem when we go to actually boot the </div>
<div>instance on the compute node because we have a special-case check to </div>
<div>validate the policy. Personally I think this is sort of a hack and it </div>
<div>would be better to detect the problem within the scheduler itself.</div>
<div><br>
</div>
<div>This is something that the scheduler should reasonably consider. I see </div>
<div>it as effectively consuming resources, except that in this case the </div>
<div>resource is "the set of compute nodes not used by servers in the server </div>
<div>group".</div>
<div><br>
</div>
<div>Chris</div>
<div><br>
</div>
<div>_______________________________________________</div>
<div>OpenStack-dev mailing list</div>
<div><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a></div>
<div><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></div>
<div><br>
</div>
</div>
</div>
</blockquote>
</span>
</body>
</html>