Skip to content

Commit

Permalink
ui-canonical: Fix stateful snapshot creation
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Sep 16, 2024
1 parent 72496b9 commit 862dc85
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ jobs:
git am "${REPO}/patches/ui-canonical-0017-Wait-for-projects-list-to-be-loaded.patch"
git am "${REPO}/patches/ui-canonical-0018-Respect-image-profile-list.patch"
git am "${REPO}/patches/ui-canonical-0019-Add-support-for-LVM-Cluster.patch"
git am "${REPO}/patches/ui-canonical-0020-Fix-stateful-snapshots-creation.patch"
sed -i -f "${REPO}/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts* src/*/*/*/*/*.ts*
npm install yarn --global
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0001-Branding.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 530c0186048444e4c5ba7fc0e69ac18bc73f9e1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 22:59:56 +0000
Subject: [PATCH 01/19] Branding
Subject: [PATCH 01/20] Branding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0002-Update-navigation.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ac936155d74c045f8407d07cba39d3430045878c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:02:27 +0000
Subject: [PATCH 02/19] Update navigation
Subject: [PATCH 02/20] Update navigation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a08552869cad38426cc105921d5493570b6fbaed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:03:33 +0000
Subject: [PATCH 03/19] Update certificate generation
Subject: [PATCH 03/20] Update certificate generation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0004-Remove-external-links.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bd3c402ac693419a4245ae683f5425e5591b2bdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:12:29 +0000
Subject: [PATCH 04/19] Remove external links
Subject: [PATCH 04/20] Remove external links
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 882e02109701a0f8ebd70b1acb5a4dabd6de0692 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:16:13 +0000
Subject: [PATCH 05/19] Remove Canonical image servers
Subject: [PATCH 05/20] Remove Canonical image servers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0006-Remove-version-check.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d2cabcfebc52148aa6571b1dc5a34d5447e878a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 16 Feb 2024 17:32:51 +0000
Subject: [PATCH 06/19] Remove version check
Subject: [PATCH 06/20] Remove version check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0007-Improve-OpenFGA-support.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f7e8504feab449dba9c9427d3675bb38add45312 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Thu, 28 Mar 2024 15:54:43 +0000
Subject: [PATCH 07/19] Improve OpenFGA support
Subject: [PATCH 07/20] Improve OpenFGA support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From eb97c9fe147d387cc56908b6ccbfa6c8a3a5fa7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 2 Aug 2024 18:29:19 +0000
Subject: [PATCH 08/19] Update keys that aren't VM specific
Subject: [PATCH 08/20] Update keys that aren't VM specific
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0009-Fix-cluster-evacuation.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ba3da631293b099cc960db97f7f31396805efa38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 2 Aug 2024 18:42:11 +0000
Subject: [PATCH 09/19] Fix cluster evacuation
Subject: [PATCH 09/20] Fix cluster evacuation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 89157d970860c6d7fe26d1063054c387a079fa69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 2 Aug 2024 18:48:03 +0000
Subject: [PATCH 10/19] Rename user.ui_title to user.ui.title
Subject: [PATCH 10/20] Rename user.ui_title to user.ui.title
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0011-Add-user.uid.sso_only.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 77d4234574d8686e9e24178ac060d1a05e16427d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 2 Aug 2024 19:09:01 +0000
Subject: [PATCH 11/19] Add user.uid.sso_only
Subject: [PATCH 11/20] Add user.uid.sso_only
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0012-Skip-LXD-identity-API.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4b6001a481732a80c34eaf3d1e4dc5264200667a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sat, 3 Aug 2024 04:06:54 +0000
Subject: [PATCH 12/19] Skip LXD identity API
Subject: [PATCH 12/20] Skip LXD identity API
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0a6ed3b409e788bfa42530a29149e1e9864a78c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sat, 3 Aug 2024 04:55:42 +0000
Subject: [PATCH 13/19] Fix network forward count logic
Subject: [PATCH 13/20] Fix network forward count logic
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 24af9a79ab3b030e80eff0e6ed8bc4bdc10c60b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sun, 4 Aug 2024 03:54:21 +0000
Subject: [PATCH 14/19] Hide Cluster option when not clustered
Subject: [PATCH 14/20] Hide Cluster option when not clustered
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4b58db331c721dae66a0e97b1e0cec80c1d99828 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sun, 4 Aug 2024 04:07:45 +0000
Subject: [PATCH 15/19] Add optional location column
Subject: [PATCH 15/20] Add optional location column
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0016-Make-migration-an-action.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2eb54f8799a939a0b8c6d5637bc73f982467d79a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sun, 4 Aug 2024 05:28:49 +0000
Subject: [PATCH 16/19] Make migration an action
Subject: [PATCH 16/20] Make migration an action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b35ce0f0beb7361bee3a641dd959602a0911081d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sun, 4 Aug 2024 07:04:01 +0000
Subject: [PATCH 17/19] Wait for projects list to be loaded
Subject: [PATCH 17/20] Wait for projects list to be loaded
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
2 changes: 1 addition & 1 deletion patches/ui-canonical-0018-Respect-image-profile-list.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d0a27e54bce7a5f5604c8ddfec3abf5d2e72ba13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Sun, 4 Aug 2024 17:55:07 +0000
Subject: [PATCH 18/19] Respect image profile list
Subject: [PATCH 18/20] Respect image profile list
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1ffede19c9b1b62de01b25a9fc258013b8591e62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Fri, 9 Aug 2024 05:14:57 +0000
Subject: [PATCH 19/19] Add support for LVM Cluster
Subject: [PATCH 19/20] Add support for LVM Cluster
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
30 changes: 30 additions & 0 deletions patches/ui-canonical-0020-Fix-stateful-snapshots-creation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 3faab873f56c221cdb074b18007e4477f36d1b66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Thu, 5 Sep 2024 15:11:33 +0000
Subject: [PATCH 20/20] Fix stateful snapshots creation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
License: GPL-3.0-only (without Canonical CLA)
---
src/util/instanceSnapshots.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/instanceSnapshots.tsx b/src/util/instanceSnapshots.tsx
index 49ebcc7..6f5f42d 100644
--- a/src/util/instanceSnapshots.tsx
+++ b/src/util/instanceSnapshots.tsx
@@ -5,7 +5,7 @@ import { testFutureDate, testValidDate, testValidTime } from "./snapshots";

/*** Instance snapshot utils ***/
export const isInstanceStateful = (instance: LxdInstance): boolean => {
- return Boolean(instance.config["migration.stateful"]);
+ return Boolean(instance.expanded_config["migration.stateful"]);
};

export const testDuplicateInstanceSnapshotName = (
--
2.34.1

0 comments on commit 862dc85

Please sign in to comment.