feat(xo-web/backup): add 'nRetriesVmBackupFailures' input
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
- [REST API] Export host [SMT](https://en.wikipedia.org/wiki/Simultaneous_multithreading) status at `/hosts/:id/smt` [Forum#71374](https://xcp-ng.org/forum/post/71374)
|
||||
- [Home & REST API] `$container` field of an halted VM now points to a host if a VDI is on a local storage [Forum#71769](https://xcp-ng.org/forum/post/71769)
|
||||
- [Size Input] Ability to select two new units in the dropdown (`TiB`, `PiB`) (PR [#7382](https://github.com/vatesfr/xen-orchestra/pull/7382))
|
||||
|
||||
- [Backup] Ability to set a number of retries for VM backup failures [#2139](https://github.com/vatesfr/xen-orchestra/issues/2139) (PR [#7308](https://github.com/vatesfr/xen-orchestra/pull/7308))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ const messages = {
|
||||
removeColor: 'Remove color',
|
||||
xcpNg: 'XCP-ng',
|
||||
noFileSelected: 'No file selected',
|
||||
nRetriesVmBackupFailures: 'Number of retries if VM backup fails',
|
||||
|
||||
// ----- Modals -----
|
||||
alertOk: 'OK',
|
||||
|
||||
@@ -189,6 +189,7 @@ const getInitialState = ({ preSelectedVmIds, setHomeVmIdsSelection, suggestedExc
|
||||
drMode: false,
|
||||
name: '',
|
||||
nbdConcurrency: 1,
|
||||
nRetriesVmBackupFailures: 0,
|
||||
preferNbd: false,
|
||||
remotes: [],
|
||||
schedules: {},
|
||||
@@ -635,6 +636,11 @@ const New = decorate([
|
||||
nbdConcurrency,
|
||||
})
|
||||
},
|
||||
setNRetriesVmBackupFailures({ setGlobalSettings }, nRetries) {
|
||||
setGlobalSettings({
|
||||
nRetriesVmBackupFailures: nRetries,
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
compressionId: generateId,
|
||||
@@ -644,6 +650,7 @@ const New = decorate([
|
||||
inputMaxExportRate: generateId,
|
||||
inputPreferNbd: generateId,
|
||||
inputNbdConcurrency: generateId,
|
||||
inputNRetriesVmBackupFailures: generateId,
|
||||
inputTimeoutId: generateId,
|
||||
|
||||
// In order to keep the user preference, the offline backup is kept in the DB
|
||||
@@ -756,6 +763,7 @@ const New = decorate([
|
||||
fullInterval,
|
||||
maxExportRate,
|
||||
nbdConcurrency = 1,
|
||||
nRetriesVmBackupFailures = 0,
|
||||
offlineBackup,
|
||||
offlineSnapshot,
|
||||
preferNbd,
|
||||
@@ -990,6 +998,17 @@ const New = decorate([
|
||||
value={concurrency}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<label htmlFor={state.inputNRetriesVmBackupFailures}>
|
||||
<strong>{_('nRetriesVmBackupFailures')}</strong>
|
||||
</label>
|
||||
<Number
|
||||
id={state.inputNRetriesVmBackupFailures}
|
||||
min={0}
|
||||
onChange={effects.setNRetriesVmBackupFailures}
|
||||
value={nRetriesVmBackupFailures}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<label htmlFor={state.inputTimeoutId}>
|
||||
<strong>{_('timeout')}</strong>
|
||||
|
||||
@@ -124,6 +124,8 @@ const NewMirrorBackup = decorate([
|
||||
setAdvancedSettings({ timeout: timeout !== undefined ? timeout * 3600e3 : undefined }),
|
||||
setMaxExportRate: ({ setAdvancedSettings }, rate) =>
|
||||
setAdvancedSettings({ maxExportRate: rate !== undefined ? rate * (1024 * 1024) : undefined }),
|
||||
setNRetriesVmBackupFailures: ({ setAdvancedSettings }, nRetriesVmBackupFailures) =>
|
||||
setAdvancedSettings({ nRetriesVmBackupFailures }),
|
||||
setSourceRemote: (_, obj) => () => ({
|
||||
sourceRemote: obj === null ? {} : obj.value,
|
||||
}),
|
||||
@@ -204,6 +206,7 @@ const NewMirrorBackup = decorate([
|
||||
inputConcurrencyId: generateId,
|
||||
inputTimeoutId: generateId,
|
||||
inputMaxExportRateId: generateId,
|
||||
inputNRetriesVmBackupFailures: generateId,
|
||||
isBackupInvalid: state =>
|
||||
state.isMissingName || state.isMissingBackupMode || state.isMissingSchedules || state.isMissingRetention,
|
||||
isFull: state => state.mode === 'full',
|
||||
@@ -231,7 +234,7 @@ const NewMirrorBackup = decorate([
|
||||
}),
|
||||
injectState,
|
||||
({ state, effects, intl: { formatMessage } }) => {
|
||||
const { concurrency, timeout, maxExportRate } = state.advancedSettings
|
||||
const { concurrency, timeout, maxExportRate, nRetriesVmBackupFailures = 0 } = state.advancedSettings
|
||||
return (
|
||||
<form id={state.formId}>
|
||||
<Container>
|
||||
@@ -314,6 +317,17 @@ const NewMirrorBackup = decorate([
|
||||
value={concurrency}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<label htmlFor={state.inputNRetriesVmBackupFailures}>
|
||||
<strong>{_('nRetriesVmBackupFailures')}</strong>
|
||||
</label>
|
||||
<Number
|
||||
id={state.inputNRetriesVmBackupFailures}
|
||||
min={0}
|
||||
onChange={effects.setNRetriesVmBackupFailures}
|
||||
value={nRetriesVmBackupFailures}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<label htmlFor={state.inputTimeoutId}>
|
||||
<strong>{_('timeout')}</strong>
|
||||
|
||||
@@ -319,6 +319,7 @@ class JobsTable extends React.Component {
|
||||
compression,
|
||||
concurrency,
|
||||
fullInterval,
|
||||
nRetriesVmBackupFailures,
|
||||
offlineBackup,
|
||||
offlineSnapshot,
|
||||
proxyId,
|
||||
@@ -349,6 +350,9 @@ class JobsTable extends React.Component {
|
||||
{compression !== undefined && (
|
||||
<Li>{_.keyValue(_('compression'), compression === 'native' ? 'GZIP' : compression)}</Li>
|
||||
)}
|
||||
{nRetriesVmBackupFailures > 0 && (
|
||||
<Li>{_.keyValue(_('nRetriesVmBackupFailures'), nRetriesVmBackupFailures)}</Li>
|
||||
)}
|
||||
</Ul>
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user