9
0

Compare commits

...

2 Commits

4 changed files with 116 additions and 37 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Jul 9 08:18:07 UTC 2025 - Miika Alikirri <miika.alikirri@suse.com>
- Explicitly set uefi as default firmware (bsc#1245145)
-------------------------------------------------------------------
Thu Jun 26 11:58:26 UTC 2025 - Miika Alikirri <miika.alikirri@suse.com>
- Patch cockpit-machines to ignore domain not found errors
when domain is deleted (bsc#1236383)
* added nic-domain-not-found.patch
-------------------------------------------------------------------
Mon Jun 16 08:22:25 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
@@ -188,7 +200,7 @@ Fri Jun 16 12:07:39 UTC 2023 - Adam Majer <adam.majer@suse.de>
-------------------------------------------------------------------
Fri Sep 23 10:30:20 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- Require qemu-block-curl for installing over https (bsc#1199672)
- Require qemu-block-curl for installing over https (bsc#1199672)
-------------------------------------------------------------------
Wed Aug 10 10:19:26 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
@@ -227,7 +239,7 @@ Thu Mar 17 13:42:11 UTC 2022 - Adam Majer <adam.majer@suse.de>
-------------------------------------------------------------------
Mon Mar 14 22:37:04 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- Hide links pointing to RHEL docs, hide-docs.patch (bsc#1197003)
- Hide links pointing to RHEL docs, hide-docs.patch (bsc#1197003)
-------------------------------------------------------------------
Thu Mar 10 15:41:35 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
@@ -238,12 +250,12 @@ Thu Mar 10 15:41:35 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
-------------------------------------------------------------------
Mon Jan 31 09:50:20 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- Remove translate-toolkit which is not available in SLE
- Remove translate-toolkit which is not available in SLE
-------------------------------------------------------------------
Fri Jan 28 10:53:18 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- Re-add source-offset to _service.
- Re-add source-offset to _service.
-------------------------------------------------------------------
Fri Aug 13 11:23:02 UTC 2021 - Ludwig Nussel <lnussel@suse.de>

View File

@@ -30,6 +30,7 @@ Source12: update_version.sh
Patch10: hide-docs.patch
Patch11: load-css-overrides.patch
Patch12: uefi-default-firmware.patch
Patch13: nic-domain-not-found.patch
BuildArch: noarch
BuildRequires: appstream-glib
BuildRequires: make

View File

@@ -0,0 +1,36 @@
From 6c982496f7b9cd9ef08308e1edd820b3910a7833 Mon Sep 17 00:00:00 2001
From: Miika Alikirri <miika.alikirri@suse.com>
Date: Wed, 25 Jun 2025 14:07:00 +0300
Subject: [PATCH] nics: ignore domain not found error caused by domain being
removed
If user is in the VMDetails page during migration, the VM might get
deleted before domainInterfaceAddresses is done processing. This race
condition can end up causing a confusing view where the UI shows a
redundant "Domain not found" error, and the regular "VM doesn't exist"
page at the same time
---
src/components/vm/nics/vmNicsCard.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/components/vm/nics/vmNicsCard.jsx b/src/components/vm/nics/vmNicsCard.jsx
index 8b309ac0..79efe152 100644
--- a/src/components/vm/nics/vmNicsCard.jsx
+++ b/src/components/vm/nics/vmNicsCard.jsx
@@ -239,8 +239,15 @@ export class VmNetworkTab extends React.Component {
domainInterfaceAddresses({ connectionName: this.props.vm.connectionName, objPath: this.props.vm.id })
.then(domifaddressAllSources => {
const allRejected = !domifaddressAllSources.some(promise => promise.status == 'fulfilled');
+ // If user is in the VMDetails page during migration, the VM might get deleted
+ // before domainInterfaceAddresses is done processing. This race condition can end up
+ // causing a confusing view where the UI shows a redundant "Domain not found error"
+ // and the regular VM doesn't exist page, at the same time.
+ const domainNotFound = domifaddressAllSources.some(promise =>
+ promise.status === 'rejected' && promise.reason?.message.startsWith("Domain not found:")
+ );
- if (allRejected)
+ if (allRejected && !domainNotFound)
this.props.onAddErrorNotification({
text: cockpit.format(_("Failed to fetch the IP addresses of the interfaces present in $0"), this.props.vm.name),
detail: [...new Set(domifaddressAllSources.map(promise => promise.reason ? promise.reason.message : ''))].join(', '),

View File

@@ -1,41 +1,71 @@
From a580aa1ee6c24aab29fc7710b82187c15f21e6ec Mon Sep 17 00:00:00 2001
From a7a02f9aaabf6cc4c92f672eb08752374f614a32 Mon Sep 17 00:00:00 2001
From: Miika Alikirri <miika.alikirri@suse.com>
Date: Thu, 6 Mar 2025 09:25:08 +0200
Subject: Use UEFI as default firmware instead of bios
Date: Wed, 9 Jul 2025 11:11:07 +0300
Subject: Explicitly set UEFI as default firmware
---
src/components/vm/overview/firmware.jsx | 4 ++--
src/components/vm/overview/helpers.jsx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
src/libvirtApi/domain.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/components/vm/overview/firmware.jsx b/src/components/vm/overview/firmware.jsx
index e99c893a..f04dc023 100644
--- a/src/components/vm/overview/firmware.jsx
+++ b/src/components/vm/overview/firmware.jsx
@@ -32,8 +32,8 @@ import { supportsUefiXml, labelForFirmwarePath } from './helpers.jsx';
diff --git a/src/libvirtApi/domain.ts b/src/libvirtApi/domain.ts
index 88d39dab..61926d52 100644
--- a/src/libvirtApi/domain.ts
+++ b/src/libvirtApi/domain.ts
@@ -360,6 +360,7 @@ interface DomainSpec {
userPassword: string,
vmName: string,
sshKeys: string[],
+ firmware: 'bios' | 'uefi'
}
const _ = cockpit.gettext;
-const xmlToState = value => value || 'bios';
-const stateToXml = value => value == 'bios' ? null : value;
+const xmlToState = value => value || 'efi';
+const stateToXml = value => value == 'efi' ? null : value;
class FirmwareModal extends React.Component {
static contextType = DialogsContext;
diff --git a/src/components/vm/overview/helpers.jsx b/src/components/vm/overview/helpers.jsx
index e0702ac6..582225fd 100644
--- a/src/components/vm/overview/helpers.jsx
+++ b/src/components/vm/overview/helpers.jsx
@@ -69,7 +69,7 @@ export function labelForFirmwarePath(path, guest_arch) {
export async function domainCreate({
@@ -415,6 +416,7 @@ export async function domainCreate({
userPassword,
vmName,
sshKeys,
+ firmware: "uefi",
};
if (!path) {
if (["i686", "x86_64"].includes(guest_arch))
- return "bios";
+ return "efi";
else
return "unknown";
} else {
logDebug(`CREATE_VM(${vmName}): install_machine.py '${JSON.stringify(args)}'`);
--
2.48.1
2.50.0
From a5dcfb74c517aea09f17bd3efc0ef750c335e39b Mon Sep 17 00:00:00 2001
From: Miika Alikirri <miika.alikirri@suse.com>
Date: Thu, 10 Jul 2025 12:48:50 +0300
Subject: libvirt: allow changing from UEFI to BIOS
When UEFI is already selected and a user tries to switch to BIOS, not
all the relevant UEFI related elements are removed
This patch adds the functionality for removing loader and nvram if they
are set
---
src/libvirtApi/domain.ts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/libvirtApi/domain.ts b/src/libvirtApi/domain.ts
index 61926d52..5ba12a0b 100644
--- a/src/libvirtApi/domain.ts
+++ b/src/libvirtApi/domain.ts
@@ -1297,6 +1297,16 @@ export async function domainSetOSFirmware({
if (loaderElem)
loaderElem.remove();
+ // remove efi related things so it gets actually disabled
+ if (!loaderType || loaderType === "bios") {
+ const fwElem = getSingleOptionalElem(osElem, "firmware");
+ if (fwElem)
+ fwElem.remove();
+ const nvramElem = getSingleOptionalElem(osElem, "nvram");
+ if (nvramElem)
+ nvramElem.remove();
+ }
+
if (!loaderType)
osElem.removeAttribute("firmware");
else
--
2.50.0