-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignoring binding states of backup, expired and free #74
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, :) can we merge it ?
Think it needs the maintainer to click the merge button unfortunately :( |
yeah.. anyway, i was testing and i think we might need more work. it seems that on the second server, there is a missing line in the lease json bracket, which makes the entry have 4 instead of 5 lines Server 1 (where it works) has this lease file: `root@Brno-DHCP-SRV01:/home/gt3# cat /var/lib/dhcp/dhcpd.leases failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { Server 2 (where it does NOT work) has this lease file: `root@Brno-DHCP-SRV02:/home/gt3# cat /var/lib/dhcp/dhcpd.leases failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { failover peer "failover-partner" state { |
if the reason why this isn't working is that you are checking the 5th line and i have 4 in the second server, then instead of checking for the 5th line only, i would be checking in every line (with a for cycle where i check between 0 and the number of lines) |
yes, i was right, on the second server i fix it by checking "lines[4]" instead of "lines[5]" |
Fixes the issue when running isc-dhcp-server witha failover pair, which causes the symptoms highlighted in the following Issue #65.
This change will now ignore any leases in the lease file which are marked as backup, expired or free.
This will mean that Glass ISC DHCP will be able to correct display the data in the table.
Happy to further discuss changes/ammendments if required.
I created this as I too am having the same issue as in Issue #65, so thought I'd go ahead and fix it now I've had some free time.