From 9fa83dabbec9a4ef8790774eff5a42e746719bc3 Mon Sep 17 00:00:00 2001 From: "Fabio M. Di Nitto" Date: Tue, 31 Jan 2012 09:45:21 +0100 Subject: [PATCH] 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 Reviewed-by: Jan Friesse --- exec/votequorum.c | 1 + exec/vsf_quorum.c | 1 + 2 files changed, 2 insertions(+) diff --git a/exec/votequorum.c b/exec/votequorum.c index a47d0657..a194d1e1 100644 --- a/exec/votequorum.c +++ b/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, diff --git a/exec/vsf_quorum.c b/exec/vsf_quorum.c index 338b855f..73c595b4 100644 --- a/exec/vsf_quorum.c +++ b/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,