Skip to content

Disable IPv6 on Travis s390x case.#2819

Merged
nurse merged 1 commit into
ruby:masterfrom
junaruga:hotfix/s390x-apt-add-repository-gpg-key-timed-out
Jan 7, 2020
Merged

Disable IPv6 on Travis s390x case.#2819
nurse merged 1 commit into
ruby:masterfrom
junaruga:hotfix/s390x-apt-add-repository-gpg-key-timed-out

Conversation

@junaruga

@junaruga junaruga commented Jan 6, 2020

Copy link
Copy Markdown
Member

This PR is pointed out from https://bugs.ruby-lang.org/issues/16360#note-16 .

This fixes following error that sometimes happens once in a few times
on Travis s390x environment.

$ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
Error: retrieving gpg key timed out.
+      - bash -cx "${BEFORE_INSTALL}"

For above line, I put bash -cx because when run ${BEFORE_INSTALL} without bash -cx, the sed command outputs the following error. https://travis-ci.org/junaruga/ruby/jobs/633341625#L210

$ ${BEFORE_INSTALL}
sed: -e expression #1, char 1: unknown command: `''

It's useful to see the actual executed command in the Travis log like this.

$ bash -cx "${BEFORE_INSTALL}"
+sed vm_opts.h -e 's/OPT_SUPPORT_JOKE *0/OPT_SUPPORT_JOKE 1/' -i

I added the script tool/travis_disable_ipv6.sh, as I had no idea about how to add the multiple commands to ${BEFORE_INSTALL}.

The ruby code

+sudo ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)"

was used in wercker.yml in the past.

I tested s390x-linux case, and I executed the case 5 times continuously, and all the jobs is succeeded. And I want to watch the case keeping it as allow_failures, on master branch for now, until we can see it will be stable.
I tested SUPPORT_JOKE case too that is using ${BEFORE_INSTALL}.

This fixes following error that sometimes happens once in a few times
on Travis s390x environment.

```
$ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
Error: retrieving gpg key timed out.
```
@junaruga junaruga force-pushed the hotfix/s390x-apt-add-repository-gpg-key-timed-out branch from f5be0b0 to 1af6f9d Compare January 6, 2020 17:52
@nurse nurse merged commit f132825 into ruby:master Jan 7, 2020
@junaruga junaruga deleted the hotfix/s390x-apt-add-repository-gpg-key-timed-out branch January 7, 2020 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants