update = host->vhost_count != vhost_count ||
host->down != down ||
host->last_updown_change != last_updown_change;
-;
+
if (strcmp(tag, host->tag) != 0) {
i_error("director(%s): Host %s changed tag from '%s' to '%s'",
conn->name, net_ip2addr(&host->ip),
mail_host_set_vhost_count(conn->dir->mail_hosts,
host, vhost_count);
director_update_host(conn->dir, src_host, dir_host, host);
+ } else {
+ dir_debug("Ignoring host %s update vhost_count=%u "
+ "down=%d last_updown_change=%ld (hosts_hash=%u)",
+ net_ip2addr(&ip), vhost_count, down,
+ (long)last_updown_change,
+ mail_hosts_hash(conn->dir->mail_hosts));
}
return TRUE;
}
/* duplicate SYNC (which was sent just in case the
previous one got lost) */
} else {
- dir_debug("Ring is synced (%s sent seq=%u)",
- conn->name, seq);
+ dir_debug("Ring is synced (%s sent seq=%u, hosts_hash=%u)",
+ conn->name, seq,
+ mail_hosts_hash(dir->mail_hosts));
director_set_ring_synced(dir);
}
} else {
}
user = user_directory_add(dir->users, request->username_hash,
host, ioloop_time);
- dir_debug("request: %u added timeout to %u",
- request->username_hash, user->timestamp);
+ dir_debug("request: %u added timeout to %u (hosts_hash=%u)",
+ request->username_hash, user->timestamp,
+ mail_hosts_hash(dir->mail_hosts));
}
i_assert(!user->weak);
timeout_remove(&dir->to_handshake_warning);
if (dir->ring_handshake_warning_sent) {
i_warning("Ring is synced, continuing delayed requests "
- "(syncing took %d secs)",
- (int)(ioloop_time - dir->ring_last_sync_time));
+ "(syncing took %d secs, hosts_hash=%u)",
+ (int)(ioloop_time - dir->ring_last_sync_time),
+ mail_hosts_hash(dir->mail_hosts));
dir->ring_handshake_warning_sent = FALSE;
}
/* update state in case this is the first mail host being added */
director_set_state_changed(dir);
+ dir_debug("Updating host %s vhost_count=%u "
+ "down=%d last_updown_change=%ld (hosts_hash=%u)",
+ net_ip2addr(&host->ip), host->vhost_count, host->down,
+ (long)host->last_updown_change,
+ mail_hosts_hash(dir->mail_hosts));
+
if (orig_src == NULL) {
orig_src = dir->self_host;
orig_src->last_seq++;