You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2017/03/28 16:21:10 UTC

[1/3] incubator-trafficcontrol git commit: Fix TM2 log to log before setting variable logged

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 1f65eca3a -> 5e61e9dc2


Fix TM2 log to log before setting variable logged


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8abde95e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8abde95e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8abde95e

Branch: refs/heads/master
Commit: 8abde95e08b8508cbaafe301a9cbd751c7cb20aa
Parents: 7404cc6
Author: Robert Butts <ro...@gmail.com>
Authored: Tue Mar 7 14:59:20 2017 -0700
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Tue Mar 28 10:20:43 2017 -0600

----------------------------------------------------------------------
 traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8abde95e/traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go
----------------------------------------------------------------------
diff --git a/traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go b/traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go
index 87ea57f..5e96301 100644
--- a/traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go
+++ b/traffic_monitor_golang/traffic_monitor/deliveryservice/stat.go
@@ -129,7 +129,7 @@ func addAvailableData(dsStats dsdata.Stats, crStates peer.Crstates, serverCacheg
 	for dsName, ds := range crStates.Deliveryservice {
 		stat, ok := dsStats.DeliveryService[dsName]
 		if !ok {
-			log.Warnf("CreateStats not adding disabledLocations for '%s': not found in Stats\n", dsName)
+			log.Infof("CreateStats not adding disabledLocations for '%s': not found in Stats\n", dsName)
 			continue // TODO log warning? Error?
 		}
 
@@ -162,9 +162,9 @@ func addLastStat(lastData dsdata.LastStatData, newStat int64, newStatTime time.T
 
 	if newStat < lastData.Stat {
 		// if a new stat comes in lower than current, assume rollover, set the 'last stat' to the new one, but leave PerSec what it was (not negative).
+		err := fmt.Errorf("new stat '%d'@'%v' value less than last stat '%d'@'%v'", newStat, newStatTime, lastData.Stat, lastData.Time)
 		lastData.Stat = newStat
 		lastData.Time = newStatTime
-		err := fmt.Errorf("new stat '%d'@'%v' value less than last stat '%d'@'%v'", newStat, newStatTime, lastData.Stat, lastData.Time)
 		return lastData, err
 	}
 


[3/3] incubator-trafficcontrol git commit: This closes #339.

Posted by el...@apache.org.
This closes #339.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5e61e9dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5e61e9dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5e61e9dc

Branch: refs/heads/master
Commit: 5e61e9dc25dbf2f5287c843292b734cefce5c6fe
Parents: 8abde95
Author: Jeff Elsloo <je...@cable.comcast.com>
Authored: Tue Mar 28 10:21:03 2017 -0600
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Tue Mar 28 10:21:03 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/3] incubator-trafficcontrol git commit: Change TM2 ds-not-in-peer log from warn to info

Posted by el...@apache.org.
Change TM2 ds-not-in-peer log from warn to info


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7404cc69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7404cc69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7404cc69

Branch: refs/heads/master
Commit: 7404cc69f0f49e5438dc46fe19d2befe01b8f6e0
Parents: 1f65eca
Author: Robert Butts <ro...@gmail.com>
Authored: Tue Mar 7 14:52:39 2017 -0700
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Tue Mar 28 10:20:43 2017 -0600

----------------------------------------------------------------------
 .../traffic_monitor/manager/statecombiner.go          | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7404cc69/traffic_monitor_golang/traffic_monitor/manager/statecombiner.go
----------------------------------------------------------------------
diff --git a/traffic_monitor_golang/traffic_monitor/manager/statecombiner.go b/traffic_monitor_golang/traffic_monitor/manager/statecombiner.go
index 97f21e7..bb664fc 100644
--- a/traffic_monitor_golang/traffic_monitor/manager/statecombiner.go
+++ b/traffic_monitor_golang/traffic_monitor/manager/statecombiner.go
@@ -117,7 +117,17 @@ func combineCacheState(cacheName enum.CacheName, localCacheState peer.IsAvailabl
 	combinedStates.AddCache(cacheName, peer.IsAvailable{IsAvailable: available})
 }
 
-func combineDSState(deliveryServiceName enum.DeliveryServiceName, localDeliveryService peer.Deliveryservice, events health.ThreadsafeEvents, peerOptimistic bool, peerStates peer.CRStatesPeersThreadsafe, localStates peer.Crstates, combinedStates peer.CRStatesThreadsafe, overrideMap map[enum.CacheName]bool, toData todata.TOData) {
+func combineDSState(
+	deliveryServiceName enum.DeliveryServiceName,
+	localDeliveryService peer.Deliveryservice,
+	events health.ThreadsafeEvents,
+	peerOptimistic bool,
+	peerStates peer.CRStatesPeersThreadsafe,
+	localStates peer.Crstates,
+	combinedStates peer.CRStatesThreadsafe,
+	overrideMap map[enum.CacheName]bool,
+	toData todata.TOData,
+) {
 	deliveryService := peer.Deliveryservice{IsAvailable: false, DisabledLocations: []enum.CacheGroupName{}} // important to initialize DisabledLocations, so JSON is `[]` not `null`
 	if localDeliveryService.IsAvailable {
 		deliveryService.IsAvailable = true
@@ -127,7 +137,7 @@ func combineDSState(deliveryServiceName enum.DeliveryServiceName, localDeliveryS
 	for peerName, iPeerStates := range peerStates.GetCrstates() {
 		peerDeliveryService, ok := iPeerStates.Deliveryservice[deliveryServiceName]
 		if !ok {
-			log.Warnf("local delivery service %s not found in peer %s\n", deliveryServiceName, peerName)
+			log.Infof("local delivery service %s not found in peer %s\n", deliveryServiceName, peerName)
 			continue
 		}
 		if peerDeliveryService.IsAvailable {