Przeglądaj źródła

quorum: fix load/unload priority for quorum services

all main services are loaded at priority 1.
vfs_quorum and votequorum did not specify a priority and
automatically defaulting to 0, that has a special meaning
of being loaded last and unloaded last.

this is not correct behavior and limits what votequorum
can do at shutdown, for example notify other nodes that
it is leaving (something that cannot be gathered by
totem membership change callback).

fix vsf_quorum to load at priority 1 as the other
default services and bump votequorum to 2 (needs to
unload before everything else currently known).

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto 14 lat temu
rodzic
commit
9fa83dabbe
2 zmienionych plików z 2 dodań i 0 usunięć
  1. 1 0
      exec/votequorum.c
  2. 1 0
      exec/vsf_quorum.c

+ 1 - 0
exec/votequorum.c

@@ -319,6 +319,7 @@ static struct corosync_lib_handler quorum_lib_service[] =
 static struct corosync_service_engine votequorum_service_engine = {
 	.name				= "corosync vote quorum service v1.0",
 	.id				= VOTEQUORUM_SERVICE,
+	.priority			= 2,
 	.private_data_size		= sizeof (struct quorum_pd),
 	.allow_inquorate		= CS_LIB_ALLOW_INQUORATE,
 	.flow_control			= COROSYNC_LIB_FLOW_CONTROL_REQUIRED,

+ 1 - 0
exec/vsf_quorum.c

@@ -186,6 +186,7 @@ static struct corosync_lib_handler quorum_lib_service[] =
 static struct corosync_service_engine quorum_service_handler = {
 	.name				        = "corosync cluster quorum service v0.1",
 	.id					= QUORUM_SERVICE,
+	.priority				= 1,
 	.private_data_size			= sizeof (struct quorum_pd),
 	.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED,
 	.allow_inquorate			= CS_LIB_ALLOW_INQUORATE,