When resolvers fail to create a resolution, the server name is printed,
but for templates, the server is not yet assigned so "server '(null)'"
is printed, which is ugly and not really helpful. Let's just fall back
to the template name and indicate it.
This can be backported to all versions.
hostname_dn_len = resolv_str_to_dn_label(fqdn, fqdn_len, trash.area,
trash.size);
if (hostname_dn_len == -1) {
- ha_alert("%s '%s', server '%s': failed to parse FQDN '%s'\n",
- proxy_type_str(px), px->id, srv->id, fqdn);
+ ha_alert("%s '%s', server %s'%s': failed to parse FQDN '%s'.\n",
+ proxy_type_str(px), px->id, srv->id ? "" : "template ",
+ srv->id ? srv->id : srv->tmpl_info.prefix, fqdn);
goto err;
}