You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2021/02/26 22:06:44 UTC
[trafficcontrol] branch 5.1.x updated: Select server topology
ancestors from the same CDN as the base server (#5578)
This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch 5.1.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/5.1.x by this push:
new d735833 Select server topology ancestors from the same CDN as the base server (#5578)
d735833 is described below
commit d735833f70545cdbd3ab5d79b069b6afed5df030
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Fri Feb 26 10:40:16 2021 -0700
Select server topology ancestors from the same CDN as the base server (#5578)
(cherry picked from commit eed246c7854f6f9aefab4b65ce6c35846460e8c9)
---
CHANGELOG.md | 1 +
traffic_ops/traffic_ops_golang/server/servers_update_status.go | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a2dc9d9..cc38fd1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed an issue with 2020082700000000_server_id_primary_key.sql trying to create multiple primary keys when there are multiple schemas.
- Fix for public schema in 2020062923101648_add_deleted_tables.sql
- Moved move_lets_encrypt_to_acme.sql, add_max_request_header_size_delivery_service.sql, and server_interface_ip_address_cascade.sql past last migration in 5.0.0
+- [#5505](https://github.com/apache/trafficcontrol/issues/5505) - Make `parent_reval_pending` for servers in a Flexible Topology CDN-specific on `GET /servers/{name}/update_status`
### Changed
- Refactored the Traffic Ops Go client internals so that all public methods have a consistent behavior/implementation
diff --git a/traffic_ops/traffic_ops_golang/server/servers_update_status.go b/traffic_ops/traffic_ops_golang/server/servers_update_status.go
index d1d2a67..78bdd7f 100644
--- a/traffic_ops/traffic_ops_golang/server/servers_update_status.go
+++ b/traffic_ops/traffic_ops_golang/server/servers_update_status.go
@@ -108,12 +108,16 @@ SELECT
status.name AS status,
/* True if the cachegroup parent or any ancestor topology node has pending updates. */
TRUE IN (
- SELECT sta.upd_pending FROM server_topology_ancestors sta WHERE sta.base_server_id = s.id
+ SELECT sta.upd_pending FROM server_topology_ancestors sta
+ WHERE sta.base_server_id = s.id
+ AND sta.cdn_id = s.cdn_id
UNION SELECT COALESCE(BOOL_OR(ps.upd_pending), FALSE)
) AS parent_upd_pending,
/* True if the cachegroup parent or any ancestor topology node has pending revalidation. */
TRUE IN (
- SELECT sta.reval_pending FROM server_topology_ancestors sta WHERE sta.base_server_id = s.id
+ SELECT sta.reval_pending FROM server_topology_ancestors sta
+ WHERE sta.base_server_id = s.id
+ AND sta.cdn_id = s.cdn_id
UNION SELECT COALESCE(BOOL_OR(ps.reval_pending), FALSE)
) AS parent_reval_pending
FROM use_reval_pending,