fix(xo-server/backups-ng): don't remove startable VMs (#2840)

Fixes #2724
This commit is contained in:
Julien Fontanet 2018-04-06 17:12:36 +02:00 committed by GitHub
parent 172ce2c7a1
commit a251f8ca75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,7 @@ const listReplicatedVms = (
const oc = object.other_config
if (
object.$type === 'vm' &&
'start' in object.blocked_operations &&
oc['xo:backup:schedule'] === scheduleId &&
oc['xo:backup:sr'] === srId &&
(oc['xo:backup:vm'] === vmUuid ||
@ -558,9 +559,6 @@ export default class BackupNg {
}
// High:
// - [ ] clones of replicated VMs should not be garbage collected
// - if storing uuids in source VM, how to detect them if the source is
// lost?
// - [ ] validate VHDs after exports and before imports, how?
// - [ ] in case of merge failure
// 1. delete (or isolate) the tainted VHD
@ -597,6 +595,7 @@ export default class BackupNg {
// - [x] do not delete rolling snapshot in case of failure!
// - [x] do not create snapshot if unhealthy vdi chain
// - [x] replicated VMs should be discriminated by VM (vatesfr/xen-orchestra#2807)
// - [x] clones of replicated VMs should not be garbage collected
@defer
async _backupVm (
$defer: any,