mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-05 06:16:49 +00:00
move nodeid from interface section to totem section
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@979 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
d8fc111119
commit
701b56e551
@ -1180,7 +1180,7 @@ int main (int argc, char **argv)
|
||||
&objdb_handle,
|
||||
"objdb",
|
||||
0,
|
||||
(void **)&objdb,
|
||||
(void **)(void *)&objdb,
|
||||
0);
|
||||
|
||||
objdb->objdb_init ();
|
||||
@ -1195,7 +1195,7 @@ int main (int argc, char **argv)
|
||||
&config_handle,
|
||||
config_iface,
|
||||
config_version,
|
||||
(void **)&config,
|
||||
(void **)(void *)&config,
|
||||
0);
|
||||
|
||||
if (res == -1) {
|
||||
@ -1217,7 +1217,6 @@ int main (int argc, char **argv)
|
||||
|
||||
openais_service_link_all (objdb);
|
||||
|
||||
printf ("main config read\n");
|
||||
res = openais_main_config_read (objdb, &error_string, &main_config);
|
||||
if (res == -1) {
|
||||
log_printf (LOG_LEVEL_NOTICE, "AIS Executive Service: Copyright (C) 2002-2006 MontaVista Software, Inc and contributors.\n");
|
||||
@ -1226,7 +1225,6 @@ printf ("main config read\n");
|
||||
openais_exit_error (AIS_DONE_MAINCONFIGREAD);
|
||||
}
|
||||
|
||||
printf ("totem config read\n");
|
||||
res = totem_config_read (objdb, &totem_config, &error_string, 3);
|
||||
if (res == -1) {
|
||||
log_printf (LOG_LEVEL_NOTICE, "AIS Executive Service: Copyright (C) 2002-2006 MontaVista Software, Inc and contributors.\n");
|
||||
|
@ -66,7 +66,6 @@ struct totem_interface {
|
||||
struct totem_ip_address boundto;
|
||||
struct totem_ip_address mcast_addr;
|
||||
uint16_t ip_port;
|
||||
int node_id;
|
||||
};
|
||||
|
||||
struct totem_logging_configuration {
|
||||
@ -86,6 +85,7 @@ struct totem_config {
|
||||
*/
|
||||
struct totem_interface *interfaces;
|
||||
int interface_count;
|
||||
int node_id;
|
||||
|
||||
/*
|
||||
* key information
|
||||
|
@ -166,6 +166,12 @@ extern int totem_config_read (
|
||||
totem_config->secauth = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get interface node id
|
||||
*/
|
||||
objdb_get_int (objdb, object_totem_handle, "nodeid", &totem_config->node_id);
|
||||
|
||||
objdb_get_int (objdb,object_totem_handle, "threads", &totem_config->threads);
|
||||
|
||||
|
||||
@ -214,11 +220,6 @@ extern int totem_config_read (
|
||||
|
||||
objdb_get_int (objdb, object_interface_handle, "ringnumber", &ringnumber);
|
||||
|
||||
/*
|
||||
* Get interface node id
|
||||
*/
|
||||
objdb_get_int (objdb, object_interface_handle, "nodeid", &totem_config->interfaces[ringnumber].node_id);
|
||||
|
||||
/*
|
||||
* Get interface multicast address
|
||||
*/
|
||||
@ -270,7 +271,6 @@ int totem_config_validate (
|
||||
}
|
||||
|
||||
for (i = 0; i < totem_config->interface_count; i++) {
|
||||
printf ("validing interface %d of %d\n", i, totem_config->interfaces);
|
||||
/*
|
||||
* Some error checking of parsed data to make sure its valid
|
||||
*/
|
||||
@ -285,7 +285,7 @@ printf ("validing interface %d of %d\n", i, totem_config->interfaces);
|
||||
}
|
||||
|
||||
if (totem_config->interfaces[i].mcast_addr.family == AF_INET6 &&
|
||||
totem_config->interfaces[i].node_id == 0) {
|
||||
totem_config->node_id == 0) {
|
||||
|
||||
error_reason = "An IPV6 network requires that a node ID be specified.";
|
||||
goto parse_error;
|
||||
@ -507,7 +507,6 @@ int totem_config_keyread (
|
||||
char *key_location = NULL;
|
||||
unsigned int object_service_handle;
|
||||
int res;
|
||||
int i;
|
||||
|
||||
if (totem_config->secauth == 0) {
|
||||
return (0);
|
||||
@ -558,7 +557,6 @@ int totem_config_keyread (
|
||||
|
||||
return (0);
|
||||
|
||||
parse_error:
|
||||
*error_string = error_string_response;
|
||||
key_error:
|
||||
return (-1);
|
||||
|
@ -1231,7 +1231,7 @@ int totemnet_initialize (
|
||||
|
||||
instance->totemnet_poll_handle = poll_handle;
|
||||
|
||||
instance->totem_interface->bindnet.nodeid = instance->totem_interface->node_id;
|
||||
instance->totem_interface->bindnet.nodeid = instance->totem_config->node_id;
|
||||
|
||||
instance->context = context;
|
||||
instance->totemnet_deliver_fn = deliver_fn;
|
||||
|
@ -65,19 +65,12 @@ Within the
|
||||
.B totem
|
||||
directive, an interface directive is required. There is also one configuration
|
||||
option which is required:
|
||||
.PP
|
||||
.PP
|
||||
.TP
|
||||
version
|
||||
This specifies the version of the configuration file. Currently the only
|
||||
valid version for this directive is 2.
|
||||
|
||||
.PP
|
||||
.PP
|
||||
Within the
|
||||
.B interface
|
||||
sub-directive of totem there are four parameters which are required unless IPV6
|
||||
is used, in which case 5 parameters are required:
|
||||
sub-directive of totem there are four parameters which are required:
|
||||
|
||||
.TP
|
||||
ringnumber
|
||||
This specifies the ring number for the interface. When using the redundant
|
||||
@ -113,21 +106,33 @@ This specifies the UDP port number. It is possible to use the same multicast
|
||||
address on a network with the openais services configured for different
|
||||
UDP ports.
|
||||
|
||||
.PP
|
||||
.PP
|
||||
Within the
|
||||
.B totem
|
||||
directive, there are six configuration options of which 1 is required,
|
||||
4 are optional, and 1 is requierd when IPV6 is configured in the interface
|
||||
subdirective. The required directive controls the version of the totem
|
||||
configuration. The optional option unless using IPV6 directive controls
|
||||
identification of the processor. The optional options control secrecy and
|
||||
authentication, the redundant ring mode of operation, maximum network MTU,
|
||||
and number of sending threads, and the nodeid field.
|
||||
|
||||
.TP
|
||||
version
|
||||
This specifies the version of the configuration file. Currently the only
|
||||
valid version for this directive is 2.
|
||||
|
||||
.PP
|
||||
.PP
|
||||
.TP
|
||||
nodeid
|
||||
This configuration option is optional when using IPv4 and required when using
|
||||
IPv6. This is a 32 bit value specifying the node identifier delivered to the
|
||||
cluster membership service. If this is not specified with IPv4, the node id
|
||||
will be determined from the 32 bit IP address the system to which the system
|
||||
is bound. The node identifier value of zero is reserved and should not be used.
|
||||
|
||||
.PP
|
||||
.PP
|
||||
Within the
|
||||
.B totem
|
||||
directive, there are four configuration options which are all optional.
|
||||
These control secrecy & authentication, the redundant ring mode of operation,
|
||||
and network MTU, and number of sending threads.
|
||||
is bound with ring identifier of 0. The node identifier value of zero is
|
||||
reserved and should not be used.
|
||||
|
||||
.TP
|
||||
secauth
|
||||
|
Loading…
Reference in New Issue
Block a user