Hello Stephen, I am a student from Germany who is currently working on his bachelor thesis. My job is to build a cloud solution for my university with Openstack. The functionality should include the prioritization of users. So that you can imagine exactly how the whole thing should work, I would like to give you an example. Two cases should be solved! Case 1: A user A with a low priority uses a VM from Openstack with half performance of the available host. Then user B comes in with a high priority and needs the full performance of the host for his VM. When creating the VM of user B, the VM of user A should be deleted because there is not enough compute power for user B. The VM of user B is successfully created. Case 2: A user A with a low priority uses a VM with half the performance of the available host, then user B comes in with a high priority and needs half of the performance of the host for his VM. When creating the VM of user B, user A should not be deleted, since enough computing power is available for both users. These cases should work for unlimited users. In order to optimize the whole thing, I would like to write a function that precisely calculates all performance components to determine whether enough resources are available for the VM of the high priority user. I’m new to Openstack, but I’ve already implemented cloud projects with Microsoft Azure and have solid programming skills. Can you give me a hint where and how I can start? My university gave me three compute hosts and one control host to implement this solution for the bachelor thesis. I’m currently setting up Openstack and all the services on the control host all by myself to understand all the functionality (sorry for not using Packstack) 😉. All my hosts have CentOS 7 and the minimum deployment which I configure is Train. My idea is to work with nova schedulers, because they seem to be interesting for my case. I've found a whole infrastructure description of the provisioning of an instance in Openstack https://docs.openstack.org/operations-guide/de/_images/provision-an-instance.... The nova scheduler https://docs.openstack.org/operations-guide/ops-customize-compute.html is the first component, where it is possible to implement functions via Python and the Compute API https://docs.openstack.org/api-ref/compute/?expanded=show-details-of-specifi... to check for active VMs and probably delete them if needed before a successful request for an instantiation can be made. What do you guys think about it? Does it seem like a good starting point for you or is it the wrong approach? I'm very happy to have found you!!! Thank you really much for your time! Best regards Levon -----Ursprüngliche Nachricht----- Von: Stephen Finucane <stephenfin@redhat.com> Gesendet: Montag, 31. Mai 2021 12:34 An: Levon Melikbekjan <levonmelikbekjan@yahoo.de>; openstack@lists.openstack.org Betreff: Re: Customization of nova-scheduler On Wed, 2021-05-26 at 22:46 +0200, Levon Melikbekjan wrote:
Hello Openstack team,
is it possible to customize the nova-scheduler via Python? If yes, how?
Yes, you can provide your own filters and weighers. This is documented at [1]. Hope this helps, Stephen [1] https://docs.openstack.org/nova/latest/user/filter-scheduler#writing-your-ow...
Best regards Levon