From: Alexandre Derumier via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
Subject: [pve-devel] [PATCH pve-manager 1/1] migrate: allow migration from dead node
Date: Mon, 24 Mar 2025 12:15:28 +0100 [thread overview]
Message-ID: <mailman.126.1742814976.359.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20250324111529.338025-1-alexandre.derumier@groupe-cyllene.com>
[-- Attachment #1: Type: message/rfc822, Size: 4883 bytes --]
From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 1/1] migrate: allow migration from dead node
Date: Mon, 24 Mar 2025 12:15:28 +0100
Message-ID: <20250324111529.338025-2-alexandre.derumier@groupe-cyllene.com>
Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
---
www/manager6/window/Migrate.js | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 78d03921..db63e484 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -34,7 +34,9 @@ Ext.define('PVE.window.Migrate', {
formulas: {
setMigrationMode: function(get) {
- if (get('running')) {
+ if (get('migration.deadnode')) {
+ return gettext('Dead Node Mode. Please double check that node is really down and vm is really shutdown !!!!!!!!!');
+ } else if (get('running')) {
if (get('vmtype') === 'qemu') {
return gettext('Online');
} else {
@@ -117,6 +119,12 @@ Ext.define('PVE.window.Migrate', {
target: values.target,
};
+ var node = vm.get('nodename');
+ if (vm.get('migration.deadnode')) {
+ node = params.target; //send query to target node
+ params.deadnode = vm.get('nodename');
+ }
+
if (vm.get('migration.mode')) {
params[vm.get('migration.mode')] = 1;
}
@@ -135,7 +143,7 @@ Ext.define('PVE.window.Migrate', {
Proxmox.Utils.API2Request({
params: params,
- url: '/nodes/' + vm.get('nodename') + '/' + vm.get('vmtype') + '/' + vm.get('vmid') + '/migrate',
+ url: '/nodes/' + node + '/' + vm.get('vmtype') + '/' + vm.get('vmid') + '/migrate',
waitMsgTarget: view,
method: 'POST',
failure: function(response, opts) {
@@ -185,6 +193,13 @@ Ext.define('PVE.window.Migrate', {
vm = me.getViewModel(),
migrateStats;
+ //check if the source node is dead/offline
+ const nodeInfo = PVE.data.ResourceStore.getNodes().find(node => node.node === vm.get('nodename'));
+ if (nodeInfo.status === 'offline') {
+ vm.set('migration.deadnode', 1);
+ return;
+ }
+
if (vm.get('running')) {
vm.set('migration.mode', 'online');
}
--
2.39.5
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next parent reply other threads:[~2025-03-24 11:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250324111529.338025-1-alexandre.derumier@groupe-cyllene.com>
2025-03-24 11:15 ` Alexandre Derumier via pve-devel [this message]
2025-03-24 11:15 ` [pve-devel] [PATCH qemu-server 1/1] qemu: add offline " Alexandre Derumier via pve-devel
2025-04-01 9:52 ` Fabian Grünbichler
2025-04-01 9:57 ` Thomas Lamprecht
2025-04-01 10:19 ` Dominik Csapak
2025-04-01 10:46 ` Thomas Lamprecht
2025-04-01 11:13 ` Fabian Grünbichler
2025-04-01 12:38 ` Thomas Lamprecht
2025-04-01 11:37 ` Dominik Csapak
2025-04-01 12:54 ` Thomas Lamprecht
2025-04-01 13:20 ` Dominik Csapak
2025-04-01 15:08 ` Thomas Lamprecht
2025-04-01 16:13 ` DERUMIER, Alexandre via pve-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mailman.126.1742814976.359.pve-devel@lists.proxmox.com \
--to=pve-devel@lists.proxmox.com \
--cc=alexandre.derumier@groupe-cyllene.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal