fix(xo-server,xo-web/orphan VDIs): ignore irrelevant VDI types (#5249)
Fixes #5248
This commit is contained in:
parent
38248d8c35
commit
8d7f8d156f
@ -14,6 +14,7 @@
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [New SR] Fix `Cannot read property 'trim' of undefined` error (PR [#5212](https://github.com/vatesfr/xen-orchestra/pull/5212))
|
||||
- [Dashboard/Health] Fix suspended VDIs considered as orphans [#5248](https://github.com/vatesfr/xen-orchestra/issues/5248) (PR [#5249](https://github.com/vatesfr/xen-orchestra/pull/5249))
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
@ -608,6 +608,7 @@ const TRANSFORMS = {
|
||||
snapshots: link(obj, 'snapshots'),
|
||||
tags: obj.tags,
|
||||
usage: +obj.physical_utilisation,
|
||||
VDI_type: obj.type,
|
||||
|
||||
$SR: link(obj, 'SR'),
|
||||
$VBDs: link(obj, 'VBDs'),
|
||||
|
@ -407,6 +407,8 @@ const ALARM_ACTIONS = [
|
||||
},
|
||||
]
|
||||
|
||||
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral'])
|
||||
|
||||
@connectStore(() => {
|
||||
const getSrs = createGetObjectsOfType('SR')
|
||||
const getOrphanVdis = createSort(
|
||||
@ -417,7 +419,7 @@ const ALARM_ACTIONS = [
|
||||
(vdis, snapshotVdis) => Object.assign({}, vdis, snapshotVdis)
|
||||
),
|
||||
createSelector(getSrs, srs => vdi => {
|
||||
if (vdi.$VBDs.length !== 0) {
|
||||
if (vdi.$VBDs.length !== 0 || !HANDLED_VDI_TYPES.has(vdi.VDI_type)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user