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 2019/07/03 08:59:51 UTC

[GitHub] [trafficcontrol] SaravanakumarSivasankaran commented on a change in pull request #3689: Fix TO update_status to exclude ADMIN_DOWN

SaravanakumarSivasankaran commented on a change in pull request #3689: Fix TO update_status to exclude ADMIN_DOWN
URL: https://github.com/apache/trafficcontrol/pull/3689#discussion_r299848926
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/server/servers_update_status.go
 ##########
 @@ -49,7 +49,7 @@ func getServerUpdateStatus(tx *sql.Tx, cfg *config.Config, hostName string) ([]t
 	baseSelectStatement :=
 		`WITH parentservers AS (SELECT ps.id, ps.cachegroup, ps.cdn_id, ps.upd_pending, ps.reval_pending FROM server ps
          LEFT JOIN status AS pstatus ON pstatus.id = ps.status
-         WHERE pstatus.name != 'OFFLINE' ),
+         WHERE (pstatus.name = '` + string(tc.CacheStatusOnline) + `' OR pstatus.name = '` + string(tc.CacheStatusReported) + `') ),
 
 Review comment:
   > Adding my thoughts, belive it may help some way.
   > 
   > I assume, the ADMIN_DOWN for the cache server will be set by the admin person through trafficops UI( ie., OFFLINE the server)
   > Consider the below setup and scenario:
   > 
   > SETUP:
   >     mid_cache_group1:  mid1 and mid2
   >     edge_cache_group1: edge1 (Its parent is mid_cache_group1)
   > 
   > SCENARIO:
   > If operator ADMIN_DOWN mid1 for some reason(say mid1 is dead).  
   > Then upd_pending should set to true for mid1,mid2 and edge1. Hope this will done by the operator through trafficops Queue update.
   > But immediate ORT run on edge1 should wait only for mid2 (for to complete upd_pending) NOT for mid1 (since mid1 is ADMIN_DOWN).
   > Though mid1 is ADMIN_DOWN, on its cron schedule ORT job, it will update its required configuration since upd_pending is set to True.
   > 
   > SUGGESTION:
   > Like OFFLINE in that query, can we handle something like <<<...WHERE pstatus.name != 'OFFLINE' AND pstatus.name != 'ADMIN_DOWN')..>>
   > 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services