svn commit: r217306 - stable/8/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Jan 12 14:13:50 UTC 2011
Author: pjd
Date: Wed Jan 12 14:13:50 2011
New Revision: 217306
URL: http://svn.freebsd.org/changeset/base/217306
Log:
svn merge -c215331,215332,215676 svn+ssh://svn.freebsd.org/base/head/sbin/hastd sbin/hastd
MFC r215331,r215332,r215676:
r215676 (by brucec):
Don't generate input() since it's not used.
r215332:
Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it.
Submitted by: Mikolaj Golub <to.my.trociny at gmail.com>
r215331:
1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created.
Submitted by: [1] Mikolaj Golub <to.my.trociny at gmail.com>
Modified:
stable/8/sbin/hastd/Makefile
stable/8/sbin/hastd/primary.c
Directory Properties:
stable/8/sbin/hastd/ (props changed)
Modified: stable/8/sbin/hastd/Makefile
==============================================================================
--- stable/8/sbin/hastd/Makefile Wed Jan 12 13:55:01 2011 (r217305)
+++ stable/8/sbin/hastd/Makefile Wed Jan 12 14:13:50 2011 (r217306)
@@ -26,6 +26,7 @@ CFLAGS+=-DINET6
.endif
# This is needed to have WARNS > 1.
CFLAGS+=-DYY_NO_UNPUT
+CFLAGS+=-DYY_NO_INPUT
DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
Modified: stable/8/sbin/hastd/primary.c
==============================================================================
--- stable/8/sbin/hastd/primary.c Wed Jan 12 13:55:01 2011 (r217305)
+++ stable/8/sbin/hastd/primary.c Wed Jan 12 14:13:50 2011 (r217306)
@@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, s
/* Prepare outgoing connection with remote node. */
if (proto_client(res->hr_remoteaddr, &out) < 0) {
- primary_exit(EX_TEMPFAIL, "Unable to create connection to %s",
+ primary_exit(EX_TEMPFAIL,
+ "Unable to create outgoing connection to %s",
res->hr_remoteaddr);
}
/* Try to connect, but accept failure. */
@@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, s
* Setup incoming connection with remote node.
*/
if (proto_client(res->hr_remoteaddr, &in) < 0) {
- pjdlog_errno(LOG_WARNING, "Unable to create connection to %s",
+ primary_exit(EX_TEMPFAIL,
+ "Unable to create incoming connection to %s",
res->hr_remoteaddr);
}
/* Try to connect, but accept failure. */
@@ -2034,6 +2036,7 @@ guard_thread(void *arg)
PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0);
PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0);
+ timeout.tv_sec = RETRY_SLEEP;
timeout.tv_nsec = 0;
signo = -1;
@@ -2059,7 +2062,6 @@ guard_thread(void *arg)
guard_one(res, ii);
lastcheck = now;
}
- timeout.tv_sec = RETRY_SLEEP;
signo = sigtimedwait(&mask, NULL, &timeout);
}
/* NOTREACHED */
More information about the svn-src-stable-8
mailing list