Skip to content

retry fails if api_server_addr_set is true #12611

@Coder-Xu777

Description

@Coder-Xu777

In trafficserver 9.2.x, I have some doubts about the logic of the following code snippet.
https://github.com/apache/trafficserver/blob/9.2.x/proxy/http/HttpTransact.cc :3864

      if (s->api_server_addr_set) {
        // If the plugin set a server address, back up to the OS_DNS hook
        // to let it try another one. Force OS_ADDR_USE_CLIENT so that
        // in OSDNSLoopkup, we back up to how_to_open_connections which
        // will tell HttpSM to connect the origin server.

        s->dns_info.os_addr_style = DNSLookupInfo::OS_Addr::OS_ADDR_USE_CLIENT;
        TRANSACT_RETURN(SM_ACTION_API_OS_DNS, OSDNSLookup);
      }

The comments said we can try another one in OS_DNS hook, but there is no way to change the value of dns_info.lookup_success unless we add new api and it seems that none dns lookup operation could be performed during this process. Consequently, when OSDNSLookup is invoked, dns_info.lookup_success just keep false causing a failure ultimately.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions