<div dir="ltr">Out of curiosity, how did you end up implementing your workflow? Through the scheduler or is the logic external to Openstack?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 15, 2021 at 11:48 AM <<a href="mailto:levonmelikbekjan@yahoo.de">levonmelikbekjan@yahoo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Sean,<br>
<br>
I am already done with my solution. Everything works as expected! :)<br>
<br>
Thank you for your support. You guys are great.<br>
<br>
Best regards<br>
Levon<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: Sean Mooney <<a href="mailto:smooney@redhat.com" target="_blank">smooney@redhat.com</a>> <br>
Gesendet: Dienstag, 15. Juni 2021 16:37<br>
An: Stephen Finucane <<a href="mailto:stephenfin@redhat.com" target="_blank">stephenfin@redhat.com</a>>; <a href="mailto:levonmelikbekjan@yahoo.de" target="_blank">levonmelikbekjan@yahoo.de</a>; <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Betreff: Re: AW: AW: Customization of nova-scheduler<br>
<br>
On Tue, 2021-06-15 at 15:18 +0100, Stephen Finucane wrote:<br>
> On Thu, 2021-06-10 at 17:21 +0200, <a href="mailto:levonmelikbekjan@yahoo.de" target="_blank">levonmelikbekjan@yahoo.de</a> wrote:<br>
> > Hi Stephen,<br>
> > <br>
> > I'm  trying to customize my nova scheduler. However, if I change the <br>
> > nova.conf as it is written here <br>
> > <a href="https://docs.openstack.org/operations-guide/de/ops-customize-compute" rel="noreferrer" target="_blank">https://docs.openstack.org/operations-guide/de/ops-customize-compute</a><br>
> > .html , then my python file cannot be found. How can I configure it <br>
> > correctly?<br>
> > <br>
> > Do you have any idea?<br>
> > <br>
> > My controller node is running with CENTOS 7. I couldn't install <br>
> > devstack because it is only supported for CENTOS 8 version.<br>
> <br>
> That document is very old. You want [1], which documents how to do <br>
> this properly.<br>
<br>
wwell that depend if they acatully want to write ther own filter yes but if they want to replace the scheduler with a new one we recently removed support for that right.<br>
previously we had several schduler implemtation like the caching scheduler and that old doc <a href="https://docs.openstack.org/operations-guide/de/ops-customize-compute.html" rel="noreferrer" target="_blank">https://docs.openstack.org/operations-guide/de/ops-customize-compute.html</a><br>
<br>
descibes on how to replace the filter scheduler dirver with an new one.<br>
we deprecated it ussuri<br>
<a href="https://github.com/openstack/nova/commit/6a4cb24d39623930fd240e67d65013803459839d" rel="noreferrer" target="_blank">https://github.com/openstack/nova/commit/6a4cb24d39623930fd240e67d65013803459839d</a><br>
<br>
and you finally removed the extention point in febuary<br>
<a href="https://github.com/openstack/nova/commit/5aeb3a387494c4559d183d1290db3c92a96dfb90" rel="noreferrer" target="_blank">https://github.com/openstack/nova/commit/5aeb3a387494c4559d183d1290db3c92a96dfb90</a><br>
so from wallaby on you can nolonger write an alternitvie schduler implemenation out of tree without reverting that.<br>
<br>
so yes<br>
<a href="https://docs.openstack.org/nova/latest/user/filter-scheduler#writing-your-own-filter" rel="noreferrer" target="_blank">https://docs.openstack.org/nova/latest/user/filter-scheduler#writing-your-own-filter</a><br>
is how you customise schduling now but you cant customise the schduler itself out fo tree anymore.<br>
<br>
> <br>
> Hope this helps,<br>
> Stephen<br>
> <br>
> [1]<br>
> <a href="https://docs.openstack.org/nova/latest/user/filter-scheduler#writing-y" rel="noreferrer" target="_blank">https://docs.openstack.org/nova/latest/user/filter-scheduler#writing-y</a><br>
> our-own-filter<br>
> <br>
> > Best regards<br>
> > Levon<br>
> > <br>
> > -----Ursprüngliche Nachricht-----<br>
> > Von: Stephen Finucane <<a href="mailto:stephenfin@redhat.com" target="_blank">stephenfin@redhat.com</a>><br>
> > Gesendet: Montag, 31. Mai 2021 18:21<br>
> > An: <a href="mailto:levonmelikbekjan@yahoo.de" target="_blank">levonmelikbekjan@yahoo.de</a>; <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
> > Betreff: Re: AW: Customization of nova-scheduler<br>
> > <br>
> > On Mon, 2021-05-31 at 13:44 +0200, <a href="mailto:levonmelikbekjan@yahoo.de" target="_blank">levonmelikbekjan@yahoo.de</a> wrote:<br>
> > > Hello Stephen,<br>
> > > <br>
> > > I am a student from Germany who is currently working on his <br>
> > > bachelor thesis. My job is to build a cloud solution for my <br>
> > > university with Openstack. The functionality should include the <br>
> > > prioritization of users. So that you can imagine exactly how the <br>
> > > whole thing should work, I would like to give you an example.<br>
> > > <br>
> > > Two cases should be solved!<br>
> > > <br>
> > > Case 1: A user A with a low priority uses a VM from Openstack with <br>
> > > half performance of the available host. Then user B comes in with <br>
> > > a high priority and needs the full performance of the host for his <br>
> > > VM. When creating the VM of user B, the VM of user A should be <br>
> > > deleted because there is not enough compute power for user B. The <br>
> > > VM of user B is successfully created.<br>
> > > <br>
> > > Case 2: A user A with a low priority uses a VM with half the <br>
> > > performance of the available host, then user B comes in with a <br>
> > > high priority and needs half of the performance of the host for his VM.<br>
> > > When creating the VM of user B, user A should not be deleted, <br>
> > > since enough computing power is available for both users.<br>
> > > <br>
> > > These cases should work for unlimited users. In order to optimize <br>
> > > the whole thing, I would like to write a function that precisely <br>
> > > calculates all performance components to determine whether enough <br>
> > > resources are available for the VM of the high priority user.<br>
> > <br>
> > What you're describing is commonly referred to as "preemptible" or <br>
> > "spot"<br>
> > instances. This topic has a long, complicated history in nova and <br>
> > has yet to be implemented. Searching for "preemptible instances <br>
> > openstack" should yield you lots of discussion on the topic along <br>
> > with a few proof-of-concept approaches using external services or <br>
> > out-of-tree modifications to nova.<br>
> > <br>
> > > I’m new to Openstack, but I’ve already implemented cloud projects <br>
> > > with Microsoft Azure and have solid programming skills. Can you <br>
> > > give me a hint where and how I can start?<br>
> > <br>
> > As hinted above, this is likely to be a very difficult project given <br>
> > the fraught history of the idea. I don't want to dissuade you from <br>
> > this work but you should be aware of what you're getting into from <br>
> > the start. If you're serious about pursuing this, I suggest you <br>
> > first do some research on prior art. As noted above, there is lots <br>
> > of information on the internet about this. With this research done, <br>
> > you'll need to decide whether this is something you want to approach <br>
> > within nova itself, via out-of-tree extensions or via a third party <br>
> > project. If you're opting for integration with nova, then you'll <br>
> > need to think long and hard about how you would design such a system <br>
> > and start working on a spec (a design document) outlining your <br>
> > proposed solution. Details on how to write a spec are discussed at <br>
> > [1]. The only extension points nova offers today are scheduler <br>
> > filters and weighers so your options for an out-of-tree extension <br>
> > approach will be limited. A third party project will arguably be the <br>
> > easiest approach but you will be restricted to talking to nova's <br>
> > REST APIs which may limit the design somewhat. This Blazar spec [2] <br>
> > could give you some ideas on this approach (assuming it was never <br>
> > actually implemented, though it may well have been).<br>
> > <br>
> > > My university gave me three compute hosts and one control host to <br>
> > > implement this solution for the bachelor thesis. I’m currently <br>
> > > setting up Openstack and all the services on the control host all <br>
> > > by myself to understand all the functionality (sorry for not using<br>
> > > Packstack) 😉. All my hosts have CentOS 7 and the minimum <br>
> > > deployment which I configure is Train.<br>
> > > <br>
> > > My idea is to work with nova schedulers, because they seem to be <br>
> > > interesting for my case. I've found a whole infrastructure <br>
> > > description of the provisioning of an instance in Openstack <br>
> > > <a href="https://docs.openstack.org/operations-guide/de/_images/provision-a" rel="noreferrer" target="_blank">https://docs.openstack.org/operations-guide/de/_images/provision-a</a><br>
> > > n-instance.png<br>
> > > .<br>
> > > <br>
> > > The nova scheduler<br>
> > > <a href="https://docs.openstack.org/operations-guide/ops-customize-compute" rel="noreferrer" target="_blank">https://docs.openstack.org/operations-guide/ops-customize-compute</a>.<br>
> > > html<br>
> > >  is the first component, where it is possible to implement <br>
> > > functions via Python and the Compute API <br>
> > > <a href="https://docs.openstack.org/api-ref/compute/?expanded=show-details-" rel="noreferrer" target="_blank">https://docs.openstack.org/api-ref/compute/?expanded=show-details-</a><br>
> > > of-specific-api-version-detail,list-servers-detail<br>
> > >  to check for active VMs and probably delete them if needed before <br>
> > > a successful request for an instantiation can be made.<br>
> > > <br>
> > > What do you guys think about it? Does it seem like a good starting <br>
> > > point for you or is it the wrong approach?<br>
> > <br>
> > This could potentially work, but I suspect there will be serious <br>
> > performance implications with this, particularly at scale. Scheduler <br>
> > filters are historically used for simple things like "find me a <br>
> > group of hosts that have this metadata attribute I set on my image". <br>
> > Making API calls sounds like something that would take significant <br>
> > time and therefore slow down the schedule process. You'd also have <br>
> > to decide what your heuristic for deciding which VM(s) to delete <br>
> > would be, since there's nothing obvious in nova that you could use.<br>
> > You could use something as simple as filter extra specs or something <br>
> > as complicated as an external service.<br>
> > <br>
> > This should be lots to get you started. Once again, do make sure <br>
> > you're aware of what you're getting yourself into before you start.<br>
> > This could get complicated very quickly :)<br>
> > <br>
> > Cheers,<br>
> > Stephen<br>
> > <br>
> > > I'm very happy to have found you!!! <br>
> > > <br>
> > > Thank you really much for your time!<br>
> > <br>
> > <br>
> > [1] <a href="https://specs.openstack.org/openstack/nova-specs/readme.html" rel="noreferrer" target="_blank">https://specs.openstack.org/openstack/nova-specs/readme.html</a><br>
> > [2]<br>
> > <a href="https://specs.openstack.org/openstack/blazar-specs/specs/ussuri/blaz" rel="noreferrer" target="_blank">https://specs.openstack.org/openstack/blazar-specs/specs/ussuri/blaz</a><br>
> > ar-preemptible-instances.html<br>
> > <br>
> > > Best regards<br>
> > > Levon<br>
> > > <br>
> > > -----Ursprüngliche Nachricht-----<br>
> > > Von: Stephen Finucane <<a href="mailto:stephenfin@redhat.com" target="_blank">stephenfin@redhat.com</a>><br>
> > > Gesendet: Montag, 31. Mai 2021 12:34<br>
> > > An: Levon Melikbekjan <<a href="mailto:levonmelikbekjan@yahoo.de" target="_blank">levonmelikbekjan@yahoo.de</a>>; <br>
> > > <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
> > > Betreff: Re: Customization of nova-scheduler<br>
> > > <br>
> > > On Wed, 2021-05-26 at 22:46 +0200, Levon Melikbekjan wrote:<br>
> > > > Hello Openstack team,<br>
> > > > <br>
> > > > is it possible to customize the nova-scheduler via Python? If <br>
> > > > yes, how?<br>
> > > <br>
> > > Yes, you can provide your own filters and weighers. This is <br>
> > > documented at [1].<br>
> > > <br>
> > > Hope this helps,<br>
> > > Stephen<br>
> > > <br>
> > > [1]<br>
> > > <a href="https://docs.openstack.org/nova/latest/user/filter-scheduler#writi" rel="noreferrer" target="_blank">https://docs.openstack.org/nova/latest/user/filter-scheduler#writi</a><br>
> > > ng-y<br>
> > > our-own-filter<br>
> > > <br>
> > > > <br>
> > > > Best regards<br>
> > > > Levon<br>
> > > > <br>
> > > <br>
> > > <br>
> > <br>
> > <br>
> <br>
> <br>
> <br>
<br>
<br>
<br>
</blockquote></div>