]> git.proxmox.com Git - mirror_corosync.git/commitdiff
totemconfig: Put autogenerated nodeid back to cmap
authorJan Friesse <jfriesse@redhat.com>
Fri, 30 Jul 2021 14:19:10 +0000 (16:19 +0200)
committerJan Friesse <jfriesse@redhat.com>
Mon, 2 Aug 2021 13:13:23 +0000 (15:13 +0200)
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
exec/totemconfig.c

index 21bfbae4a90ade8228c4a112e535f06ceff14669..b0ed2bff0bb67fa9dd430a0bf3b1ea902d502601 100644 (file)
@@ -1416,7 +1416,16 @@ static int put_nodelist_members_to_config(struct totem_config *totem_config, icm
 
                                        log_printf(LOGSYS_LEVEL_DEBUG,
                                                   "Generated nodeid = " CS_PRI_NODE_ID " for %s", nodeid, str);
+
                                        free(str);
+                                       /*
+                                        * Put nodeid back to nodelist to make cfgtool work
+                                        */
+                                       snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.nodeid", node_pos);
+                                       /*
+                                        * Not critical
+                                        */
+                                       (void)icmap_set_uint32_r(map, tmp_key, nodeid);
                                }
                        }