Description of problem: If I try to use distro RHEL-7.0-20140206.0 with ipv6.disable=1 harness doesn't work and beah-beaker-backend fails to start with: # systemctl status beah-beaker-backend beah-beaker-backend.service - The Beaker backend server. Loaded: loaded (/usr/lib/systemd/system/beah-beaker-backend.service; enabled) Active: failed (Result: exit-code) since Sat 2014-02-08 05:30:07 EST; 1h 6min ago Process: 7776 ExecStart=/usr/bin/beah-beaker-backend (code=exited, status=1/FAILURE) Main PID: 7776 (code=exited, status=1/FAILURE) CGroup: /system.slice/beah-beaker-backend.service Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: proxy = make_proxy(conf, verbose) Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: File "/usr/lib/python2.7/site-packages/beah/backends/bea...roxy Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: lc_ipv6 = has_ipv6(url) Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: File "/usr/lib/python2.7/site-packages/beah/backends/bea...ipv6 Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: s = socket.socket(socket.AF_INET6) Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: File "/usr/lib64/python2.7/socket.py", line 187, in __init__ Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: _sock = _realsocket(family, type, proto) Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com beah-beaker-backend[7776]: socket.error: [Errno 97] Address family not supported by...ocol Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com systemd[1]: beah-beaker-backend.service: main process exited, code=exited, status=...ILURE Feb 08 05:30:07 hp-ml370g6-01.rhts.eng.bos.redhat.com systemd[1]: Unit beah-beaker-backend.service entered failed state. Hint: Some lines were ellipsized, use -l to show in full. Version-Release number of selected component (if applicable): 0.15.3 How reproducible: 100% Steps to Reproduce: 1. run job with ipv6.disable=1 in kernel_options_post Actual results: harness doesn't work Expected results: harness works if IPv6 is not available Additional info:
During testing, we didn't test this use case. The culprit is this line: # can we connect? s = socket.socket(socket.AF_INET6) (in beah/backends/beakerlc.py: has_ipv6()) I think this can just be moved in the ensuing try..except block: diff --git a/beah/backends/beakerlc.py b/beah/backends/beakerlc.py index 0bb6a6c..84ab668 100644 --- a/beah/backends/beakerlc.py +++ b/beah/backends/beakerlc.py @@ -1874,8 +1874,8 @@ def has_ipv6(url): return None # can we connect? - s = socket.socket(socket.AF_INET6) try: + s = socket.socket(socket.AF_INET6) s.connect((lc_ipv6, url.port)) except (socket.gaierror, socket.error): log.exception('Failed to connect to LC over IPv6.')
(In reply to Amit Saha from comment #3) > During testing, we didn't test this use case. Is there some ks_meta or other option to force harness to use IPv4? I used it only to try work around Bug 1062867.
(In reply to Jan Stancek from comment #4) > (In reply to Amit Saha from comment #3) > > During testing, we didn't test this use case. > > Is there some ks_meta or other option to force harness to use IPv4? I used > it only to try work around Bug 1062867. If you mean that it should use IPv4 even when IPv6 communication is possible locally as well as with the LC? No, it's not supported. BZ#1062867 looks interesting, we will have to look into it further.
http://gerrit.beaker-project.org/#/c/2792/1
In addition to attempting to fix this directly, we will also add the ability to opt in to using older versions of the harness (see #1063090)
*** Bug 1063945 has been marked as a duplicate of this bug. ***
This bug fix is included in beah 0.7.2 which is available from the harness-testing yum repos: http://beaker-project.org/yum/harness-testing/
(In reply to Karel Srot from comment #13) > Is the harness able to deal with a situation when the ipv6 is disabled > during the test run? No, this case is still broken. The reason is that at the start of the task IPv6 is working, so the harness exports RESULT_SERVER=[::1]:7090 which is the address which the rhts-* commands (such as rhts-report-result) use to talk back to the harness. But once IPv6 is disabled that address is no longer reachable so the task gets stuck trying to report a result, and eventually just times out.
I see. At how many places of the code this is actually required? I am thinking how difficult would be to add some IPv4 fallback in that case.
Karel, please see bug 1065811 for the remaining issues with IPv6 being disabled at runtime. I think the only practical solution for beah is an option to force it to use IPv4 only.
Beah 0.7.2 has been released.