Skip to content

Commit fb600bb

Browse files
committed
Fix backend port when DNS_ENABLED - refs #24
1 parent c38dc9b commit fb600bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

haproxy/src/configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127
else:
128128
for record in records.splitlines():
129129
ip = record.split()[0].decode()
130-
ips[ip] = host
130+
ips[ip] = (host, port)
131131

132132
with open('/etc/haproxy/dns.backends', 'w') as bfile:
133133
bfile.write(' '.join(sorted(ips)))
134134

135-
for ip, host in ips.items():
135+
for ip, (host, port) in ips.items():
136136
backend_conf += backend_conf_plus.substitute(
137137
name=host.replace(".", "-"),
138138
index=ip.replace(".", "-"),

0 commit comments

Comments
 (0)