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
|
||||
? 1
|
||||
: 0
|
||||
const parent = this.getObjectByUuid(uuid).sm_config['vhd-parent']
|
||||
if (parent !== undefined) {
|
||||
length += this._getUnhealthyVdiChainLength(parent, childrenMap, cache)
|
||||
try {
|
||||
const parent = this.getObjectByUuid(uuid).sm_config['vhd-parent']
|
||||
if (parent !== undefined) {
|
||||
length += this._getUnhealthyVdiChainLength(parent, childrenMap, cache)
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Xapi#_getUnhealthyVdiChainLength(%s)', uuid, error)
|
||||
}
|
||||
cache[uuid] = length
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user