You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2023/04/07 15:02:18 UTC

[trafficcontrol] branch master updated: renaming tm.sameipservers.control to tm.sameipservers.enabled (#7431)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new b616c06264 renaming tm.sameipservers.control to tm.sameipservers.enabled (#7431)
b616c06264 is described below

commit b616c062649119649dc02687bc93a6865ba2c23f
Author: serDrem <se...@gmail.com>
AuthorDate: Fri Apr 7 09:02:10 2023 -0600

    renaming tm.sameipservers.control to tm.sameipservers.enabled (#7431)
---
 docs/source/admin/traffic_monitor.rst | 2 +-
 traffic_monitor/datareq/crstate.go    | 2 +-
 traffic_monitor/todata/todata.go      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/source/admin/traffic_monitor.rst b/docs/source/admin/traffic_monitor.rst
index 33ca244a45..fdb7a851cb 100644
--- a/docs/source/admin/traffic_monitor.rst
+++ b/docs/source/admin/traffic_monitor.rst
@@ -79,7 +79,7 @@ traffic_monitor.cfg
 - ``health.polling.interval``
 - ``peers.polling.interval``
 - ``heartbeat.polling.interval``
-- ``tm.sameipservers.control`` - When set to true, performs an AND operation on the availability statuses of servers with same ip. Any unavailable server(s) with same ip as other server(s) will cause the other server(s) to be set to unavailable.
+- ``tm.sameipservers.enabled`` - When set to true, performs an AND operation on the availability statuses of servers with same ip. Any unavailable server(s) with same ip as other server(s) will cause the other server(s) to be set to unavailable.
 
 Upon receiving this configuration, Traffic Monitor begins polling :term:`cache server` s. Once every :term:`cache server` has been polled, :ref:`health-proto` state is available via RESTful JSON endpoints and a web browser UI.
 
diff --git a/traffic_monitor/datareq/crstate.go b/traffic_monitor/datareq/crstate.go
index 61122a4a93..3c119af696 100644
--- a/traffic_monitor/datareq/crstate.go
+++ b/traffic_monitor/datareq/crstate.go
@@ -83,7 +83,7 @@ func filterDirectlyPolledCaches(crstates tc.CRStates) tc.CRStates {
 }
 
 func srvTRStateData(localStates peer.CRStatesThreadsafe, directlyPolledOnly bool, toData todata.TODataThreadsafe, monitorConfig threadsafe.TrafficMonitorConfigMap) ([]byte, error) {
-	if val, ok := monitorConfig.Get().Config["tm.sameipservers.control"]; ok && val.(string) == "true" {
+	if val, ok := monitorConfig.Get().Config["tm.sameipservers.enabled"]; ok && val.(string) == "true" {
 		localStatesC := updateStatusSameIpServers(localStates, toData)
 		if !directlyPolledOnly {
 			return tc.CRStatesMarshall(localStatesC)
diff --git a/traffic_monitor/todata/todata.go b/traffic_monitor/todata/todata.go
index dce3aaf14c..f0b6cfd678 100644
--- a/traffic_monitor/todata/todata.go
+++ b/traffic_monitor/todata/todata.go
@@ -187,7 +187,7 @@ func (d TODataThreadsafe) Update(to towrap.TrafficOpsSessionThreadsafe, cdn stri
 		return fmt.Errorf("getting server types from monitoring config: %v", err)
 	}
 
-	if val, ok := mc.Config["tm.sameipservers.control"]; ok && val.(string) == "true" {
+	if val, ok := mc.Config["tm.sameipservers.enabled"]; ok && val.(string) == "true" {
 		newTOData.SameIpServers = getSameIPServers(mc)
 	} else {
 		newTOData.SameIpServers = make(map[tc.CacheName]map[tc.CacheName]bool)