cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] cman: default to 2 different mcast addresses in RRP mode and set rrp_problem_count_threshold
@ 2011-09-08  9:11 Fabio M. Di Nitto
  2011-09-08  9:40 ` Jan Friesse
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. Di Nitto @ 2011-09-08  9:11 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Resolves: rhbz#735912

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 cman/daemon/cman-preconfig.c         |   16 ++++++++++++----
 config/tools/xml/cluster.rng.in.head |    8 +++++++-
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index 64f505f..d5e7a92 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -393,13 +393,14 @@ static uint16_t generate_cluster_id(char *name)
 	return value & 0xFFFF;
 }
 
-static char *default_mcast(char *node, uint16_t clusterid)
+static char *default_mcast(char *node, int altiface)
 {
         struct addrinfo *ainfo;
         struct addrinfo ahints;
 	int ret;
 	int family;
 	static char addr[132];
+	uint16_t clusterid = cluster_id + altiface;
 
         memset(&ahints, 0, sizeof(ahints));
 
@@ -691,7 +692,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
 		}
 
 		if (!mcast_name) {
-			mcast_name = default_mcast(nodename, cluster_id);
+			mcast_name = default_mcast(nodename, PRIMARY_IFACE);
 
 		}
 		if (!mcast_name)
@@ -778,7 +779,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
 		objdb_get_int(objdb, alt_object, "ttl", &altttl, ttl);
 
 		if (objdb_get_string(objdb, alt_object, "mcast", &mcast)) {
-			mcast = mcast_name;
+			mcast = default_mcast(nodename, ALT_IFACE);
 		}
 
 		if (add_ifaddr(objdb, mcast, node, portnum, altttl,
@@ -992,6 +993,13 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
 			}
 		}
 
+		if (objdb_get_string(objdb, object_handle, "rrp_problem_count_threshold", &value)) {
+			if (num_interfaces > 1) {
+				objdb->object_key_create_typed(object_handle, "rrp_problem_count_threshold",
+							       "3", 2, OBJDB_VALUETYPE_STRING);
+			}
+		}
+
 		if (objdb_get_string(objdb, object_handle, "secauth", &value)) {
 			sprintf(tmp, "%d", 1);
 			objdb->object_key_create_typed(object_handle, "secauth",
@@ -1136,7 +1144,7 @@ static int set_noccs_defaults(struct objdb_iface_ver0 *objdb)
 	num_nodenames = 1;
 
 	if (!mcast_name) {
-		mcast_name = default_mcast(nodename, cluster_id);
+		mcast_name = default_mcast(nodename, PRIMARY_IFACE);
 	}
 
 	/* This will increase as nodes join the cluster */
diff --git a/config/tools/xml/cluster.rng.in.head b/config/tools/xml/cluster.rng.in.head
index 1afa9e8..8ca696a 100644
--- a/config/tools/xml/cluster.rng.in.head
+++ b/config/tools/xml/cluster.rng.in.head
@@ -257,7 +257,7 @@ To validate your cluster.conf against this schema, run:
       rha:sample="5"/>
    </optional>
    <!-- FIXME: The following description was adapted from the man page.
-   It may be tool long for the schema docuement. Consider cutting text
+   It may be tool long for the schema document. Consider cutting text
    after the second sentence and referring the reader to the openais.conf
    man page. -->
    <optional>
@@ -274,6 +274,12 @@ To validate your cluster.conf against this schema, run:
         directives are specified, only active or passive may be
         chosen." rha:sample="active"/>
    </optional>
+    <attribute name="rrp_problem_count_threshold"
+	rha:description="This specifies the number of times a problem is detected
+        with a link before setting the link faulty.  Once a link is set faulty, no
+        more data is transmitted upon it. The default is 10 problem counts."
+        rha:sample="3"/>
+   </optional>
    <optional>
     <attribute name="secauth" rha:description="This attribute specifies
        that HMAC/SHA1 authentication should be used to authenticate all
-- 
1.7.4.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] cman: default to 2 different mcast addresses in RRP mode and set rrp_problem_count_threshold
  2011-09-08  9:11 [Cluster-devel] [PATCH] cman: default to 2 different mcast addresses in RRP mode and set rrp_problem_count_threshold Fabio M. Di Nitto
@ 2011-09-08  9:40 ` Jan Friesse
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Friesse @ 2011-09-08  9:40 UTC (permalink / raw)
  To: cluster-devel.redhat.com

