-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instance placement scriptlet extension #652
Comments
Im interested in working on this issue, can I be assigned to it please? |
So as mentioned, the goal here is to expose two new functions to instance scriptlets.
This will need API extensions, let's go with one for each function, so:
The functions themselves need to be added to We'll want For As far as commits for this one, it should be a somewhat repetitive:
For testing, you'd need an Incus cluster with at least two servers in it. |
Is this still being worked on? If not can I pick this up? Love the project and would like to start contributing! |
Hey @awalvie, this is currently assigned to a group of student to work on. If the group in question somehow can't resolve this one, I'll be happy to assign it to you. I realize we're a bit short on unassigned issues right now (weird problem to have ;)), but I just opened #741 which may be interesting for you, though a completely different part of Incus :) |
Haha, it's a good problem to have though! I'll check out the linked issue! |
Hello @stgraber We have a few questions regarding this issue:
|
The commit Your changes to
No, those are client-side functions, you're running from within the server, so in the server, you instead hit the database functions which in this case would be
That function takes an |
Thank you for answering our previous questions @stgraber ! We want to ask for clarification on the get_cluster_members function. Since GetNodes() returns a list of NodeInfo, should we be passing that list into GetCandidateMembers(...) to filter offline nodes or is looping through the list and checking for the group enough? |
I think it'd make sense to filter the list based on what's allowed, so indeed limiting it to the list of candidates. |
Ok that makes sense. Also, since ToAPI(...) takes NodeInfoArgs as the third parameter, should we be setting the fields in the struct similar to how it's being done in instance_placement.go (near the bottom of it)? |
Yeah, that should be fine. |
Currently, the instance placement scriptlet does not have enough functionality to implement even the default scheduler. Some extra functionality is needed both to be able to reproduce it and to extend it in simple ways.
This was discussed int this linuxcontainers forum post.
The desired extra functionality would be the following:
get_instances
function which would then take optional project and/or location args. We should be able to obtain instance configuration options and cluster node placement from this list.get_cluster_members
function taking as input a cluster group to return a list of cluster nodes in that cluster group.The text was updated successfully, but these errors were encountered: