You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/04/06 20:03:46 UTC

[GitHub] [trafficcontrol] jrushford opened a new pull request, #6724: WIP: updates to the trafficcontrol-health-client

jrushford opened a new pull request, #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724

   updates to the trafficcontrol-health-client:
   
   work in progress, do not merge.
   
   - updates the host status commands used by the health-client
     to support both ATS 9 and ATS 10 traffic_ctl commands.
   - updates the parsing of host statuses output to support both
     ATS 9 and ATS 10 output formats.
   
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Control Health Client (tc-health-client)
   
   ## What is the best way to verify this PR?
   
   The health-client has been updated to process ATS version 9 and ATS version 10-Dev traffic_ctl host
   commands.  Verify the health client can verify ATS host statuses and mark up or down caches
   wether the cache is running ATS 9 or 10-Dev.  This functionality has been tested by me.
   
   ## If this is a bugfix, which Traffic Control versions contained the bug?
   
   ## PR submission checklist
   - [x] This PR has tests <!-- If not, please delete this text and explain why this PR does not need tests. -->
   - [x] This PR has documentation <!-- If not, please delete this text and explain why this PR does not need documentation. -->
   - [x] This PR has a CHANGELOG.md entry <!-- A fix for a bug from an ATC release, an improvement, or a new feature should have a changelog entry. -->
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://apache.org/security) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] rob05c commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
rob05c commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r852184862


##########
tc-health-client/tmagent/tmagent.go:
##########
@@ -49,6 +49,14 @@ const (
 	StrategiesFile = "strategies.yaml"
 )
 
+// this global is used to auto select the
+// proper ATS traffic_ctl command to use
+// when querying host status. for ATS
+// version 10 and greater this will remain
+// at 0.  For ATS version 9, this will be
+// auto updated to 1
+var traffic_ctl_index = 0

Review Comment:
   Nitpick: Go symbols should be consistentCased, i.e. `var trafficCtlIndex = 0`.
   https://go.dev/doc/effective_go#mixed-caps
   
   It'd also be ideal to avoid global variables, and pass it locally instead. But for what's effectively a singleton in a small app, not a huge deal



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r847618252


##########
tc-health-client/README.md:
##########
@@ -176,6 +177,12 @@ Sample configuarion file:
   will be marked down when the number of consecutive polls reaches this threshold
   with the parent reported as unhealthy.  The default threshold is 2.
 
+### markup-poll-threshold
+
+  This controls when an healthy parent is marked up.  An healthy parent

Review Comment:
   FWIW that also has some extra spaces at the beginning of the line. It doesn't affect rendering, they just get stripped so they're totally superfluous.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] jrushford commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
jrushford commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r848748077


##########
tc-health-client/README.md:
##########
@@ -176,6 +177,12 @@ Sample configuarion file:
   will be marked down when the number of consecutive polls reaches this threshold
   with the parent reported as unhealthy.  The default threshold is 2.
 
+### markup-poll-threshold
+
+  This controls when an healthy parent is marked up.  An healthy parent

Review Comment:
   @ocket8888 all the non mark lines with leading spaces?  Are you asking that I remove them?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r851512629


##########
tc-health-client/README.md:
##########
@@ -176,6 +177,12 @@ Sample configuarion file:
   will be marked down when the number of consecutive polls reaches this threshold
   with the parent reported as unhealthy.  The default threshold is 2.
 
+### markup-poll-threshold
+
+  This controls when an healthy parent is marked up.  An healthy parent

Review Comment:
   Oh, it would probably be most consistent to remove them everywhere then, but to be clear I'm not asking for anything, it's just something I noticed when I looked at the notification I got for an update on this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] rob05c merged pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
rob05c merged PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] jrushford commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
jrushford commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r848777592


##########
tc-health-client/README.md:
##########
@@ -176,6 +177,12 @@ Sample configuarion file:
   will be marked down when the number of consecutive polls reaches this threshold
   with the parent reported as unhealthy.  The default threshold is 2.
 
+### markup-poll-threshold
+
+  This controls when an healthy parent is marked up.  An healthy parent

Review Comment:
   @ocket8888 I removed the leading spaces.  @jpappa200 I fixed the typo



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] jpappa200 commented on a diff in pull request #6724: updates to the trafficcontrol-health-client

Posted by GitBox <gi...@apache.org>.
jpappa200 commented on code in PR #6724:
URL: https://github.com/apache/trafficcontrol/pull/6724#discussion_r847536944


##########
tc-health-client/README.md:
##########
@@ -176,6 +177,12 @@ Sample configuarion file:
   will be marked down when the number of consecutive polls reaches this threshold
   with the parent reported as unhealthy.  The default threshold is 2.
 
+### markup-poll-threshold
+
+  This controls when an healthy parent is marked up.  An healthy parent

Review Comment:
   Typo "An" 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org