fix(Xapi#_getUnhealthyVdiChainLength): do not fail on missing VDI
This commit is contained in:
parent
b9e2a28915
commit
7132a68a73
@ -64,9 +64,13 @@ export default {
|
|||||||
length = children !== undefined && children.length === 1
|
length = children !== undefined && children.length === 1
|
||||||
? 1
|
? 1
|
||||||
: 0
|
: 0
|
||||||
const parent = this.getObjectByUuid(uuid).sm_config['vhd-parent']
|
try {
|
||||||
if (parent !== undefined) {
|
const parent = this.getObjectByUuid(uuid).sm_config['vhd-parent']
|
||||||
length += this._getUnhealthyVdiChainLength(parent, childrenMap, cache)
|
if (parent !== undefined) {
|
||||||
|
length += this._getUnhealthyVdiChainLength(parent, childrenMap, cache)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn('Xapi#_getUnhealthyVdiChainLength(%s)', uuid, error)
|
||||||
}
|
}
|
||||||
cache[uuid] = length
|
cache[uuid] = length
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user