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 2023/01/18 02:15:07 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7294: Fix Internal Server Error when GETting sslkeys_expirations endpoint

ocket8888 commented on code in PR #7294:
URL: https://github.com/apache/trafficcontrol/pull/7294#discussion_r1073024491


##########
traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go:
##########
@@ -180,7 +180,7 @@ func (p *Postgres) GetExpirationInformation(tx *sql.Tx, ctx context.Context, day
 		fedMap[fedString] = true
 	}
 
-	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE NOT active"
+	inactiveQuery := "SELECT xml_id FROM deliveryservice WHERE active = 'INACTIVE'"

Review Comment:
   What's the intention here? Is this meant to be getting all Delivery Services that aren't being served? Or do we specifically want all of the Delivery Services which both aren't being served **and** don't have deployed configurations. I could see reasons for each; the former because any DS that's not being routed is draining so we don't anticipate the key expiry is actually an issue, the latter because those certs are still in use by clients.
   
   If we want all DS's that aren't routed, then this should be `active = 'INACTIVE' OR active = 'PRIMED';`. If we want DSs that both aren't routed and don't have configuration deployed to cache servers, then technically we're changing behavior since that wasn't possible previously. Which, idk maybe should just go in the Changelog.



-- 
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