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”
|
> 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))
|
- [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
|
### Packages to release
|
||||||
|
|
||||||
|
@ -608,6 +608,7 @@ const TRANSFORMS = {
|
|||||||
snapshots: link(obj, 'snapshots'),
|
snapshots: link(obj, 'snapshots'),
|
||||||
tags: obj.tags,
|
tags: obj.tags,
|
||||||
usage: +obj.physical_utilisation,
|
usage: +obj.physical_utilisation,
|
||||||
|
VDI_type: obj.type,
|
||||||
|
|
||||||
$SR: link(obj, 'SR'),
|
$SR: link(obj, 'SR'),
|
||||||
$VBDs: link(obj, 'VBDs'),
|
$VBDs: link(obj, 'VBDs'),
|
||||||
|
@ -407,6 +407,8 @@ const ALARM_ACTIONS = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const HANDLED_VDI_TYPES = new Set(['system', 'user', 'ephemeral'])
|
||||||
|
|
||||||
@connectStore(() => {
|
@connectStore(() => {
|
||||||
const getSrs = createGetObjectsOfType('SR')
|
const getSrs = createGetObjectsOfType('SR')
|
||||||
const getOrphanVdis = createSort(
|
const getOrphanVdis = createSort(
|
||||||
@ -417,7 +419,7 @@ const ALARM_ACTIONS = [
|
|||||||
(vdis, snapshotVdis) => Object.assign({}, vdis, snapshotVdis)
|
(vdis, snapshotVdis) => Object.assign({}, vdis, snapshotVdis)
|
||||||
),
|
),
|
||||||
createSelector(getSrs, srs => vdi => {
|
createSelector(getSrs, srs => vdi => {
|
||||||
if (vdi.$VBDs.length !== 0) {
|
if (vdi.$VBDs.length !== 0 || !HANDLED_VDI_TYPES.has(vdi.VDI_type)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user