Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofill VM compose form with defaults + add overcommit sliders for LXD hosts. #1147

Merged
merged 4 commits into from
May 26, 2020

Conversation

Caleb-Ellis
Copy link
Contributor

@Caleb-Ellis Caleb-Ellis commented May 21, 2020

Done

  • Backend now provides core, memory and storage defaults for pod types. Now they're being used in the VM compose form - the form is autofilled with defaults, and clearing them displays the default as a placeholder.
  • Added overcommit sliders for LXD hosts.
  • Tidied up websocket request preprocessor. It was originally sending a bunch of irrelevant garbage - now it's a bit more explicit what's actually being sent.
  • Changed memory help text from GiB to MiB - it seemed weird for the form value (and the backend) to be in MiB and to have to calculate from MiB to GiB and back, when we could just use MiB.

QA

  • Note: Something has happened with bolla and now I can't seem to compose machines or edit configuration for either the LXD or virsh host - the requests just hang until they time out. This happens even on the production build. I think the best we can do for QA in the meantime is make sure the websocket request is correct.
  • Go to a LXD pod details page and check that there are two sliders for CPU and memory overcommit. Submit the form and check that the websocket request includes cpu_over_commit_ratio and memory_over_commit_ratio and the numbers are correct.
  • Open the compose form and check that cores, memory and storage are autofilled.
  • Clear the cores, memory and storage fields and check that the placeholder displays the default
  • Submit the form and check that the websocket request includes the defaults (even though the fields were empty) and there are only parameters that are allowed by the api.

Fixes

Fixes #1144
Fixes #1145

Launchpad Issue

lp#1879772
lp#1879774

@squidsoup
Copy link
Contributor

squidsoup commented May 26, 2020

QA is good @Caleb-Ellis, but could we fix the disabled styles for overcommit (not necessarily in this branch)?

image

Copy link
Contributor

@squidsoup squidsoup left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @Caleb-Ellis!

@Caleb-Ellis Caleb-Ellis merged commit f3bb39d into canonical:master May 26, 2020
@Caleb-Ellis Caleb-Ellis deleted the kvm-updates branch October 28, 2020 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI does not show overcommit configuration for LXD Pods UI should show default VM composition values
2 participants