Skip to content

Add instance to affinity group popup should list only stopped instances #2794

Closed

Description

@askfongjojo

When attempting to add an instance that isn't in the stopped state to an affinity group, user gets an error:

error; status code: 400 Bad Request
{
  "error_code": "InvalidRequest",
  "message": "Instance cannot be added to anti-affinity group with reservation",
  "request_id": "dbcaf573-733e-49ba-8031-47108c238c97"
}
error

On the console, although the instance picker mentions the state restriction, user is still allowed to select and click on the "Add to Group" button but the end result is a no-op. It can be a bit confusing. Ideally, we filter out those ineligible instances in the first place. If it's hard to do for some reason, returning a message or disabling the add button is still better than no UI response.

Activity

  1. david-crespo commented on Apr 9, 2025

    @david-crespo
    Collaborator

    Good news. See the gif here #2790. I just deployed this to dogfood.

  2. david-crespo commented on Apr 9, 2025

    @david-crespo
    Collaborator

    Ugh, I failed to look closely enough at the no-op point. We are not handling errors on add with a toast message, so it is indeed a noop. Working on that now.

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