-
Notifications
You must be signed in to change notification settings - Fork 13
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
equinix-metal: recycle existing instances #268
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tormath1
changed the title
equinix/metal: recycle existing instances
[wip] equinix/metal: recycle existing instances
Dec 14, 2021
pothos
reviewed
Dec 14, 2021
pothos
reviewed
Dec 14, 2021
pothos
reviewed
Dec 14, 2021
pothos
reviewed
Dec 14, 2021
tormath1
force-pushed
the
tormath1/em
branch
from
December 15, 2021 12:52
ecf580f
to
2315216
Compare
pothos
reviewed
Dec 15, 2021
pothos
reviewed
Dec 15, 2021
pothos
reviewed
Dec 15, 2021
tormath1
changed the title
[wip] equinix/metal: recycle existing instances
equinix/metal: recycle existing instances
Dec 16, 2021
tormath1
changed the title
equinix/metal: recycle existing instances
equinix-metal: recycle existing instances
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
pothos
reviewed
Dec 16, 2021
tormath1
force-pushed
the
tormath1/em
branch
from
December 17, 2021 09:52
7f0bcbc
to
34decbb
Compare
pothos
reviewed
Dec 17, 2021
pothos
reviewed
Dec 17, 2021
pothos
reviewed
Dec 17, 2021
pothos
approved these changes
Dec 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, didn't test myself ;)
I just started a final test:
we should have max 6 devices created (the kubeadm tests create 3 machines each, the others just one each). Result: We got a maximum of 5 instances created and 3 instances have been recycled. |
we keep a trace of opened SSH client in order to close them properly later. Signed-off-by: Mathieu Tortuyaux <[email protected]>
we can now open, keep a trace and delete properly a SSH client. When the instance is created, its SSH client will be stored and closed when the device is marked as available. Signed-off-by: Mathieu Tortuyaux <[email protected]>
This devicesPool will be used to keep the devices _after_ being used in order to create a pool of available device to be picked-up later instead of creating a new device. Signed-off-by: Mathieu Tortuyaux <[email protected]>
before creating a device we check if there are some available devices into a created pool of device. if one device is available this one will be updated in place in order to boot with a new PXE configuration to load fresh configuration without destroying the server. Signed-off-by: Mathieu Tortuyaux <[email protected]>
since the mach.Destroy only adds devices to the pool, we don't need to rely on it to actually remove a device. Signed-off-by: Mathieu Tortuyaux <[email protected]>
we now define CreateOrUpdateDevice. Signed-off-by: Mathieu Tortuyaux <[email protected]>
Signed-off-by: Mathieu Tortuyaux <[email protected]>
tormath1
force-pushed
the
tormath1/em
branch
from
December 17, 2021 13:26
34decbb
to
4fb3794
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, we add the ability to mantle test to reuse existing Equinix Metal instances and to keep them into a pool of devices in the Flight lifecycle.
Closes: flatcar/Flatcar#551
changelog/
directory (user-facing change, bug fix, security fix, update)