comparison src/director/director-connection.c @ 19608:01e33753b08e

director: "Host is being updated before previous update had finished" logs now details.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Fri, 22 Jan 2016 19:08:11 +0200
parents 0f22db71df7a
children a502d38e7b70
comparison
equal deleted inserted replaced
19607:de55cde023c4 19608:01e33753b08e
914 host_tag, tag); 914 host_tag, tag);
915 mail_host_set_tag(host, tag); 915 mail_host_set_tag(host, tag);
916 update = TRUE; 916 update = TRUE;
917 } 917 }
918 if (update && host->desynced) { 918 if (update && host->desynced) {
919 string_t *str = t_str_new(128);
920
921 str_printfa(str, "director(%s): Host %s is being updated before previous update had finished (",
922 conn->name, net_ip2addr(&host->ip));
923 if (host->down != down) {
924 if (host->down)
925 str_append(str, "down -> up");
926 else
927 str_append(str, "up -> down");
928 }
929 if (host->vhost_count != vhost_count) {
930 if (host->down != down)
931 str_append(str, ", ");
932 str_printfa(str, "vhosts %u -> %u",
933 host->vhost_count, vhost_count);
934 }
935 str_append(str, ") - ");
936
919 vhost_count = I_MIN(vhost_count, host->vhost_count); 937 vhost_count = I_MIN(vhost_count, host->vhost_count);
920 if (host->down != down) { 938 if (host->down != down) {
921 if (host->last_updown_change <= last_updown_change) 939 if (host->last_updown_change <= last_updown_change)
922 down = host->last_updown_change; 940 down = host->last_updown_change;
923 } 941 }
924 last_updown_change = I_MAX(last_updown_change, 942 last_updown_change = I_MAX(last_updown_change,
925 host->last_updown_change); 943 host->last_updown_change);
926 i_warning("director(%s): Host %s is being updated before previous update had finished - " 944 str_printfa(str, "setting to state=%s vhosts=%u",
927 "setting to state=%s vhosts=%u", 945 down ? "down" : "up", vhost_count);
928 conn->name, net_ip2addr(&host->ip), 946 i_warning("%s", str_c(str));
929 down ? "down" : "up", vhost_count);
930 /* make the change appear to come from us, so it 947 /* make the change appear to come from us, so it
931 reaches the full ring */ 948 reaches the full ring */
932 dir_host = NULL; 949 dir_host = NULL;
933 src_host = conn->dir->self_host; 950 src_host = conn->dir->self_host;
934 } 951 }