From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gulm/src lock_io.c ltpx_io.c
Date: 16 Aug 2006 15:01:38 -0000 [thread overview]
Message-ID: <20060816150138.29451.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: lhh at sourceware.org 2006-08-16 15:01:37
Modified files:
gulm/src : lock_io.c ltpx_io.c
Log message:
Port bugfix for 183507 from RHEL4 branch (Fix by cfeist)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gulm/src/lock_io.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.9.2.5.6.1&r2=1.9.2.5.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gulm/src/ltpx_io.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.12.2.1&r2=1.12.2.1.6.1
--- cluster/gulm/src/Attic/lock_io.c 2005/06/21 16:07:40 1.9.2.5.6.1
+++ cluster/gulm/src/Attic/lock_io.c 2006/08/16 15:01:37 1.9.2.5.6.2
@@ -515,6 +515,7 @@
uint64_t x_gen;
uint32_t x_code, x_error, x_rank;
uint8_t x_ama;
+ int connection_attempts = 0;
if((cfd = socket(AF_INET6, SOCK_STREAM, 0)) <0) {
log_err("Failed to create socket. %d:%s\n", errno, strerror(errno));
@@ -526,10 +527,19 @@
adr.sin6_addr = in6addr_loopback;
adr.sin6_port = htons(gulm_config.corePort);
- if( connect(cfd, (struct sockaddr*)&adr, sizeof(struct sockaddr_in6))<0) {
+ while ( connect(cfd, (struct sockaddr*)&adr, sizeof(struct sockaddr_in6))<0) {
close(cfd);
- log_err("Failed to connect to core. %d:%s\n", errno, strerror(errno));
- return -1;
+
+ connection_attempts++;
+ if (connection_attempts > 3) {
+ log_err("Failed to connect to core, shutting down lock_gulmd_LT.");
+ return -1;
+ }
+ if (connection_attempts > 1)
+ log_err("Failed to connect to core. %d:%s\n", errno, strerror(errno));
+
+ sleep(5);
+
}
idx = add_to_pollers(cfd, poll_Open, 0, "_ core _", &in6addr_loopback);
--- cluster/gulm/src/Attic/ltpx_io.c 2005/02/07 15:25:31 1.12.2.1
+++ cluster/gulm/src/Attic/ltpx_io.c 2006/08/16 15:01:37 1.12.2.1.6.1
@@ -426,6 +426,7 @@
uint64_t x_gen;
uint32_t x_code, x_error, x_rank;
uint8_t x_ama;
+ int connection_attempts = 0;
if((cfd = socket(AF_INET6, SOCK_STREAM, 0)) <0) {
log_err("Failed to create socket. %d:%s\n", errno, strerror(errno));
@@ -437,10 +438,18 @@
adr.sin6_addr = in6addr_loopback;
adr.sin6_port = htons(gulm_config.corePort);
- if( connect(cfd, (struct sockaddr*)&adr, sizeof(struct sockaddr_in6))<0) {
+ while ( connect(cfd, (struct sockaddr*)&adr, sizeof(struct sockaddr_in6))<0) {
close(cfd);
- log_err("Failed to connect to core. %d:%s\n", errno, strerror(errno));
- return -1;
+
+ connection_attempts++;
+ if (connection_attempts > 3) {
+ log_err("Failed to connect to core, shutting down lock_gulmd_LTPX.");
+ return -1;
+ }
+ if (connection_attempts > 1)
+ log_err("Failed to connect to core. %d:%s\n", errno, strerror(errno));
+
+ sleep(5);
}
idx = add_to_pollers(cfd, poll_Open, 0, "_ core _", &in6addr_loopback);
reply other threads:[~2006-08-16 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060816150138.29451.qmail@sourceware.org \
--to=lhh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).