Re: [PATCH] CFG: Prevent CFG from orignating messages during SYNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason,
thanks for the patch. I was thinking a little deeper about this problem, and I think there are few problems for practical use point.

Reload config is no brainier, no need to do it during sync, but kill node (local one), and try shutdown (again only for local host) may be wanted action even during sync. For example lets say there is problem with configuration and corosync is constantly in sync state, then there is no possibility how to turn it off via corosync-cfgtool.

What is your opinion?

Regards,
  Honza

Jason napsal(a):
From: Jason HU <huzhijiang@xxxxxxxxx>

During SYNC, corosync-cfgtool -R/-H commands can pass through IPC then send totem messages. This may corrupts assembly_list_inuse/assembly_list_free if those messages are recedived after SYNC is done.

The solution is marking related CFG APIs as CS_LIB_FLOW_CONTROL_REQUIRED.

Signed-off-by: Jason HU <huzhijiang@xxxxxxxxx>
---
  exec/cfg.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/exec/cfg.c b/exec/cfg.c
index b061bd4..b209331 100644
--- a/exec/cfg.c
+++ b/exec/cfg.c
@@ -177,15 +177,15 @@ static struct corosync_lib_handler cfg_lib_engine[] =
  	},
  	{ /* 2 */
  		.lib_handler_fn		= message_handler_req_lib_cfg_killnode,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
  	},
  	{ /* 3 */
  		.lib_handler_fn		= message_handler_req_lib_cfg_tryshutdown,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
  	},
  	{ /* 4 */
  		.lib_handler_fn		= message_handler_req_lib_cfg_replytoshutdown,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
  	},
  	{ /* 5 */
  		.lib_handler_fn		= message_handler_req_lib_cfg_get_node_addrs,
@@ -197,7 +197,7 @@ static struct corosync_lib_handler cfg_lib_engine[] =
  	},
  	{ /* 7 */
  		.lib_handler_fn		= message_handler_req_lib_cfg_reload_config,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
  	}
  };



_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss



[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux