Skip to content

Fallback instance type #569

Closed
Closed

Description

@Kostiantyn-Vorobiov

A feature request: The possibility to specify secondary instance type in case of "There is no Spot capacity available that matches your request", code: 'InsufficientInstanceCapacity' error.

I think we could have a fallback launch template with another instance type or overwrite InstanceType in the current launch template in case if AWS answers with 'InsufficientInstanceCapacity' error.

Activity

  1. MitkoTschimev commented on Feb 21, 2021

    @MitkoTschimev

    Yes, we had the same issue and our idea was to do the same. Is someone already working on it?

  2. Kostiantyn-Vorobiov commented on Feb 22, 2021

    @Kostiantyn-Vorobiov
    Author

    Here is a WIP for this idea - Kostiantyn-Vorobiov#1 (haven't tested in the real environment)
    Any thoughts? I'm not a TS guy @gertjanmaas, @npalm

  3. gertjanmaas commented on Feb 23, 2021

    @gertjanmaas
    Contributor

    Hi @Kostiantyn-Vorobiov.

    I really like the idea. I don't think the implementation will work because we use EC2 Launch Templates. As far as I know the Launch Templates options and the instance type options do not mix in the runInstances call.

    So instead of changing the instance type, we could create a second Launch Template in Terraform and change the launchTemplateName and launchTemplateVersion to the secondary template on a InsufficientInstanceCapacity error. See terraform code here: https://github.com/philips-labs/terraform-aws-github-runner/blob/8ed8a8491298d5023f37b207e432e92129183adc/modules/runners/main.tf#L36

    @npalm how does this sound to you?

  4. Kostiantyn-Vorobiov commented on Feb 23, 2021

    @Kostiantyn-Vorobiov
    Author

    According to the documentation -
    "LaunchTemplate — (map) -
    The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template."
    So there is a chance that it could work in this way. But the second launch template could also work fine.

    Also, there is a more robust solution with spot fleet requests. But that requires a lot of changes.

  5. npalm commented on Feb 24, 2021

    @npalm
    Member
  6. npalm commented on Feb 24, 2021

    @npalm
    Member

    @Kostiantyn-Vorobiov feel free to open a draft (WIP) PR

  7. mcaulifn commented on Jun 15, 2021

    @mcaulifn
    Contributor

    This should be resolved by #898

  8. npalm commented on Dec 2, 2021

    @npalm
    Member

    Fallback is available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions