Skip to content

Add API cap to instance vCPUs and memory - #3574

Merged
just-be-dev merged 4 commits into
mainfrom
vm-limits
Jul 12, 2023
Merged

just-be-dev merged 4 commits into
mainfrom
vm-limits

Conversation

@just-be-dev

@just-be-dev just-be-dev commented Jul 12, 2023 •

Copy link
Copy Markdown
Contributor

Mitigates #3212

This a first stab at adding validation to the API to cap the number of vCPUs to 32 until the bhyve limit can be upped. We also added a 64 GiB cap on instance memory. I'm still working out exactly where the validation checks need to happen. #3212 mentions that it should happen in sled agent but for now I've located it with the other instance creation validation logic.

@just-be-dev
just-be-dev marked this pull request as ready for review July 12, 2023 16:57
Co-authored-by: David Crespo <[email protected]>
@david-crespo david-crespo changed the title Limit number of vCPUs the API will accept Cap per-instance vCPUs and memory in Nexus Jul 12, 2023
@just-be-dev just-be-dev changed the title Cap per-instance vCPUs and memory in Nexus Limit number of vCPUs and memory the API will accept will instance creation Jul 12, 2023
@just-be-dev just-be-dev changed the title Limit number of vCPUs and memory the API will accept will instance creation Add API cap to instance vCPUs and memory Jul 12, 2023
// INSTANCES

pub const MIN_MEMORY_SIZE_BYTES: u32 = 1 << 30; // 1 GiB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was a weird spot for this, so we moved it.

Comment thread nexus/src/app/instance.rs Resolved
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