Fix Node list in VMs Migrate dialog

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-09-24 11:12:00 +02:00
parent 8dd5f77064
commit 4e84b1264e
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393

View File

@ -76,7 +76,8 @@ export default {
return nodes.filter((n) => {
const isNotSelfNode = !!this.availableNodes.includes(n.id);
const isNotWitnessNode = n.isEtcd !== 'true'; // do not allow to migrate to self node and witness node
const matchingCpuManagerConfig = n.isCPUManagerEnabled; // If cpu-pinning is enabled, filter-out non-enabled CPU manager nodes.
const isCpuPinning = this.actionResource?.spec?.template?.spec?.domain?.cpu?.dedicatedCpuPlacement;
const matchingCpuManagerConfig = !isCpuPinning || n.isCPUManagerEnabled; // If cpu-pinning is enabled, filter-out non-enabled CPU manager nodes.
return isNotSelfNode && isNotWitnessNode && matchingCpuManagerConfig;
}).map((n) => {