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

Figure out checking if given hardware ID is available to use #15

Closed
invidian opened this issue Dec 14, 2020 · 5 comments · Fixed by #32
Closed

Figure out checking if given hardware ID is available to use #15

invidian opened this issue Dec 14, 2020 · 5 comments · Fixed by #32
Assignees
Milestone

Comments

@invidian
Copy link
Contributor

Right now we ask user to select hardware IDs which should be used for nodes, but we could as well pick any available hardware from Tinkerbell server. In both cases, we need to check if given hardware is ready to run workflows. The easiest way of doing this is just to see if there are any workflows associated with a given hardware.

@invidian invidian self-assigned this Dec 14, 2020
@gianarb
Copy link
Contributor

gianarb commented Dec 15, 2020

I think @mmlb and @splaspood @markyjackson-taulia can give us an idea about how to do this moving forward not for v0.1.0 (tech preview)

we need to check if the given hardware is ready to run workflows.

In practice, we have to identify if give hardware can be a good candidate for provisioning. I think using the previous workflow is an easy way to do it and it will work for v0.1.0 but moving forward we will have to use a combination of factors.

For not it works mainly because deprovisioning and machine update won't be supported in v0.1.0. For v0.1.0 the lifecycle is the simples one as possible I presume:

  1. Create a Cluster via kubectl apply
  2. Identify nodes that didn't run a workflow yet because it means they are available
  3. Run workflow

That's it.

@invidian
Copy link
Contributor Author

@invidian
Copy link
Contributor Author

Note, that code above is vulnerable to TOCTOU. In the future we should have some sort of locking mechanism, which will allow us to reserve hardware for a given cluster.

@gianarb
Copy link
Contributor

gianarb commented Dec 16, 2020

Note, that code above is vulnerable to TOCTOU. In the future we should have some sort of locking mechanism, which will allow us to reserve hardware for a given cluster.

I still think we should specify a list of hardware ID because I don't want to use all my 10 NUCs for ClusterAPI :P but yes! We also need something smarter than a list! xD

@invidian
Copy link
Contributor Author

invidian commented Jan 6, 2021

I'm reworking #17 right now to make it based on #8, so we can use most likely labels to figure out if hardware is available.

@invidian invidian added this to the v0.1.0 milestone Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants