#8213 Test failure in Travis CI: missing IPv6 loopback interface
Closed: fixed 4 years ago by frenaud. Opened 4 years ago by frenaud.

The nightly tests failed in Travis-CI in PR #4291 and #4290, because the installer detected that no IPv6 loopback interface was configured:

03-01 15:07 ipadocker.command INFO     Executing command: ipa-server-install -U --domain ipa.test --realm IPA.TEST -p Secret123 -a Secret123 --setup-dns --setup-kra --auto-forwarders

ipapython.admintool: ERROR    IPv6 stack is enabled in the kernel but there is no interface that has ::1 address assigned. Add ::1 address resolution to 'lo' interface. You might need to enable IPv6 on the interface 'lo' in sysctl.conf.

ipapython.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information

Checking DNS domain ipa.test, please wait ...

03-01 15:07 ipadocker.cli ERROR    Command ipa-server-install -U --domain ipa.test --realm IPA.TEST -p Secret123 -a Secret123 --setup-dns --setup-kra --auto-forwarders failed (exit code 1)

Logs available for testing_ipa-4-6 and testing_ipa-4-7


@frenaud I need to continue the investigation, but so far this is what I've discovered:

I've tried to list the environment variables in my fork of freeipa, I got this:

Env var keys: KeysView(environ({'LC_ALL': 'en_US.utf8', 'LANG': 'en_US.utf8', 'HOSTNAME': 'master.ipa.test', 'container': 'docker', 'PWD': '/freeipa', 'HOME': '/root', 'RPMBUILD_OPTS': '', 'FBR': 'f', 'DISTTAG': 'fcontainer', 'FGC': 'f', 'SHLVL': '1', 'LANGUAGE': 'en_US.utf8', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'PYTHON': '/usr/bin/python3', '_': '/usr/sbin/ipa-server-install', 'KRB5CCNAME': '/tmp/krbccjjmvcjxj/ccache'}))

None of the Travis' default variables were there.

I tried to access TRAVIS env var using Travis' example repo: https://travis-ci.org/netoarmando/python-example/jobs/657875299 and it successfully returned 'true', as expected.

For some reason, the environment variables from Travis are not being passed to the container where tests are executed.

After explicitly passing TRAVIS the tests continued:

# .travis_run_task.sh#L55-L59
# ...
ipa-docker-test-runner -l $CI_RESULTS_LOG \
    -c $TEST_RUNNER_CONFIG \
    $developer_mode_opt \
    --container-environment "PYTHON=$PYTHON" \
    --container-environment "TRAVIS=$TRAVIS" \
# ...

Complete log: https://api.travis-ci.org/v3/job/657886341/log.txt

However, it seems that other variables are not present (e.g. PEP8_ERROR_LOG and CI_RUNNER_LOG_ARCHIVE) and there's a strange timeout error during ipa server installation that may or may not be related to this.

'transfer.sh' is not working too (murphy's law in action), I had to use an alternative service to download the logs.

From ipaserver-install.log (part of this run) I could see:

2020-03-04T23:05:47Z INFO Checking if Travis is being used.
2020-03-04T23:05:47Z INFO Skipping IPv6 for Travis.

and later:

2020-03-04T23:05:56Z DEBUG   [6/45]: starting directory server
2020-03-04T23:05:56Z DEBUG Starting external process
2020-03-04T23:05:56Z DEBUG args=/bin/systemctl start dirsrv@IPA-TEST.service
2020-03-04T23:06:00Z DEBUG Process finished, return code=0
2020-03-04T23:06:00Z DEBUG stdout=
2020-03-04T23:06:00Z DEBUG stderr=
2020-03-04T23:06:00Z DEBUG Starting external process
2020-03-04T23:06:00Z DEBUG args=/bin/systemctl is-active dirsrv@IPA-TEST.service
2020-03-04T23:06:00Z DEBUG Process finished, return code=0
2020-03-04T23:06:00Z DEBUG stdout=active

2020-03-04T23:06:00Z DEBUG stderr=
2020-03-04T23:06:00Z DEBUG wait_for_open_ports: localhost [389] timeout 300
2020-03-04T23:06:00Z DEBUG waiting for port: 389
2020-03-04T23:06:00Z DEBUG Failed to connect to port 389 tcp on ::1 

This is happening for ipa-4-6 and ipa-4-7. ::1 was used for reasons I'm not sure.

Anyway, I've enabled IPv6 back in Docker with the work around described here: https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729

Pull requests:

ipa-4-6:

  • 423a052 Travis: Enable IPv6 support for Docker

ipa-4-7:

  • 4cddbfd Travis: Enable IPv6 support for Docker

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata