zrhoffman commented on issue #4935:
URL: https://github.com/apache/trafficcontrol/issues/4935#issuecomment-669542938


   Steps to reproduce: Create 2 servers with the same hostname and go to 
`/api/3.0/servers/{host_name}/update_status`.
   
   Seeing this in the TO logs in CDN-in-a-Box:
   
   ```go
   INFO: routing.go:249: 2020-08-05T21:54:13.543144535Z: GET 
/api/3.0/servers/edge/update_status? handling (reqid 39848)
   DEBUG: plugin.go:190: 2020-08-05T21:54:13.543168115Z: DEBUG 
plugins.OnRequest calling 0 plugins
   ERROR: servers_update_status.go:126: 2020-08-05T21:54:13.546664335Z: could 
not execute query: pq: more than one row returned by a subquery used as an 
expression
   ERROR: api.go:201: 2020-08-05T21:54:13.546794479Z: 172.16.239.11:59424 
database access error
   DEBUG: api.go:206: 2020-08-05T21:54:13.54682155Z: Internal Server Error
   ```
   
   
[traffic_ops/traffic_ops_golang/server/servers_update_status.go#L81](https://github.com/apache/trafficcontrol/blob/732c3f8e1c/traffic_ops/traffic_ops_golang/server/servers_update_status.go#L81),
 the line with the subquery in question:
   
   ```sql
   WHERE s.cachegroup != (SELECT s.cachegroup FROM server s WHERE s.host_name = 
$4)
   ```
   
   So hostnames don't need to be unique?


----------------------------------------------------------------
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:
[email protected]


Reply via email to