URL: https://github.com/freeipa/freeipa/pull/1397 Author: tiran Title: #1397: [Backport][ipa-4-6] Travis: Add workaround for missing IPv6 support Action: opened
PR body: """ This PR was opened automatically because PR #1395 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1397/head:pr1397 git checkout pr1397
From 394a628420c781a6f2eebb3d430739db96ac0e4e Mon Sep 17 00:00:00 2001 From: Christian Heimes <chei...@redhat.com> Date: Wed, 13 Dec 2017 09:33:49 +0100 Subject: [PATCH] Travis: Add workaround for missing IPv6 support Latest Travis CI image lacks IPv6 address on localhost. Add some diagnostics and skip IPv6 tests in ipa-server-install when TRAVIS is detected. The hack will be removed as soon as it is no longer required to pass automated testing. https://pagure.io/freeipa/issue/7323 Signed-off-by: Christian Heimes <chei...@redhat.com> --- .travis.yml | 15 ++++++++++++++- ipaplatform/redhat/tasks.py | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d6fbb553c8..579e843bcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,13 @@ +# workaround for missing IPv6 address support +# https://github.com/travis-ci/travis-ci/issues/8891 +sudo: required +dist: trusty +group: deprecated-2017Q4 + language: python + services: - docker - python: - "3.6" cache: pip @@ -48,6 +54,13 @@ env: test_xmlrpc/test_[l-z]*.py" - TASK_TO_RUN="tox" TEST_RUNNER_CONFIG=".test_runner_config.yaml" + +before_install: + - ip addr show + - ls /proc/net + - cat /proc/net/if_inet6 +# - ip addr show dev lo | grep -q inet6 || (echo "No IPv6 address found"; exit 1) + install: - pip3 install --upgrade pip - pip3 install pycodestyle diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py index 0e7810f623..79bd5335ea 100644 --- a/ipaplatform/redhat/tasks.py +++ b/ipaplatform/redhat/tasks.py @@ -152,6 +152,12 @@ def check_ipv6_stack_enabled(self): "globally, disable it on the specific interfaces in " "sysctl.conf except 'lo' interface.") + # XXX This is a hack to work around an issue with Travis CI by + # skipping IPv6 address test. The Dec 2017 update removed ::1 from + # loopback, see https://github.com/travis-ci/travis-ci/issues/8891. + if os.environ.get('TRAVIS') == 'true': + return + try: localhost6 = ipautil.CheckedIPAddress('::1', allow_loopback=True) if localhost6.get_matching_interface() is None:
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org