fix(xo-server/exportDeltaVm): do not leak the snapshot name

Fixes #2727
This commit is contained in:
Julien Fontanet 2018-03-07 20:30:09 +01:00
parent 37b90e25dc
commit 77a2d37d98

View File

@ -805,8 +805,12 @@ export default class Xapi extends XapiBase {
this._assertHealthyVdiChains(vm) this._assertHealthyVdiChains(vm)
} }
if (!vm.is_a_snapshot) { if (!vm.is_a_snapshot) {
const { name_label } = vm
vm = await this._snapshotVm($cancelToken, vm, snapshotNameLabel) vm = await this._snapshotVm($cancelToken, vm, snapshotNameLabel)
$defer.onFailure(() => this._deleteVm(vm)) $defer.onFailure(() => this._deleteVm(vm))
// do not use the snapshot name in the delta export
vm.name_label = name_label
} }
const baseVm = baseVmId && this.getObject(baseVmId) const baseVm = baseVmId && this.getObject(baseVmId)