Skip to content
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

Support labelSelect for vm scheduler #154

Open
gsakun opened this issue Feb 20, 2024 · 8 comments
Open

Support labelSelect for vm scheduler #154

gsakun opened this issue Feb 20, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@gsakun
Copy link

gsakun commented Feb 20, 2024

Currently,virtual machines can only be scheduled to appropriate worker based on resource. I hope schedule virtual machines to relevant worker based on labelselect like k8s pod.I would like to do this task.

@fkorotkov fkorotkov added the enhancement New feature or request label Feb 21, 2024
@fkorotkov
Copy link
Contributor

What is your use case? We though about adding node selection down the line but haven't figured a use case. In most cases people have identical nodes in the cluster (bunch of Mac Minis).

@gsakun
Copy link
Author

gsakun commented Feb 22, 2024

What is your use case? We though about adding node selection down the line but haven't figured a use case. In most cases people have identical nodes in the cluster (bunch of Mac Minis).

In our usage scenario, we want CI tasks to be fixed on certain nodes as much as possible in order to reuse the cache efficiently.

Some projects have a high priority and require dedicated machines. The remaining projects can reuse the machines.

@edigaryev
Copy link
Collaborator

edigaryev commented Feb 22, 2024

In our usage scenario, we want CI tasks to be fixed on certain nodes as much as possible in order to reuse the cache efficiently.

You can easily achieve this with resource management.

Simply provide a single resource to a subset of workers (e.g. tart-vms-high-priority: 2) and then create VMs that specifically request this resource (orchard create vm --resources tart-vms-high-priority=1).

This will ensure that these VMs will only be scheduled on a subset of desired workers.

@fkorotkov
Copy link
Contributor

You can even introduce an artificial "project-name-cache" resource on some nodes to gurantee that cache of a certain project will be available there.

@gsakun gsakun closed this as completed Feb 23, 2024
@gsakun gsakun reopened this Feb 23, 2024
@gsakun
Copy link
Author

gsakun commented Feb 23, 2024

In our usage scenario, we want CI tasks to be fixed on certain nodes as much as possible in order to reuse the cache efficiently.

You can easily achieve this with resource management.

Simply provide a single resource to a subset of workers (e.g. tart-vms-high-priority: 2) and then create VMs that specifically request this resource (orchard create vm --resources tart-vms-high-priority=1).

This will ensure that these VMs will only be scheduled on a subset of desired workers.

Resources are already set when the worker is initialized and cannot be dynamically configured. And not flexible enough.

@gsakun
Copy link
Author

gsakun commented Feb 23, 2024

You can even introduce an artificial "project-name-cache" resource on some nodes to gurantee that cache of a certain project will be available there.

Therefore, it is necessary to schedule the vm at the specified node in combination with the selection criteria

@edigaryev
Copy link
Collaborator

Therefore, it is necessary to schedule the vm at the specified node in combination with the selection criteria

Would you mind providing a minimalistic example to demonstrate your point? I.e. which labels you'd set on workers and which labels you'd use when creating VMs.

@gsakun
Copy link
Author

gsakun commented Feb 26, 2024

Therefore, it is necessary to schedule the vm at the specified node in combination with the selection criteria

Would you mind providing a minimalistic example to demonstrate your point? I.e. which labels you'd set on workers and which labels you'd use when creating VMs.

Yes, what I want to implement is to schedule the vm to a certain machine based on the labelSelect.
for example,Now I own four MacMini.I labeled the first two machines role=test,When I create the vm, I set the selection condition of role=test to ensure that the vm will only be scheduled to the machine that has this label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants