<div dir="ltr">Hey Jay!<div><br></div><div>I was looking at implementing a few scheduling algorithms of my own natively into OpenStack, and for that I went through the nova-scheduler. After going through the scheduler, I felt that it was not very easy to implement or extend and add new scheduling algorithms to the scheduler. The only things that I felt that I could change or maybe was provisioned for adding or extending were the filters and weighers and implementing new scheduling algorithms with just these 2 knobs was a little hard. I did change the code in the filter_scheduler to get some basic algorithms running like the first and next fit apart from the spreading and stacking which was already present. But to go beyond and to implement more complex algorithms was much harder and I would have to change a lot of code in different places that could as a side effect also break things and didn't seem clean. I might be wrong and might have not understood things right, please correct me if so. </div><div><br></div><div>To give an example of what I mean by a little complex scheduling algorithms: a subset matching algorithm - that schedules multiple heterogeneous requests by picking out a subset from the requests that best fit a host/s, so this would improve the utilization. The prerequisite for this is that I have multiple heterogeneous requests lined up to be scheduled. So for this kind of an algorithm it isnt easy to implement into OpenStack.</div><div><br></div><div>So a workaround that I'm working on for implementing different scheduling algorithms is by building a scheduling wrapper outside of the OpenStack architecture, where the user interacts with this wrapper and in the wrapper I get the host details from the database and based on the algorithm I want, the scheduler chooses the host for the request and gives out a VM : Host mapping (The wrapper does the sanity checks that the filters do to check if the host can accommodate or handle the request). Along with the request, I also want to pass this mapping that the scheduler can use to assign the request to the host passed in the mapping. I've written a filter that filters all the hosts apart from the host that I sent and this is how I make sure that the request gets placed on the host that I had passed. I have come up with a hack to pass the host to the scheduler, but it is not quite elegant. </div><div><br></div><div>Would be great to have your input on the same! </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 8, 2016 at 12:51 AM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Apologies for the delayed responses. Comments inline.<span class=""><br>
<br>
On 01/27/2016 02:29 AM, Dhvanan Shah wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey Jay!<br>
<br>
Thanks for the clarification. There was another thing that I wanted to<br>
know, is there any provision to pass extra arguments or some extra<br>
specifications along with the VM request to nova. To give you some<br>
context, I wanted to pass a host:vm mapping to the nova scheduler for<br>
its host selection process, and I'm providing this mapping from outside<br>
of the openstack architecture.<br>
</blockquote>
<br></span>
Why do you want to do this? The scheduler is the thing that sets the host -> vm mapping -- that's what the process of scheduling does.<span class=""><br>
<br>
> So I need to send this information along<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
with the request to the scheduler. One way of doing this was creating<br>
new flavors with their extra specification as different hosts, but that<br>
would lead to as you pointed out earlier a "flavor explosion" problem.<br>
<br>
So is there a way to pass some extra arguments or some additional<br>
information to nova.<br>
</blockquote>
<br></span>
Depends what exactly you are trying to pass to Nova. Could you give some more information about your use case?<br>
<br>
Thanks!<span class="HOEnZb"><font color="#888888"><br>
-jay<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dhvanan Shah</div></div>
</div>