From: Martin Schwenke Date: Thu, 15 Aug 2013 07:04:01 +0000 (+1000) Subject: recoverd: Log more information when interfaces change X-Git-Tag: ctdb-2.4~13 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=3ef93a1a3e60cdf5d8954e7a16a988ea6126916b;p=ctdb.git recoverd: Log more information when interfaces change Signed-off-by: Martin Schwenke --- diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c index d35a786a..1682339d 100644 --- a/server/ctdb_recoverd.c +++ b/server/ctdb_recoverd.c @@ -2911,17 +2911,30 @@ static bool interfaces_have_changed(struct ctdb_context *ctdb, if (!rec->ifaces) { /* We haven't been here before so things have changed */ + DEBUG(DEBUG_NOTICE, ("Initial interface fetched\n")); ret = true; } else if (rec->ifaces->num != ifaces->num) { /* Number of interfaces has changed */ + DEBUG(DEBUG_NOTICE, ("Interface count changed from %d to %d\n", + rec->ifaces->num, ifaces->num)); ret = true; } else { /* See if interface names or link states have changed */ int i; for (i = 0; i < rec->ifaces->num; i++) { struct ctdb_control_iface_info * iface = &rec->ifaces->ifaces[i]; - if (strcmp(iface->name, ifaces->ifaces[i].name) != 0 || - iface->link_state != ifaces->ifaces[i].link_state) { + if (strcmp(iface->name, ifaces->ifaces[i].name) != 0) { + DEBUG(DEBUG_NOTICE, + ("Interface in slot %d changed: %s => %s\n", + i, iface->name, ifaces->ifaces[i].name)); + ret = true; + break; + } + if (iface->link_state != ifaces->ifaces[i].link_state) { + DEBUG(DEBUG_NOTICE, + ("Interface %s changed state: %d => %d\n", + iface->name, iface->link_state, + ifaces->ifaces[i].link_state)); ret = true; break; }