Skip to content

Commit

Permalink
feat(xo-server): limit VM migration concurrency
Browse files Browse the repository at this point in the history
Fixes #6065
  • Loading branch information
julien-f committed Jan 4, 2022
1 parent d307134 commit 0bd17e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”
- Limit number of concurrent VM migrations per pool to `3` [#6065](https://github.com/vatesfr/xen-orchestra/issues/6065) (PR [#6076](https://github.com/vatesfr/xen-orchestra/pull/6076))
Can be changed in `xo-server`'s configuration file: `xapiOptions.vmMigrationConcurrency`

### Bug fixes

> Users must be able to say: “I had this issue, happy to know it's fixed”
Expand Down
2 changes: 2 additions & 0 deletions packages/xo-server/src/xapi/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default class Xapi extends XapiBase {
restartHostTimeout,
vdiExportConcurrency,
vmExportConcurrency,
vmMigrationConcurrency = 3,
vmSnapshotConcurrency,
...opts
}) {
Expand All @@ -96,6 +97,7 @@ export default class Xapi extends XapiBase {
this._exportVdi = limitConcurrency(vdiExportConcurrency, waitStreamEnd)(this._exportVdi)
this.exportVm = limitConcurrency(vmExportConcurrency, waitStreamEnd)(this.exportVm)

this._migrateVmWithStorageMotion = limitConcurrency(vmMigrationConcurrency)(this._migrateVmWithStorageMotion)
this._snapshotVm = limitConcurrency(vmSnapshotConcurrency)(this._snapshotVm)

// Patch getObject to resolve _xapiId property.
Expand Down

0 comments on commit 0bd17e8

Please sign in to comment.