fix(xo-server/recomputeResourceSetsLimits): omit CR and DR VMs (#3561)

Fixes #3064
This commit is contained in:
Pierre Donias 2018-10-19 09:58:39 +02:00 committed by Julien Fontanet
parent a7a7597d9a
commit b3681e7c39
2 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,7 @@
- [New VM] Fix missing cloud config when creating multiple VMs at once in some cases [#3532](https://github.com/vatesfr/xen-orchestra/issues/3532) (PR [#3535](https://github.com/vatesfr/xen-orchestra/pull/3535))
- [VM] Fix an error when an admin tried to add a disk on a Self VM whose resource set had been deleted [#2814](https://github.com/vatesfr/xen-orchestra/issues/2814) (PR [#3530](https://github.com/vatesfr/xen-orchestra/pull/3530))
- [Self/Create VM] Fix some quotas based on the template instead of the user inputs [#2683](https://github.com/vatesfr/xen-orchestra/issues/2683) (PR [#3546](https://github.com/vatesfr/xen-orchestra/pull/3546))
- [Self] Ignore DR and CR VMs when computing quotas [#3064](https://github.com/vatesfr/xen-orchestra/issues/3064) (PR [#3561](https://github.com/vatesfr/xen-orchestra/pull/3561))
### Released packages

View File

@ -333,6 +333,9 @@ export default class {
if (
object.$type !== 'vm' ||
object.is_a_snapshot ||
('start' in object.blocked_operations &&
(object.tags.includes('Disaster Recovery') ||
object.tags.includes('Continuous Replication'))) ||
// No set for this VM.
!(id = xapi.xo.getData(object, 'resourceSet')) ||
// Not our set.