[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25804=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25804
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 15:34
Start Date: 21/Jul/16 15:34
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj closed the pull request at:

https://github.com/apache/trafficserver/pull/820


Issue Time Tracking
---

Worklog Id: (was: 25804)
Time Spent: 3h 10m  (was: 3h)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25803=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25803
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 15:33
Start Date: 21/Jul/16 15:33
Worklog Time Spent: 10m 
  Work Description: GitHub user jacksontj opened a pull request:

https://github.com/apache/trafficserver/pull/820

TS-4622

Cleanup of #773

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jacksontj/trafficserver TS-4622

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/820.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #820


commit 13a70c1b48c95d3306dafa90194459ba6c8bd5ed
Author: Thomas Jackson 
Date:   2016-07-21T15:31:29Z

Revert "TS-4622 Use port from SRV response when connecting to origin (#773)"

This reverts commit d91457b8cf27beff88d32fb33a37423fb656b01a.

Github UI squashed the tests and the code change-- we want them separate

commit 1eebb832faade9ae876b7834b3e9842bb8178c4f
Author: Thomas Jackson 
Date:   2016-06-30T17:46:26Z

TS-4622 use port from SRV response for origin connections

This closes #773

commit 7ffa6cbc9a64ecfe6c73875aa9669bb3e6bcb26e
Author: Thomas Jackson 
Date:   2016-07-21T15:21:25Z

Add some initial SRV tsqa tests




Issue Time Tracking
---

Worklog Id: (was: 25803)
Time Spent: 3h  (was: 2h 50m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25802=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25802
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 15:27
Start Date: 21/Jul/16 15:27
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/362/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25802)
Time Spent: 2h 50m  (was: 2h 40m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25801=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25801
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 15:27
Start Date: 21/Jul/16 15:27
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj closed the pull request at:

https://github.com/apache/trafficserver/pull/773


Issue Time Tracking
---

Worklog Id: (was: 25801)
Time Spent: 2h 40m  (was: 2.5h)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25799=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25799
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 14:54
Start Date: 21/Jul/16 14:54
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/361/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25799)
Time Spent: 2.5h  (was: 2h 20m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25798=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25798
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 14:48
Start Date: 21/Jul/16 14:48
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/466/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25798)
Time Spent: 2h 20m  (was: 2h 10m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25790=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25790
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 02:15
Start Date: 21/Jul/16 02:15
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/465/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25790)
Time Spent: 2h 10m  (was: 2h)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25789=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25789
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 02:13
Start Date: 21/Jul/16 02:13
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/360/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25789)
Time Spent: 2h  (was: 1h 50m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25788=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25788
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 02:08
Start Date: 21/Jul/16 02:08
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/464/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25788)
Time Spent: 1h 50m  (was: 1h 40m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25786=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25786
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 21/Jul/16 01:55
Start Date: 21/Jul/16 01:55
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
 This looks good to me and I think it will be safe w/ 
"TsHttpTxnServerAddrSet()".


Issue Time Tracking
---

Worklog Id: (was: 25786)
Time Spent: 1h 40m  (was: 1.5h)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25757=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25757
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 20/Jul/16 14:58
Start Date: 20/Jul/16 14:58
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
@jpeach 

I did some testing of my own and I can't reproduce any problems with 
`TsHttpTxnServerAddrSet()` at all. TSHttpTxnServerAddrSet() is supposed to be 
called before the DNS lookup. If called then the core bypasses the entire 
OS_DNS stuff which includes this port setting block in HttpTransact.

I tested calling the API on both the `TS_EVENT_HTTP_READ_REQUEST_HDR` and 
`TS_EVENT_HTTP_OS_DNS` hooks-- with no problem at all.

You mentioned in a previous comment that it was broken in your testing, can 
you share the code you were using to see it broken?


Issue Time Tracking
---

Worklog Id: (was: 25757)
Time Spent: 1.5h  (was: 1h 20m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25756=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25756
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 20/Jul/16 14:54
Start Date: 20/Jul/16 14:54
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/354/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25756)
Time Spent: 1h 20m  (was: 1h 10m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25755=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25755
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 20/Jul/16 14:48
Start Date: 20/Jul/16 14:48
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/458/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25755)
Time Spent: 1h 10m  (was: 1h)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25754=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25754
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 20/Jul/16 14:32
Start Date: 20/Jul/16 14:32
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/773#discussion_r71536060
  
--- Diff: proxy/http/HttpTransact.cc ---
@@ -1783,7 +1783,13 @@ HttpTransact::OSDNSLookup(State *s)
   // update some state variables with hostdb information that has
   // been provided.
   ats_ip_copy(>server_info.dst_addr, s->host_db_info.ip());
-  s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
+  // TODO ideally only if ports aren't defined in remap
+  // If the SRV response has a port number, we should honor it. Otherwise 
we do the port defined in remap
+  if (s->dns_info.srv_port) {
+s->server_info.dst_addr.port() = htons(s->dns_info.srv_port);
+  } else {
+s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
+  }
--- End diff --

I'll change the conditional-- that definitely makes sense.

From looking at the API callout code-- it does seem like its already broken 
:/

It seems that `TSHttpTxnServerAddrSet()` is called before the DNS lookup-- 
and if so it bypasses the [dns lookup| 
https://github.com/apache/trafficserver/blob/master/proxy/http/HttpSM.cc#L7179].
 So, I would think in this section of HttpTransact we would want to skip all 
port setting if `api_server_addr_set` is true.


Issue Time Tracking
---

Worklog Id: (was: 25754)
Time Spent: 1h  (was: 50m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25728=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25728
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 20/Jul/16 00:22
Start Date: 20/Jul/16 00:22
Worklog Time Spent: 10m 
  Work Description: Github user JamesPeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/773#discussion_r71447768
  
--- Diff: proxy/http/HttpTransact.cc ---
@@ -1783,7 +1783,13 @@ HttpTransact::OSDNSLookup(State *s)
   // update some state variables with hostdb information that has
   // been provided.
   ats_ip_copy(>server_info.dst_addr, s->host_db_info.ip());
-  s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
+  // TODO ideally only if ports aren't defined in remap
+  // If the SRV response has a port number, we should honor it. Otherwise 
we do the port defined in remap
+  if (s->dns_info.srv_port) {
+s->server_info.dst_addr.port() = htons(s->dns_info.srv_port);
+  } else {
+s->server_info.dst_addr.port() = 
htons(s->hdr_info.client_request.port_get()); // now we can set the port.
+  }
--- End diff --

If a plugin used ``TSHttpTxnServerAddrSet()``, then at this point 
``dst_addr`` may be the address set by the plugin in which case we should not 
clobber it. However it is already being clobbered from the request URL, so 
maybe the cases I tested were already broken (I was using port 80 and 443).

Setting the port from the SRV record should probably be conditional on 
``srv_lookup_success``.


Issue Time Tracking
---

Worklog Id: (was: 25728)
Time Spent: 50m  (was: 40m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25703=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25703
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 19/Jul/16 16:58
Start Date: 19/Jul/16 16:58
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/455/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 25703)
Time Spent: 0.5h  (was: 20m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25696=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25696
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 19/Jul/16 16:47
Start Date: 19/Jul/16 16:47
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
@jpeach `HttpTransact::OSDNSLookup` seems to be the correct place-- as it 
is called immediately after the DNS lookup is complete-- and is what sets the 
port numbers for the destination.


Issue Time Tracking
---

Worklog Id: (was: 25696)
Time Spent: 20m  (was: 10m)

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4622) Ports from SRV lookups aren't used

2016-07-18 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4622?focusedWorklogId=25641=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-25641
 ]

ASF GitHub Bot logged work on TS-4622:
--

Author: ASF GitHub Bot
Created on: 18/Jul/16 16:22
Start Date: 18/Jul/16 16:22
Worklog Time Spent: 10m 
  Work Description: Github user jacksontj commented on the issue:

https://github.com/apache/trafficserver/pull/773
  
Yea, I'll have to look a bit more. Ideally its as close to that DNS lookup 
as possible, that way if some plugin wants to overwrite it I've done the change 
in core before they can (so that we won't be clobbering eachother). Have to 
look into it this week.


Issue Time Tracking
---

Worklog Id: (was: 25641)
Time Spent: 10m
Remaining Estimate: 0h

> Ports from SRV lookups aren't used
> --
>
> Key: TS-4622
> URL: https://issues.apache.org/jira/browse/TS-4622
> Project: Traffic Server
>  Issue Type: Bug
>  Components: DNS
>Reporter: Thomas Jackson
>Assignee: Thomas Jackson
> Fix For: 7.0.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Although the dns processor parses out the ports and we keep track of them, it 
> seems that the port from the SRV response is not used at all when connecting 
> to the origin. Simple fix, we simply need to set the port before doing 
> `do_http_server_open` (potentially earlier if we want to let plugins etc. 
> override the port?)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)