facebookincubator / dhcplb

dhcplb is Facebook's implementation of a load balancer for DHCP.
MIT License
1.05k stars 90 forks source link

dhcpv6 server list filesourcer error #32

Closed abckey closed 4 years ago

abckey commented 4 years ago

I try to run a dhcplb in ipv6 mode, but got error during dhcplbv6 start:

Mar 30 18:20:02 dhcplb1 systemd[1]: Started dhcplb6.
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: I0330 18:20:02.130078    6670 config.go:114] Loaded 0 override(s)
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: E0330 18:20:02.130933    6670 filesourcer.go:97] Can't convert port 20aa to int
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: E0330 18:20:02.131083    6670 filesourcer.go:97] Can't convert port 25aa to int
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: E0330 18:20:02.131232    6670 filesourcer.go:97] Can't convert port 25aa to int
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: I0330 18:20:02.131489    6670 server.go:94] Setting up throttle: Cache Size: 1024 - Cache Rate: 128 - Request Rate: 256
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: I0330 18:20:02.132771    6670 main.go:84] Starting dhcplb in v6 mode
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: I0330 18:20:02.132925    6670 update_servers.go:17] Starting to update server list...
Mar 30 18:20:02 dhcplb1 dhcplb[6670]: I0330 18:20:02.133058    6670 server.go:43] Started server, processing DHCP requests...
Mar 30 18:20:15 dhcplb1 dhcplb[6670]: I0330 18:20:15.680422    6670 filesourcer.go:134] Event: "/home/vagrant/dhcp-servers-v6.cfg": WRITE File changed, reloading host list
Mar 30 18:20:15 dhcplb1 dhcplb[6670]: E0330 18:20:15.680503    6670 filesourcer.go:97] Can't convert port 25aa to int
Mar 30 18:20:15 dhcplb1 dhcplb[6670]: E0330 18:20:15.680520    6670 filesourcer.go:97] Can't convert port 25aa to int
Mar 30 18:20:15 dhcplb1 dhcplb[6670]: E0330 18:20:15.680535    6670 filesourcer.go:97] Can't convert port 25aa to int

Process is running as:

/opt/go/bin/dhcplb -version 6 -config /home/vagrant/dhcplb.config.json

dhcpv6 server list file:

root@dhcplb1:/home/vagrant# cat /home/vagrant/dhcp-servers-v6.cfg
fdfa:25aa:efc8:1002::114
fdfa:25aa:efc8:1002::115
fdfa:25aa:efc8:1002::116
pmazzini commented 4 years ago

It definitely seems that something is wrong here, thanks for raising it.

Apparently the file sourcer only likes hostnames and not IPv6 addresses.

pmazzini commented 4 years ago

It should be fixed. Let me know if it works fine. Feel free to reopen.

abckey commented 4 years ago

Yes, it works now. THX!!