After description is changed,
ACK


Fabio M. Di Nitto napsal(a):
> Resolves: rhbz#735912
> 
> Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
> ---
>  cman/daemon/cman-preconfig.c         |   16 ++++++++++++----
>  config/tools/xml/cluster.rng.in.head |    8 +++++++-
>  2 files changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
> index 64f505f..d5e7a92 100644
> --- a/cman/daemon/cman-preconfig.c
> +++ b/cman/daemon/cman-preconfig.c
> @@ -393,13 +393,14 @@ static uint16_t generate_cluster_id(char *name)
>  	return value & 0xFFFF;
>  }
>  
> -static char *default_mcast(char *node, uint16_t clusterid)
> +static char *default_mcast(char *node, int altiface)
>  {
>          struct addrinfo *ainfo;
>          struct addrinfo ahints;
>  	int ret;
>  	int family;
>  	static char addr[132];
> +	uint16_t clusterid = cluster_id + altiface;
>  
>          memset(&ahints, 0, sizeof(ahints));
>  
> @@ -691,7 +692,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
>  		}
>  
>  		if (!mcast_name) {
> -			mcast_name = default_mcast(nodename, cluster_id);
> +			mcast_name = default_mcast(nodename, PRIMARY_IFACE);
>  
>  		}
>  		if (!mcast_name)
> @@ -778,7 +779,7 @@ static int get_nodename(struct objdb_iface_ver0 *objdb)
>  		objdb_get_int(objdb, alt_object, "ttl", &altttl, ttl);
>  
>  		if (objdb_get_string(objdb, alt_object, "mcast", &mcast)) {
> -			mcast = mcast_name;
> +			mcast = default_mcast(nodename, ALT_IFACE);
>  		}
>  
>  		if (add_ifaddr(objdb, mcast, node, portnum, altttl,
> @@ -992,6 +993,13 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
>  			}
>  		}
>  
> +		if (objdb_get_string(objdb, object_handle, "rrp_problem_count_threshold", &value)) {
> +			if (num_interfaces > 1) {
> +				objdb->object_key_create_typed(object_handle, "rrp_problem_count_threshold",
> +							       "3", 2, OBJDB_VALUETYPE_STRING);
> +			}
> +		}
> +
>  		if (objdb_get_string(objdb, object_handle, "secauth", &value)) {
>  			sprintf(tmp, "%d", 1);
>  			objdb->object_key_create_typed(object_handle, "secauth",
> @@ -1136,7 +1144,7 @@ static int set_noccs_defaults(struct objdb_iface_ver0 *objdb)
>  	num_nodenames = 1;
>  
>  	if (!mcast_name) {
> -		mcast_name = default_mcast(nodename, cluster_id);
> +		mcast_name = default_mcast(nodename, PRIMARY_IFACE);
>  	}
>  
>  	/* This will increase as nodes join the cluster */
> diff --git a/config/tools/xml/cluster.rng.in.head b/config/tools/xml/cluster.rng.in.head
> index 1afa9e8..8ca696a 100644
> --- a/config/tools/xml/cluster.rng.in.head
> +++ b/config/tools/xml/cluster.rng.in.head
> @@ -257,7 +257,7 @@ To validate your cluster.conf against this schema, run:
>        rha:sample="5"/>
>     </optional>
>     <!-- FIXME: The following description was adapted from the man page.
> -   It may be tool long for the schema docuement. Consider cutting text
> +   It may be tool long for the schema document. Consider cutting text
>     after the second sentence and referring the reader to the openais.conf
>     man page. -->
>     <optional>
> @@ -274,6 +274,12 @@ To validate your cluster.conf against this schema, run:
>          directives are specified, only active or passive may be
>          chosen." rha:sample="active"/>
>     </optional>
> +    <attribute name="rrp_problem_count_threshold"
> +	rha:description="This specifies the number of times a problem is detected
> +        with a link before setting the link faulty.  Once a link is set faulty, no
> +        more data is transmitted upon it. The default is 10 problem counts."
> +        rha:sample="3"/>
> +   </optional>
>     <optional>
>      <attribute name="secauth" rha:description="This attribute specifies
>         that HMAC/SHA1 authentication should be used to authenticate all



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-08  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08  9:11 [Cluster-devel] [PATCH] cman: default to 2 different mcast addresses in RRP mode and set rrp_problem_count_threshold Fabio M. Di Nitto
2011-09-08  9:40 ` Jan Friesse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).