From b3681e7c39308babe7bfa1e556d9d1fce9a5d05e Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Fri, 19 Oct 2018 09:58:39 +0200 Subject: [PATCH] fix(xo-server/recomputeResourceSetsLimits): omit CR and DR VMs (#3561) Fixes #3064 --- CHANGELOG.md | 1 + packages/xo-server/src/xo-mixins/resource-sets.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be15d21c7..975253465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/xo-server/src/xo-mixins/resource-sets.js b/packages/xo-server/src/xo-mixins/resource-sets.js index 443ef6aea..df96defa5 100644 --- a/packages/xo-server/src/xo-mixins/resource-sets.js +++ b/packages/xo-server/src/xo-mixins/resource-sets.js @@ -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.