فهرست منبع

totemconfig: Put autogenerated nodeid back to cmap

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 4 سال پیش
والد
کامیت
89ab80f694
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      exec/totemconfig.c

+ 9 - 0
exec/totemconfig.c

@@ -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);
 				}
 			}