OpenClovis / SAFplus-Availability-Scalability-Platform

Middleware that provides libraries, GUI, and code generator to design multi-node (clustered) applications that are highly available, redundant, and scalable. Provides sub-second node and application fault detection and failover, and useful application libraries including distributed hash tables (checkpoint), event, logging, and communications. Implements SA-Forum APIs where applicable. Used anywhere reliability is a must -- like telecom, wireless, defense and enterprise computing. Download stable release with installer from: ftp.openclovis.com
www.openclovis.com
GNU General Public License v2.0
19 stars 13 forks source link

UDP transport feature: use existing IP address #79

Closed AndrewStoneOpenClovis closed 11 years ago

AndrewStoneOpenClovis commented 11 years ago

A new mode needs to be added to the IOC UDP (& all IP based transports) transport that uses the IP address already assigned to the interface specified by the ASP_UDP_LINK_NAME variable. This mode shall initially connect to the cluster through IP addresses specified in clTransport.xml:

Shown above are 2 addresses, corresponding to the redundant controller nodes. But it is also valid to supply a single virtual IP address. So these addresses should only be used in the initial connection to the cluster, not to populate the IOC to UDP address mapping.

This mode shall be enabled via a new environment variable: ASP_UDP_USE_EXISTING_IP=(YES,TRUE,1, etc -- use the helper function)

It looks like the code is very close to allowing this feature already, since we have an IOC to UDP hash map. However, the algorithm for the initial choice of address located at _clPluginHelperGetIpNodeAddress needs to check the above environment variable and if defined it needs to get the IP address from the interface, and disable automatic assignment of IP address.

AndrewStoneOpenClovis commented 11 years ago

Note, environment variables required for UDP (ASP_UDP_LINK_NAME, and ASP_UDP_USE_EXISTING_IP) need to be written into asp_env.sh so that programs like safplus_console get them automatically. This is true for both "cloud" mode (IPs not autoassigned) are and "network element" (IPs are auto assigned).

hoangle commented 11 years ago

Test case: 1 SC, 2 payloads Only SC's IP address is specified in clTransport.xml, the result should failed as SC not forward discovery msg between payloads. I'm finding the solution for this case.