Skip to content

Conversation

@charliepark
Copy link
Contributor

@charliepark charliepark commented Apr 8, 2025

An instance can only be added to an anti-affinity group if that instance is stopped.

We tried a few treatments to the "add an instance to this anti-affinity group" modal, but they were all rather awkward.

  • Not including running instances made it look like instances were getting lost.
  • Adding badges to indicate an instances runState got really noisy.

We decided to list all of the instances not currently in the anti-affinity group, and to disable the submit button if a non-stopped instance were selected.

add_instance

@vercel
Copy link

vercel bot commented Apr 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Apr 9, 2025 2:45pm

addToAntiAffinityGroup: ['stopped'],
// check to see that there's no VMM
// https://github.com/oxidecomputer/omicron/blob/c496683/nexus/db-queries/src/db/datastore/affinity.rs#L1025-L1034
addToAffinityGroup: ['stopped'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed because this will be the same for both kinds of group

Copy link
Collaborator

@david-crespo david-crespo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging for now because I am like 90% confident the stopped thing is correct even though we don't have confirmation yet

@david-crespo david-crespo merged commit 2ef6e7a into main Apr 9, 2025
7 checks passed
@david-crespo david-crespo deleted the disable-add-instance-when-not-stopped branch April 9, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants