From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 12/12] tabled: print hostname always
Date: Sat, 17 Apr 2010 22:44:21 -0600 [thread overview]
Message-ID: <20100417224421.32c171a5@redhat.com> (raw)
This code clearly was obsolete and wishful thinking. Let's just be
simple. Most importantly print something that tells the sysadmin
what node is the problem.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
---
server/storage.c | 19 +++----------------
server/tabled.h | 2 +-
2 files changed, 4 insertions(+), 17 deletions(-)
commit 31dc52b7d177bd18a765a9fc407c2afdd103613e
Author: Master <zaitcev@lembas.zaitcev.lan>
Date: Sat Apr 17 20:42:24 2010 -0600
Print host name in storage retries.
diff --git a/server/storage.c b/server/storage.c
index 1793fa0..a63012e 100644
--- a/server/storage.c
+++ b/server/storage.c
@@ -489,26 +489,13 @@ void stor_add_node(uint32_t nid, const char *hostname, const char *portstr,
int stor_node_check(struct storage_node *stn)
{
struct st_client *stc;
- char host[41];
- char port[6];
int rc;
rc = stor_new_stc(stn, &stc);
if (rc < 0) {
- if (rc == -EINVAL) {
- if (getnameinfo((struct sockaddr *) &stn->addr,
- stn->alen, host, sizeof(host),
- port, sizeof(port),
- NI_NUMERICHOST|NI_NUMERICSERV) == 0) {
- applog(LOG_INFO, "Error connecting to chunkd"
- " on host %s port %s",
- host, port);
- } else {
- applog(LOG_INFO, "Error connecting to chunkd");
- }
- } else {
- applog(LOG_INFO, "Error %d connecting to chunkd", rc);
- }
+ applog(LOG_INFO,
+ "Error %d connecting to chunkd on host %s",
+ rc, stn->hostname);
return -1;
}
diff --git a/server/tabled.h b/server/tabled.h
index eced4b6..75fa147 100644
--- a/server/tabled.h
+++ b/server/tabled.h
@@ -96,7 +96,7 @@ struct storage_node {
unsigned alen;
struct sockaddr_in6 addr;
- char *hostname; /* Only used because stc_new is overly smart. */
+ char *hostname;
int ref; /* number of open_chunk or other */
};
reply other threads:[~2010-04-18 4:44 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=20100417224421.32c171a5@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.