Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
Description
Floating IPs from private address blocks are not presented as public address of a NodeMetadata after refreshing it. (They are only configured as public addresses when creating a new Node).
- The OpenStack can use private address block for floating IPs.
- When creating new Node, it adds the floating address to NodeMetadata publicAddresses set (IMO correctly) - in AllocateAndAddFloatingIpToNode class.
- when user refreshes the NodeMetadata by calling computeService.getNodeMetadata(id), the floating address is added to private addresses (in ServerInRegionToNodeMetadata class).
Possible solution:
The address returned from Openstack can also have a type:
{ ... "addresses": {"qe-jenkins": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:bf:82:43", "version": 4, "addr": "172.16.130.24", "OS-EXT-IPS:type": "fixed"}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:bf:82:43", "version": 4, "addr": "10.8.54.75", "OS-EXT-IPS:type": "floating"}]} ... }
If the type present, then the ServerInRegionToNodeMetadata should use the type. Otherwise, fallback to the current behavior.