Track additional service/virtual IPs assigned to a host
|Assigned to:||-||% Done:||
It would be wonderful if foreman could associate other public IPs (or maybe all IPs?) on a system outside of the 'main' IP (that the hostname is based off of). This way when you use smart-proxy with a DHCP server it would not return IPs that are already assigned to another system. Also, when a host is destroyed that has extra IPs then all IPs would be released back into the pool.
This came up for me as I was trying to configure smart-proxy with DHCP. I like how it returns an IP that should be free. But the checks currently seem only to be:
1) System registered in foreman?
2) IP pingable?
This would miss a scenario of a system registered in foreman but that is utilizing additional IPs in that subnet. If the system was down for maintenance then check 1 above would prevent the 'main' IP from being used, but the additional IPs could potentially come up as free as they are not registered in foreman and since the system is down for maintenance would not be pingable.
Additional IPs could be gathered from facts:
hostname:~ # facter -p | grep ipaddress_
ipaddress_eth0 => 56.###.###.###
ipaddress_eth1 => 192.168.108.10
ipaddress_eth1_0 => 192.168.100.77
ipaddress_eth1_1 => 192.168.106.147
ipaddress_eth1_2 => 192.168.106.146
ipaddress_eth2 => 192.168.128.10
ipaddress_lo => 127.0.0.1
(Above 'extra ips' are obviously private addresses, this is just an example to show values are already being collected).
Updated by Ohad Levy over 1 year ago
currently the proxy doesnt know about foreman, rather checks if there is a dhcp reservation.
would it be acceptable if we create dhcp reservations for all ips ?
Updated by Jacob McCann over 1 year ago
We discussed this a bit in IRC. I think the above would be acceptable. Just to note some items you listed off to support this:
1. solve the issue with exclude ranges, currently the proxy ignores excluded dhcp range
2. decide if an ip should have an dhcp reservation or not
3. if the nic is not using dhcp, it should be passed as an excluded range
Item 1 references issue #884