Skip to content

Disable add-instance-to-anti-affinity-group when instance not stopped#2790

Merged
david-crespo merged 7 commits into
mainfrom
disable-add-instance-when-not-stopped
Apr 9, 2025
Merged

Disable add-instance-to-anti-affinity-group when instance not stopped#2790
david-crespo merged 7 commits into
mainfrom
disable-add-instance-when-not-stopped

Conversation

@charliepark

@charliepark charliepark commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

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

vercel Bot commented Apr 8, 2025

Copy link
Copy Markdown

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

Comment thread app/api/util.ts
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
Copy Markdown
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

@david-crespo david-crespo left a comment

Copy link
Copy Markdown
Collaborator

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
@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.

2 participants