Unclear: Precedences when setting the server beacon address list

Bug #541150 reported by Ralph Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Medium
Ralph Lange

Bug Description

The precedence of different environment variables when building the CA server beacon address list is unclear (at least to me). The doc describes a scheme which I believe is not desireable. I'm not 100% sure what the code really does - it looks like an even different way to me. Please check and straighten things out.

Additional information:
The CA Reference Manual describes:
 - If EPICS_CAS_BEACON_ADDR_LIST is defined, it is used.
 - If EPICS_CA_ADDR_LIST is defined and EPICS_CAS_INTF_ADDR_LIST is not defined, EPICS_CA_ADDR_LIST is used.
 - Else the list is not augmented.

But for applications that are servers as well as clients (e.g the Gateway), the usual case would be both EPICS_CAS_INTF_ADDR_LIST and EPICS_CA_ADDR_LIST being defined, which would - according to the doc - lead to an empty beacon address list.

Shouldn't the algorithm be:
 - If EPICS_CAS_BEACON_ADDR_LIST is defined, it is used.
 - If EPICS_CAS_INTF_ADDR_LIST is defined, it is used.
 - If EPICS_CA_ADDR_LIST is defined, it is used.
 - Else the list is not augmented.

OS: any

Platform: any

Version: R3.14.5

Original Mantis Bug: mantis-73
    http://www.aps.anl.gov/epics/mantis/view_bug_page.php?f_id=73

Tags: cas 3.14 3.14.5
Revision history for this message
Jeff Hill (johill-lanl) wrote :

Currently, the doc reads as follows:

CA servers build a list of addresses to send beacons to during initialization. If EPICS_CAS_AUTO_BEACON_ADDR_LIST has the value "YES" then the beacon address list will contain at least the broadcast address of all LAN interfaces found in the host and the destination address of all point-to-point interfaces found in the host.

If EPICS_CAS_BEACON_ADDR_LIST is defined then its contents will be used to augment this list. Individual entries in EPICS_CAS_BEACON_ADDR_LIST may override the destination port number if ":nnn" follows the host name or IP address there. Alternatively, if EPICS_CAS_BEACON_ADDR_LIST is not defined, EPICS_CA_ADDR_LIST is defined, and EPICS_CAS_INTF_ADDR_LIST is not defined, then the contents of EPICS_CA_ADDR_LIST will be used to augment the list. Otherwise, the list is not augmented.

Revision history for this message
Jeff Hill (johill-lanl) wrote :

Here is my revised version of the documentation. I have commited these
changes and will assign the bug to Ralph so that he can approve my changes.

----------snip-snip-----------
CA servers build a list of addresses to send beacons to during initialization. If EPICS_CAS_AUTO_BEACON_ADDR_LIST has the value "YES" then the beacon address list will be automatically configured to contain the broadcast addresses of all LAN interfaces found in the host and the destination address of all point-to-point interfaces found in the host. However, if the user also defines EPICS_CAS_INTF_ADDR_LIST then beacon address list automatic configuration is constrained to the network interfaces specified therein, and therefore only the broadcast addresses of the specified LAN interfaces, and the destination addresses of all specified point-to-point links, will be automatically configured.

If EPICS_CAS_BEACON_ADDR_LIST is defined then its contents will be used to augment any automatic configuration of the beacon address list. Individual entries in EPICS_CAS_BEACON_ADDR_LIST may override the destination port number if ":nnn" follows the host name or IP address there. Alternatively, when both EPICS_CAS_BEACON_ADDR_LIST and EPICS_CAS_INTF_ADDR_LIST are not defined then the contents of EPICS_CA_ADDR_LIST is used to augment the list. Otherwise, the list is not augmented.
-----------snip-snip---------------

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Yup. Given that the code is actually doing what is being described ... ;-)
Sounds good.

Revision history for this message
Andrew Johnson (anj) wrote :

R3.14.6 Released.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.