<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);"></span>
<div>
<div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex;">
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">On 04/10/2019 05:47 AM, Dmitry Tantsur wrote:</span><br>
</div>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">> On 4/9/19 7:20 PM, Jay Pipes wrote:</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>> On 04/09/2019 12:51 PM, Dmitry Tantsur wrote:</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>>  From ironic perspective there is no issue, but there is a critical
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> question to decide: when Ironic+Placement is used, which of them acts
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> as the final authority? If Ironic, then we need to teach Placement to
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> talk to its Allocation API when allocating a bare metal node. If
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> Placement, then we need to support Allocation API talking to
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> Placement. I suspect the latter is saner, but I'd like to hear more
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>>> opinions.</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>></span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>> Ironic (scheduler?) would request candidates from the placement
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>> service using the GET /allocation_candidates API. Ironic (scheduler?)
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>> would then claim the resources on a provider (a baremetal node) by
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>> calling the POST /allocations API.</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">> Okay, this matches my expectation.</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">>
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">> My concern will be with Blazar and reservations. If reservations happen
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">> through Placement only, how will ironic know about them? I guess we need
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">> to teach Blazar to talk to Ironic, which in turn will talk to Placement.</span><br>
<br>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">Hmm. So, here's the problem: placement has no concept of time. [1]</span><br>
</div>
<br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">Placement only knows about one period of time: now. Placement doesn't
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">have any concept of an allocation or an inventory existing at some point
</span><br>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">in the future or in the past.</span><br>
</div>
<br>
</blockquote>
<div>Just to play devil's advocate... what about changing/adding this? What if Placement did support an inventory having different states depending on time frame requested? In my mind this would enable a more ideal division of responsibility:</div>
<div>
<ul>
<li>Placement manages the availability of resources and maintains the single source of truth for inventory at a given time.</li><li>Blazar uses Placement as its default inventory backend. Blazar's main role now is business logic around quota and handling allocation/deallocation when a lease starts/ends.</li><ul>
<li>But, Blazar could optionally use a different inventory backend, to allow standalone use (?)<br>
</li></ul>
<li>Ironic uses Placement as its default inventory backend.</li><ul>
<li>But, Ironic could optionally also manage its own inventory, to allow standalone use (?)</li></ul>
</ul>
<div>To further tease out the relationships here, we should think about what makes the most sense for baremetal reservations done via Blazar. Should Blazar always go to Ironic for this, ignoring Nova entirely? Or should it go through Nova if Nova is being used?
 I believe Blazar still will always have to go through Nova for instance reservations at minimum.</div>
<div><br>
</div>
<div>Keep in mind that Blazar is designed to integrate with arbitrary external services; currently it has integrations with Neutron (for provisioning Floating IPs as part of a lease), and it could support any number of other resources, like bandwidth on an
 uplink.</div>
<div><br>
</div>
<div>Having learned more about Placement's design as a result of these threads, I'm excited about how it could make some things cleaner if it truly could handle the generic inventory management problem that advanced reservations pose.</div>
</div>
<div><br>
</div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex;">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">Therefore, Blazar must unfortunately keep all of the temporal state
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">about reservations in its own data store. So, Ironic would actually have
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">to talk to Blazar to create a reservation of some amount of resources
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">and Blazar will need to call Placement to manage the state of resource
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">inventory and allocations over time; as reservations are activated,
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">Blazar will either create or swap allocation records in Placement to
</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">consume the Ironic resources for a tenant that made the reservation.</span><br>
<br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">Best,</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">-jay</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">​</span><br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);">[1] this was a mistake for which I take full responsibility.</span><br>
</blockquote>
</div>
<div><br>
</div>
<div>Cheers,<br>
</div>
<div>/Jason<br>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; line-height: normal; color: rgb(0, 0, 0);"></span></div>
</div>
</body>
</html>