Project

General

Profile

Actions

Feature #1206

closed

Track additional service/virtual IPs assigned to a host

Added by Jacob McCann over 12 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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).

Actions

Also available in: Atom PDF