[pve-devel] [PATCH manager] add warning for replicated disks

Mira Limbeck m.limbeck at proxmox.com
Tue May 12 15:45:24 CEST 2020


Replicated disks can only be live migrated to the same storage on the
target node. Add a warning that mentions that limitation. The warning is
only printed when the target node is a replication target. When the
target node is not a replication target, the option 'Target storage' is
not ignored.

Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
Migrating the VM to a node that is not a replication target keeps the
replication active. This leads to strange behavior when simultaneously
moving the disks to a storage that does not support replication (e.g.
lvm-thin).
Also if that's the case, and one of the disks does not have replicate=0
set, it will still show the warning.

 www/manager6/window/Migrate.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 61bc6a49..be471258 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -193,6 +193,7 @@ Ext.define('PVE.window.Migrate', {
 	    }
 
 	    Proxmox.Utils.API2Request({
+		params: { target: me.lookup('pveNodeSelector').value },
 		url: '/nodes/' + vm.get('nodename') + '/' + vm.get('vmtype') + '/' + vm.get('vmid') + '/migrate',
 		method: 'GET',
 		failure: function(response, opts) {
@@ -272,6 +273,13 @@ Ext.define('PVE.window.Migrate', {
 					+' (' + PVE.Utils.render_size(disk.size) + ')',
 				    severity: 'warning'
 				});
+				if (migrateStats.is_replicated && disk.replicate) {
+				    migration.preconditions.push({
+					text: 'Migration of replicated disk \'' + disk.volid
+					    + '\' is limited to the same storage on the target node. Option \'Target storage\' is ignored.',
+					severity: 'warning',
+				    });
+				}
 			    }
 			});
 
-- 
2.20.1





More information about the pve-devel mailing list