From 23ce94fdae3197bbdde4af3bd6875896f6fa812d Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Tue, 13 Jun 2017 09:25:59 +0200 Subject: [PATCH] fix(Xapi#canSrHaveNewVdiOfSize): better content_type check (#573) Fixes vatesfr/xo-web#2215 --- src/xapi/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xapi/utils.js b/src/xapi/utils.js index b97e75d20..1aa478157 100644 --- a/src/xapi/utils.js +++ b/src/xapi/utils.js @@ -353,4 +353,8 @@ export const useUpdateSystem = host => { } export const canSrHaveNewVdiOfSize = (sr, minSize) => - sr != null && sr.content_type === 'user' && sr.physical_size - sr.physical_utilisation >= minSize + sr != null && + // content_type values are not documented: this may be incorrect + sr.content_type !== 'disk' && // removable + sr.content_type !== 'iso' && // read only + sr.physical_size - sr.physical_utilisation >= minSize