Просмотр исходного кода

This simple patch solves a problem we see when testing AMF. If a node leaves
and joins the cluster quickly (within one second is default), the config
change messages will not indicate that the node left and rejoined. The patch
introduces a short delay in main() to make sure the token_timeout expires.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1259 fd59a12c-fef9-0310-b244-a6a79926bd2f

Hans Feldt 19 лет назад
Родитель
Сommit
4abe4a6fbd
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      exec/main.c

+ 7 - 0
exec/main.c

@@ -530,6 +530,13 @@ int main (int argc, char **argv)
 	totem_config.totem_logging_configuration.log_level_debug = mkpri (LOG_LEVEL_DEBUG, totem_log_service);
 	totem_config.totem_logging_configuration.log_printf = internal_log_printf;
 
+	/*
+	 * Sleep for a while to let other nodes in the cluster
+	 * understand that this node has been away (if it was
+	 * an aisexec restart).
+	 */
+	usleep(totem_config.token_timeout * 2000);
+
 	/*
 	 * if totempg_initialize doesn't have root priveleges, it cannot
 	 * bind to a specific interface.  This only matters if