[pve-devel] [PATCH cluster 3/3] Fix #1199: pmxcfs: vmlist cache update condition in rename

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Nov 9 09:15:56 CET 2016


rename() wrongly used the vmid filled in by
path_contain_vm_config() as a condition for whether to
update the vmlist cache rather than the returned nodename.

This caused a rename in any folder of a file whose name
was a number followed by '.conf' to remove the corresponding
vmid from the vmlist cache.
---

The logic here is from_node != NULL imiplies from_vmid is valid, but not the
other way round.

 data/src/memdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/src/memdb.c b/data/src/memdb.c
index f35257b..e10aac4 100644
--- a/data/src/memdb.c
+++ b/data/src/memdb.c
@@ -1226,7 +1226,7 @@ memdb_rename(
 
 	if (new->type == DT_REG) {
 
-		if (from_vmid)
+		if (from_node)
 			vmlist_delete_vm(from_vmid);
 
 		if (nodename)
-- 
2.1.4





More information about the pve-devel mailing list