Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Add throttling settings to the Migration Settings - Migration Throttling page #867

Closed
vconzola opened this issue Jan 30, 2019 · 8 comments
Closed

Comments

@vconzola
Copy link

Add settings for: network throughput, storage I/O bandwidth, max CPU utilization, and max memory utilization along with a switch to turn throttling ON/OFF.

@mturley
Copy link
Contributor

mturley commented Feb 28, 2019

@vconzola can you point us to where the mockups are for this?

@vconzola
Copy link
Author

@vconzola
Copy link
Author

vconzola commented Mar 6, 2019

@mzazrivec @mturley Latest mockups: https://docs.google.com/presentation/d/1BoMkoClBSxATQRPRYt7zuTgRYjaNCIE0y5xCGv5akL4/edit?usp=sharing .

  • Removed storage and memory settings.
  • Removed throttling switch since default is unlimited.

@mturley
Copy link
Contributor

mturley commented Mar 6, 2019

@mzazrivec just to give you a little more info here that you'll probably need:

  • Since the settings are going to be saved to the backend with /api/settings, we already have all the redux code in place to read/write those values. You'll simply need to add more Fields to GeneralSettings.js, and add those new field names to the getFormValuesFromApiSettings and getApiSettingsFromFormValues helpers here: https://github.com/ManageIQ/manageiq-v2v/blob/master/app/javascript/react/screens/App/Settings/helpers.js#L8 which define how form values map to the API's settings object and vice-versa.

    I'm not sure of the actual field names to use here, we need to talk to the back end guys about that, they still need to expose those new fields on /api/settings see below comment.

  • We'll need to modify the input such that when 0 is specified, the string "unlimited" is passed to the backend. We probably want this as behavior we can enable with a prop defined on NumberInput. (passing a prop to Field will pass it to that field's component, so you'd pass this new prop to the Fields).

  • The one tricky part here will probably be implementing this logic from the margin of the mockup:

    We will need some logic in the UI so that:
    MAX_MIGRATIONS_PER_PROVIDER >= MAX_MIGRATIONS_PER_HOST. So that means if user decrements provider value below host value, the host value will also decrement. And if user increments host value higher than provider value, provider value also increments.

    I think the way to implement that would be to pass a special onChange prop to those two Fields, where we check the new changed value against the other field's value, and if the other field needs to change we can manually dispatch a redux-form change event (https://redux-form.com/6.0.0-alpha.4/docs/api/actioncreators.md/).

redux-form can be a confusing black box, once you have a WIP PR let me know if you want me to send you some commits to cherry-pick for any of that stuff, I have a pretty good sense of what needs to be done there.

@mturley
Copy link
Contributor

mturley commented Mar 6, 2019

@mzazrivec it looks like we have official property names for these new settings in the API: ManageIQ/manageiq#18528

So you can use cpu_limit_per_host and network_limit_per_host.

@mturley
Copy link
Contributor

mturley commented Mar 7, 2019

I guess there's still the missing property for "Max migrations per provider", too... I'll ask Fabien about that.

@mturley
Copy link
Contributor

mturley commented Mar 7, 2019

He added the other property too, so that one is max_concurrent_tasks_per_ems.

@vconzola
Copy link
Author

vconzola commented Mar 7, 2019

@mturley @mzazrivec Updated mockups based on feedback from other UX designers.
https://docs.google.com/presentation/d/15r00yDsnGo0K0owHxUb842AA-PnCfO6u5bc4NZNCgeU/edit?usp=sharing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants