feat(backups,xo-server,xo-web): make NBD concurrency configurable
This commit is contained in:
committed by
Julien Fontanet
parent
fc1357db93
commit
847ad63c09
@@ -34,6 +34,7 @@ export async function exportIncrementalVm(
|
|||||||
fullVdisRequired = new Set(),
|
fullVdisRequired = new Set(),
|
||||||
|
|
||||||
disableBaseTags = false,
|
disableBaseTags = false,
|
||||||
|
nbdConcurrency = 1,
|
||||||
preferNbd,
|
preferNbd,
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
@@ -82,6 +83,7 @@ export async function exportIncrementalVm(
|
|||||||
baseRef: baseVdi?.$ref,
|
baseRef: baseVdi?.$ref,
|
||||||
cancelToken,
|
cancelToken,
|
||||||
format: 'vhd',
|
format: 'vhd',
|
||||||
|
nbdConcurrency,
|
||||||
preferNbd,
|
preferNbd,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export const IncrementalXapi = class IncrementalXapiVmBackupRunner extends Abstr
|
|||||||
const deltaExport = await exportIncrementalVm(exportedVm, baseVm, {
|
const deltaExport = await exportIncrementalVm(exportedVm, baseVm, {
|
||||||
fullVdisRequired,
|
fullVdisRequired,
|
||||||
preferNbd: this._settings.preferNbd,
|
preferNbd: this._settings.preferNbd,
|
||||||
|
nbdConcurrency: this._settings.nbdConcurrency,
|
||||||
})
|
})
|
||||||
// since NBD is network based, if one disk use nbd , all the disk use them
|
// since NBD is network based, if one disk use nbd , all the disk use them
|
||||||
// except the suspended VDI
|
// except the suspended VDI
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
- [REST API] _Mirror Backup_ jobs are available at `/backup/jobs/mirror`
|
- [REST API] _Mirror Backup_ jobs are available at `/backup/jobs/mirror`
|
||||||
- [Plugin/auth-saml] Add _Force re-authentication_ setting [Forum#67764](https://xcp-ng.org/forum/post/67764) (PR [#7232](https://github.com/vatesfr/xen-orchestra/pull/7232))
|
- [Plugin/auth-saml] Add _Force re-authentication_ setting [Forum#67764](https://xcp-ng.org/forum/post/67764) (PR [#7232](https://github.com/vatesfr/xen-orchestra/pull/7232))
|
||||||
- [HTTP] `http.useForwardedHeaders` setting can be enabled when XO is behind a reverse proxy to fetch clients IP addresses from `X-Forwarded-*` headers [Forum#67625](https://xcp-ng.org/forum/post/67625) (PR [#7233](https://github.com/vatesfr/xen-orchestra/pull/7233))
|
- [HTTP] `http.useForwardedHeaders` setting can be enabled when XO is behind a reverse proxy to fetch clients IP addresses from `X-Forwarded-*` headers [Forum#67625](https://xcp-ng.org/forum/post/67625) (PR [#7233](https://github.com/vatesfr/xen-orchestra/pull/7233))
|
||||||
|
- [Backup]Use multiple link to speedup NBD backup (PR [#7216](https://github.com/vatesfr/xen-orchestra/pull/7216))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,15 @@ const SCHEMA_SETTINGS = {
|
|||||||
minimum: 0,
|
minimum: 0,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
preferNbd: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
nbdConcurrency: {
|
||||||
|
type: 'number',
|
||||||
|
minimum: 1,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
additionalProperties: true,
|
additionalProperties: true,
|
||||||
},
|
},
|
||||||
@@ -279,8 +288,8 @@ importVmBackup.params = {
|
|||||||
},
|
},
|
||||||
useDifferentialRestore: {
|
useDifferentialRestore: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: true
|
optional: true,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkBackup({ id, settings, sr }) {
|
export function checkBackup({ id, settings, sr }) {
|
||||||
|
|||||||
@@ -586,6 +586,7 @@ const messages = {
|
|||||||
editJobNotFound: "The job you're trying to edit wasn't found",
|
editJobNotFound: "The job you're trying to edit wasn't found",
|
||||||
preferNbd: 'Use NBD protocol to transfer disk if available',
|
preferNbd: 'Use NBD protocol to transfer disk if available',
|
||||||
preferNbdInformation: 'A network accessible by XO or the proxy must have NBD enabled',
|
preferNbdInformation: 'A network accessible by XO or the proxy must have NBD enabled',
|
||||||
|
nbdConcurrency: 'Number of NBD connexion per disk',
|
||||||
|
|
||||||
// ------ New Remote -----
|
// ------ New Remote -----
|
||||||
newRemote: 'New file system remote',
|
newRemote: 'New file system remote',
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ const getInitialState = ({ preSelectedVmIds, setHomeVmIdsSelection, suggestedExc
|
|||||||
deltaMode: false,
|
deltaMode: false,
|
||||||
drMode: false,
|
drMode: false,
|
||||||
name: '',
|
name: '',
|
||||||
|
nbdConcurrency: 1,
|
||||||
preferNbd: false,
|
preferNbd: false,
|
||||||
remotes: [],
|
remotes: [],
|
||||||
schedules: {},
|
schedules: {},
|
||||||
@@ -629,6 +630,11 @@ const New = decorate([
|
|||||||
preferNbd,
|
preferNbd,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
setNbdConcurrency({ setGlobalSettings }, nbdConcurrency) {
|
||||||
|
setGlobalSettings({
|
||||||
|
nbdConcurrency,
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
compressionId: generateId,
|
compressionId: generateId,
|
||||||
@@ -637,6 +643,7 @@ const New = decorate([
|
|||||||
inputFullIntervalId: generateId,
|
inputFullIntervalId: generateId,
|
||||||
inputMaxExportRate: generateId,
|
inputMaxExportRate: generateId,
|
||||||
inputPreferNbd: generateId,
|
inputPreferNbd: generateId,
|
||||||
|
inputNbdConcurrency: generateId,
|
||||||
inputTimeoutId: generateId,
|
inputTimeoutId: generateId,
|
||||||
|
|
||||||
// In order to keep the user preference, the offline backup is kept in the DB
|
// In order to keep the user preference, the offline backup is kept in the DB
|
||||||
@@ -748,6 +755,7 @@ const New = decorate([
|
|||||||
concurrency,
|
concurrency,
|
||||||
fullInterval,
|
fullInterval,
|
||||||
maxExportRate,
|
maxExportRate,
|
||||||
|
nbdConcurrency = 1,
|
||||||
offlineBackup,
|
offlineBackup,
|
||||||
offlineSnapshot,
|
offlineSnapshot,
|
||||||
preferNbd,
|
preferNbd,
|
||||||
@@ -1040,6 +1048,20 @@ const New = decorate([
|
|||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
|
{state.isDelta && (
|
||||||
|
<FormGroup>
|
||||||
|
<label htmlFor={state.inputNbdConcurrency}>
|
||||||
|
<strong>{_('nbdConcurrency')}</strong>
|
||||||
|
</label>
|
||||||
|
<Number
|
||||||
|
id={state.inputNbdConcurrency}
|
||||||
|
min={1}
|
||||||
|
onChange={effects.setNbdConcurrency}
|
||||||
|
value={nbdConcurrency}
|
||||||
|
disabled={!state.inputPreferNbd}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<label htmlFor={state.inputMaxExportRate}>
|
<label htmlFor={state.inputMaxExportRate}>
|
||||||
<strong>{_('speedLimit')}</strong>
|
<strong>{_('speedLimit')}</strong>
|
||||||
|
|||||||
Reference in New Issue
Block a user