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

Fabian Ebner f.ebner at proxmox.com
Thu May 14 11:14:58 CEST 2020


On 5/12/20 3:45 PM, Mira Limbeck wrote:
> 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',
> +				    });
> +				}
>   			    }
>   			});
>   
> 

If we also want the patch for allowing no targetstorage[0], we should 
hide this warning whenever no target storage is selected. If this is 
applied first, I can send a new version of that one.

Maybe instead of showing one warning for each replicated disk, it would 
be enough to show one warning only if the VM is replicated. Something 
like "Option 'Target storage' is ignored for replicated disks". Normally 
all local volumes of a replicated VM are replicated.
And we might want to think about if we should still show the "migration 
might take long"-warning for replicated disks.

If the target node is one that's not replicated to, we could also show a 
warning (or even error) that migration to that node will break 
replication, which is the issue found by Aaron on Monday.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2020-May/043310.html




More information about the pve-devel mailing list