Lease stats puller sends too many commands
The Keacommand instances created in func (statsPuller *StatsPuller) getLeaseStatsFromApp() are sent to all the dhcp Daemons instead of only to the dhcp4 or dhcp6 daemon:
// issue 2 commands to dhcp daemons at once to get their lease stats for v4 and v6
cmds := []*agentcomm.KeaCommand{}
if dhcpDaemons["dhcp4"] {
cmds = append(cmds, &agentcomm.KeaCommand{
Command: "stat-lease4-get",
Daemons: &dhcpDaemons, <--- should not be the whole list
})
}
if dhcpDaemons["dhcp6"] {
cmds = append(cmds, &agentcomm.KeaCommand{
Command: "stat-lease6-get",
Daemons: &dhcpDaemons, <--- should not be the whole list
})
}