serrislew commented on a change in pull request #8484: URL: https://github.com/apache/trafficserver/pull/8484#discussion_r769103122
########## File path: tests/gold_tests/proxy_protocol/proxy_serve_stale_dns_fail.test.py ########## @@ -0,0 +1,79 @@ +''' +Test proxy serving stale content when DNS lookup fails +''' +# 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. + +Test.ContinueOnFail = True +# Set up hierarchical caching processes +ts_child = Test.MakeATSProcess("ts_child") +ts_parent = Test.MakeATSProcess("ts_parent") +server_name = "http://unknown.domain.com/" + +Test.testName = "STALE" + +# Config child proxy to route to parent proxy +ts_child.Disk.records_config.update({ + 'proxy.config.url_remap.pristine_host_hdr': 1, + 'proxy.config.http.cache.max_stale_age': 10, + 'proxy.config.http.parent_proxy.self_detect': 0, +}) +ts_child.Disk.parent_config.AddLine( + f'dest_domain=. parent=localhost:{ts_parent.Variables.port} round_robin=consistent_hash go_direct=false' Review comment: The http debug trace output shows the child doing PPDNS lookup to the parent and the parent doing a DNS lookup to unknown.domain.com (OS). After the DNS lookup fails for the parent and the parent sends a 500 response to the child, the child will first check if the stale object is returnable before sending it back to the client. Let me know if you are seeing something different in the debug trace output! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
