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

Choose size of batch VM evacuation #5203

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

benjamreis
Copy link
Contributor

New optional argument to Host.evacuate: evacuate_batch_size When provided uses it instead of xapi.conf's evacuation_batch_size When not provided uses the xapi.conf option

Fixes: #5202

@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch 2 times, most recently from b432370 to dac016c Compare October 13, 2023 08:35
ocaml/xapi/xapi_host.ml Outdated Show resolved Hide resolved
ocaml/xapi/message_forwarding.ml Outdated Show resolved Hide resolved
@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch 3 times, most recently from b1dba54 to 7642f01 Compare October 13, 2023 09:40
; {
param_type= Int
; param_name= "evacuate_batch_size"
; param_doc= "Number of VM to evacuate at the same time"
Copy link
Member

Choose a reason for hiding this comment

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

How about The maximum number of VMs to be migrated per batch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, it's more accurate. thx :)

@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch 3 times, most recently from c9375cd to eee67b9 Compare October 17, 2023 07:32
; param_name= "evacuate_batch_size"
; param_doc= "The maximum number of VMs to be migrated per batch"
; param_release= next_release
; param_default= None
Copy link
Member

@minglumlu minglumlu Oct 17, 2023

Choose a reason for hiding this comment

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

From https://github.com/xapi-project/xen-api/blob/master/ocaml/idl/ocaml_backend/gen_server.ml#L67, I understand is that None means it is a mandatory parameter.
While this should not be as the old clients may send calls without the new parameter. Then Some <N> would be a default value in this case. This could be tested with an old client.

ocaml/xapi/xapi_host.ml Outdated Show resolved Hide resolved
@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch from eee67b9 to ecdae7a Compare October 17, 2023 14:18
@benjamreis
Copy link
Contributor Author

Okay so last forced push should take into account all comments, i'll let you close the conversations when satisfied.

Meanwhile I tested giving a number and letting the default value take over, both works as expected. :)

ocaml/idl/datamodel_host.ml Outdated Show resolved Hide resolved
@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch from ecdae7a to d1a220a Compare October 17, 2023 14:36
New optional argument to `Host.evacuate`: `evacuate_batch_size`
When provided uses it instead of `xapi.conf`'s `evacuation_batch_size`
When not provided uses the `xapi.conf` option

Fixes: xapi-project#5202

Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
@benjamreis benjamreis force-pushed the dynamical-evacuation-batch-size branch from d1a220a to 3ad1b3a Compare October 17, 2023 14:42
@psafont psafont merged commit d4b2cfa into xapi-project:master Oct 17, 2023
6 checks passed
@psafont psafont deleted the dynamical-evacuation-batch-size branch October 17, 2023 16:23
julien-f pushed a commit to vatesfr/xen-orchestra that referenced this pull request Oct 19, 2023
Fixes #7105
See xapi-project/xen-api#5202
See xapi-project/xen-api#5203

`host.evacuate`: try passing optional batch size argument.
If not supported: remove it and try again.
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.

Dynamical Host.evacuate batch size
4 participants