From 385984b1d8e8b61a8c78a61fb64be009d4374483 Mon Sep 17 00:00:00 2001 From: "Rajaa.BARHTAOUI" Date: Tue, 6 Oct 2020 10:38:33 +0200 Subject: [PATCH] fix(xo-web/vm/disks): VDI disappears after migration (#5296) Related to 1116530a6be539e644516f9e685bac57b72e78cb --- CHANGELOG.unreleased.md | 1 + packages/xo-web/src/xo-app/vm/index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 3630d29ab..9faf6e5da 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -17,6 +17,7 @@ - [Backup/S3] Fix secret key edit form [#5233](https://github.com/vatesfr/xen-orchestra/issues/5233) (PR[#5305](https://github.com/vatesfr/xen-orchestra/pull/5305)) - [New network] Remove the possibility of creating a network on a bond member interface (PR [#5262](https://github.com/vatesfr/xen-orchestra/pull/5262)) - [User] Fix custom filters not showing up when selecting a default filter for templates (PR [#5298](https://github.com/vatesfr/xen-orchestra/pull/5298)) +- [Self/VDI migration] Fix hidden VDI after migration (PR [#5296](https://github.com/vatesfr/xen-orchestra/pull/5296)) ### Packages to release diff --git a/packages/xo-web/src/xo-app/vm/index.js b/packages/xo-web/src/xo-app/vm/index.js index b31511d1a..bc403b20c 100644 --- a/packages/xo-web/src/xo-app/vm/index.js +++ b/packages/xo-web/src/xo-app/vm/index.js @@ -81,7 +81,11 @@ import VmActionBar from './action-bar' pool: getPool(state, props), srs: getSrs(state, props), vbds: getVbds(state, props), - vdis: getVdis(state, props), + // Workaround to get the VDI object when the permissions cache isn't up to date: + // when a VDI is created on a VM, the user permissions might be checked on the + // VBD *before* it's attached to the VM so the permissions cache will store that + // the user doesn't have permissions on the VDI even after it's been attached + vdis: getVdis(state, props, true), vm, vmTotalDiskSpace: getVmTotalDiskSpace(state, props), }