Commit 68888d10 authored by Simon Horman's avatar Simon Horman Committed by David S. Miller

IPVS: Make "no destination available" message more consistent between schedulers

Acked-by: default avatarGraeme Fowler <graeme@graemef.net>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8e95c02
...@@ -507,7 +507,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -507,7 +507,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
/* No cache entry or it is invalid, time to schedule */ /* No cache entry or it is invalid, time to schedule */
dest = __ip_vs_lblc_schedule(svc); dest = __ip_vs_lblc_schedule(svc);
if (!dest) { if (!dest) {
IP_VS_DBG(1, "no destination available\n"); IP_VS_ERR_RL("LBLC: no destination available\n");
return NULL; return NULL;
} }
......
...@@ -690,7 +690,7 @@ ip_vs_lblcr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -690,7 +690,7 @@ ip_vs_lblcr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
/* The cache entry is invalid, time to schedule */ /* The cache entry is invalid, time to schedule */
dest = __ip_vs_lblcr_schedule(svc); dest = __ip_vs_lblcr_schedule(svc);
if (!dest) { if (!dest) {
IP_VS_DBG(1, "no destination available\n"); IP_VS_ERR_RL("LBLCR: no destination available\n");
read_unlock(&svc->sched_lock); read_unlock(&svc->sched_lock);
return NULL; return NULL;
} }
......
...@@ -66,9 +66,13 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -66,9 +66,13 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
} }
} }
if (least) if (!least)
IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d inactconns %d\n", IP_VS_ERR_RL("LC: no destination available\n");
IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port), else
IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d "
"inactconns %d\n",
IP_VS_DBG_ADDR(svc->af, &least->addr),
ntohs(least->port),
atomic_read(&least->activeconns), atomic_read(&least->activeconns),
atomic_read(&least->inactconns)); atomic_read(&least->inactconns));
......
...@@ -95,8 +95,10 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -95,8 +95,10 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
} }
} }
if (!least) if (!least) {
IP_VS_ERR_RL("NQ: no destination available\n");
return NULL; return NULL;
}
out: out:
IP_VS_DBG_BUF(6, "NQ: server %s:%u " IP_VS_DBG_BUF(6, "NQ: server %s:%u "
......
...@@ -69,6 +69,7 @@ ip_vs_rr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -69,6 +69,7 @@ ip_vs_rr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
q = q->next; q = q->next;
} while (q != p); } while (q != p);
write_unlock(&svc->sched_lock); write_unlock(&svc->sched_lock);
IP_VS_ERR_RL("RR: no destination available\n");
return NULL; return NULL;
out: out:
......
...@@ -84,6 +84,7 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -84,6 +84,7 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
goto nextstage; goto nextstage;
} }
} }
IP_VS_ERR_RL("SED: no destination available\n");
return NULL; return NULL;
/* /*
......
...@@ -219,6 +219,7 @@ ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -219,6 +219,7 @@ ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
|| !(dest->flags & IP_VS_DEST_F_AVAILABLE) || !(dest->flags & IP_VS_DEST_F_AVAILABLE)
|| atomic_read(&dest->weight) <= 0 || atomic_read(&dest->weight) <= 0
|| is_overloaded(dest)) { || is_overloaded(dest)) {
IP_VS_ERR_RL("SH: no destination available\n");
return NULL; return NULL;
} }
......
...@@ -72,6 +72,7 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -72,6 +72,7 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
goto nextstage; goto nextstage;
} }
} }
IP_VS_ERR_RL("WLC: no destination available\n");
return NULL; return NULL;
/* /*
......
...@@ -155,6 +155,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -155,6 +155,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
if (mark->cl == mark->cl->next) { if (mark->cl == mark->cl->next) {
/* no dest entry */ /* no dest entry */
IP_VS_ERR_RL("WRR: no destination available: "
"no destinations present\n");
dest = NULL; dest = NULL;
goto out; goto out;
} }
...@@ -168,8 +170,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -168,8 +170,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
*/ */
if (mark->cw == 0) { if (mark->cw == 0) {
mark->cl = &svc->destinations; mark->cl = &svc->destinations;
IP_VS_ERR_RL("ip_vs_wrr_schedule(): " IP_VS_ERR_RL("WRR: no destination "
"no available servers\n"); "available\n");
dest = NULL; dest = NULL;
goto out; goto out;
} }
...@@ -191,6 +193,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb) ...@@ -191,6 +193,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
/* back to the start, and no dest is found. /* back to the start, and no dest is found.
It is only possible when all dests are OVERLOADED */ It is only possible when all dests are OVERLOADED */
dest = NULL; dest = NULL;
IP_VS_ERR_RL("WRR: no destination available: "
"all destinations are overloaded\n");
goto out; goto out;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment