Parcourir la source

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 il y a 14 ans
Parent
commit
9fa83dabbe
2 fichiers modifiés avec 2 ajouts et 0 suppressions
  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 = {
 static struct corosync_service_engine votequorum_service_engine = {
 	.name				= "corosync vote quorum service v1.0",
 	.name				= "corosync vote quorum service v1.0",
 	.id				= VOTEQUORUM_SERVICE,
 	.id				= VOTEQUORUM_SERVICE,
+	.priority			= 2,
 	.private_data_size		= sizeof (struct quorum_pd),
 	.private_data_size		= sizeof (struct quorum_pd),
 	.allow_inquorate		= CS_LIB_ALLOW_INQUORATE,
 	.allow_inquorate		= CS_LIB_ALLOW_INQUORATE,
 	.flow_control			= COROSYNC_LIB_FLOW_CONTROL_REQUIRED,
 	.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 = {
 static struct corosync_service_engine quorum_service_handler = {
 	.name				        = "corosync cluster quorum service v0.1",
 	.name				        = "corosync cluster quorum service v0.1",
 	.id					= QUORUM_SERVICE,
 	.id					= QUORUM_SERVICE,
+	.priority				= 1,
 	.private_data_size			= sizeof (struct quorum_pd),
 	.private_data_size			= sizeof (struct quorum_pd),
 	.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED,
 	.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED,
 	.allow_inquorate			= CS_LIB_ALLOW_INQUORATE,
 	.allow_inquorate			= CS_LIB_ALLOW_INQUORATE,