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

equinix-metal: recycle existing instances #268

Merged
merged 7 commits into from
Dec 17, 2021
Merged

Commits on Dec 17, 2021

  1. platform/machine/em/console: keep SSH client

    we keep a trace of opened SSH client in order to close them properly later.
    
    Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    c95e84c View commit details
    Browse the repository at this point in the history
  2. platform/machine/em/console: handle SSH clients

    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 <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    59a8b39 View commit details
    Browse the repository at this point in the history
  3. platform/machine/em: add pool of devices

    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 <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    d5d3c6d View commit details
    Browse the repository at this point in the history
  4. platform/api/packet: recycle existing devices

    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 <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    409d142 View commit details
    Browse the repository at this point in the history
  5. platform/machine/packet: use API to delete device

    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 <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    740232f View commit details
    Browse the repository at this point in the history
  6. cmd/ore: update CreateDevice method

    we now define CreateOrUpdateDevice.
    
    Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    9de93d1 View commit details
    Browse the repository at this point in the history
  7. changelog: add entry

    Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
    tormath1 committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    4fb3794 View commit details
    Browse the repository at this point in the history