[pve-devel] [PATCH manager] fix #1531: match nodename exactly for vmidselector

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Oct 16 11:30:16 CEST 2017


On 10/16/2017 11:08 AM, Dominik Csapak wrote:
> else we would get vms for wrong hosts if the nodename is a pre/postfix
> of another nodename (e.g. 'abc' and 'abc123')
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/form/VMSelector.js | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
> index 59d2b587..63f6817b 100644
> --- a/www/manager6/form/VMSelector.js
> +++ b/www/manager6/form/VMSelector.js
> @@ -173,6 +173,7 @@ Ext.define('PVE.form.VMSelector', {
>  	if (me.nodename) {
>  	    me.store.filters.add({
>  		property: 'node',
> +		exactMatch: true,

This fixes your described problem just OK, but I can still
have two nodes named:

andromeda
AndRomeDA

Which then also get both included, to cover that we'd need:

caseSensitive: true,
// (it's false by default)

here too. And yeah I know, this is really silly and those who
have such a setup should be ashamed but, sdaly, we do not explicitly
forbid it in `pvecm add `... :/

>  		value: me.nodename
>  	    });
>  	}
> 





More information about the pve-devel mailing list