Bug 98602

Summary: webkitpy: Pass the `Listen' Apache directive from webkitpy, not the httpd.conf files.
Product: WebKit Reporter: Raphael Kubo da Costa (:rakuco) <rakuco>
Component: Tools / TestsAssignee: Raphael Kubo da Costa (:rakuco) <rakuco>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dbates, dpranke, eric, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 98616    
Bug Blocks: 98151    
Attachments:
Description Flags
Patch
none
Patch
none
Same patch with a more meaningful title none

Description Raphael Kubo da Costa (:rakuco) 2012-10-06 10:52:37 PDT
webkitpy: Pass the `Listen' Apache directive from Apache, not the httpd.conf files.
Comment 1 Raphael Kubo da Costa (:rakuco) 2012-10-06 10:58:20 PDT
Created attachment 167459 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-10-06 15:38:58 PDT
Comment on attachment 167459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=167459&action=review

Sounds like a great win!

> Tools/Scripts/webkitpy/layout_tests/port/base.py:930
> +        return socket.has_ipv6

Is it safe to assume that if python will have ipv6 if and only if apache does?
Comment 3 Raphael Kubo da Costa (:rakuco) 2012-10-07 06:12:17 PDT
Comment on attachment 167459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=167459&action=review

>> Tools/Scripts/webkitpy/layout_tests/port/base.py:930
>> +        return socket.has_ipv6
> 
> Is it safe to assume that if python will have ipv6 if and only if apache does?

Not 100% safe, but the comment in, say, apache2-debian-httpd.conf, states that there should be a way to know if the system had IPV6 support -- I think the odds of someone building Python but not Apache with IPV6 support are not very high, especially if the system itself supports IPV6. We can always revisit that if the bots start experiencing problems as well.
Comment 4 Raphael Kubo da Costa (:rakuco) 2012-10-07 06:19:19 PDT
Comment on attachment 167459 [details]
Patch

Clearing flags on attachment: 167459

Committed r130596: <http://trac.webkit.org/changeset/130596>
Comment 5 Raphael Kubo da Costa (:rakuco) 2012-10-07 06:19:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Raphael Kubo da Costa (:rakuco) 2012-10-07 07:11:33 PDT
Re-opened since this is blocked by bug 98616
Comment 7 Raphael Kubo da Costa (:rakuco) 2012-10-07 07:18:29 PDT
(In reply to comment #3)
> (From update of attachment 167459 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167459&action=review
> 
> >> Tools/Scripts/webkitpy/layout_tests/port/base.py:930
> >> +        return socket.has_ipv6
> > 
> > Is it safe to assume that if python will have ipv6 if and only if apache does?
> 
> Not 100% safe, but the comment in, say, apache2-debian-httpd.conf, states that there should be a way to know if the system had IPV6 support -- I think the odds of someone building Python but not Apache with IPV6 support are not very high, especially if the system itself supports IPV6. We can always revisit that if the bots start experiencing problems as well.

Sigh, it looks like I was too optimistic. At least the EFL bots (which run Ubuntu and thus apache2-debian-httpd.conf) have started failing:

  ServerError raised: Failed to start httpd: [Sun Oct 07 06:43:01 2012] [crit] (EAI 9)Address family for hostname not supported: alloc_listener: failed to set up sockaddr for ::1
  Syntax error on line 4 of -c/-C directives:
  Listen setup failed

I will need to take a closer look at this tomorrow when I have access to the bots. I have rolled it out for now.
Comment 8 Raphael Kubo da Costa (:rakuco) 2012-10-07 07:19:42 PDT
Reopening the bug.
Comment 9 Raphael Kubo da Costa (:rakuco) 2012-10-26 03:37:32 PDT
Created attachment 170875 [details]
Patch
Comment 10 Raphael Kubo da Costa (:rakuco) 2012-10-26 03:43:43 PDT
(In reply to comment #9)
> Created an attachment (id=170875) [details]
> Patch

New attempt that tries to fix the problem reported in my comment 7. The failure reported, there,

  ServerError raised: Failed to start httpd: [Sun Oct 07 06:43:01 2012] [crit] (EAI 9)Address family for hostname not supported: alloc_listener: failed to set up sockaddr for ::1

comes from Apache's APR doing

  error = getaddrinfo(hostname, servname, &hints, &ai_list);

with AI_ADDRCONFIG set in hints.

The patch now tries to address that by performing the same call in Python and only setting up IPv6 addresses if that does not fail.
Comment 11 Raphael Kubo da Costa (:rakuco) 2012-10-26 04:38:09 PDT
Created attachment 170888 [details]
Same patch with a more meaningful title
Comment 12 Raphael Kubo da Costa (:rakuco) 2012-10-26 11:41:17 PDT
Comment on attachment 170888 [details]
Same patch with a more meaningful title

Clearing flags on attachment: 170888

Committed r132678: <http://trac.webkit.org/changeset/132678>
Comment 13 Raphael Kubo da Costa (:rakuco) 2012-10-26 11:41:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Daniel Bates 2013-07-18 11:24:10 PDT
(In reply to comment #12)
> (From update of attachment 170888 [details])
> Clearing flags on attachment: 170888
> 
> Committed r132678: <http://trac.webkit.org/changeset/132678>

This patch broke tests that used port 8443 (SSL) and 8080 when run using old-run-webkit-tests. See bug #118854 for more details.