Skip to content

test: allow for different nsswitch.conf settings - #16378

Closed
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:nsswitch
Closed

test: allow for different nsswitch.conf settings#16378
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:nsswitch

Conversation

@danbev

Copy link
Copy Markdown
Contributor

The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.

If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.

This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.

Refs: #12075
Refs: nodejs/help#687

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: nodejs#12075
Refs: nodejs/help#687
@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Oct 22, 2017
@addaleaxaddaleax added the dns Issues and PRs related to the dns subsystem. label Oct 22, 2017

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like this might fix #15825 if also applied to parallel/test-{https,tls}-connect-address-family.

@danbev

Copy link
Copy Markdown
ContributorAuthor

It sounds like this might fix #15825 if also applied to parallel/test-{https,tls}-connect-address-family.

I'll take a closer look at them tomorrow.

The hosts configuration on a system can affect how dns look up works and
different error can occur with different setups. This commit adds a
check for EAI_AGAIN to avoid the issue reported in the issue referred to
below.
Refs: nodejs#15825
@danbev

Copy link
Copy Markdown
ContributorAuthor

It sounds like this might fix #15825 if also applied to parallel/test-{https,tls}-connect-address-family.

I was able to reproduce these and added this commit. I've not marked it as squash but I'm happy to have it squashed if that is alright and just include the ref in the final commit. Thanks!

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to have it squashed if that is alright and just include the ref in the final commit.

LGTM and SGTM!

@danbev

Copy link
Copy Markdown
ContributorAuthor

@danbev

Copy link
Copy Markdown
ContributorAuthor
test/arm-fanned failure looks unrelated

console output:

real	0m22.219suser	0m2.330ssys	0m5.800s+ git fetch --no-tags file:///home/iojs/.ccache/node.shared.reference +refs/heads/jenkins-node-test-commit-arm-fanned-11977-binary-pi1p/cc-armv6:refs/remotes/jenkins_tmpFrom file:///home/iojs/.ccache/node.shared.reference + c11d5a9...be3e18b jenkins-node-test-commit-arm-fanned-11977-binary-pi1p/cc-armv6 -> jenkins_tmp (forced update)real	0m51.195suser	0m19.150ssys	0m8.280s+ rm -f ****+ git checkout -f refs/remotes/jenkins_tmpWarning: you are leaving 2 commits behind, not connected toany of your branches: c11d5a9 added binaries 846a46f doc: fix missing newline characterIf you want to keep them by creating a new branch, this may be a good timeto do so with: git branch <new-branch-name> c11d5a9HEAD is now at be3e18b... added binariesreal	0m33.234suser	0m3.050ssys	0m18.670s+ git reset --hardHEAD is now at be3e18b added binariesreal	0m11.115suser	0m3.410ssys	0m2.900s+ git clean -fdxwarning: failed to remove out/Release/.nfs00000000000f537d000002f9Build step 'Execute shell' marked build as failureTAP Reports Processing: STARTLooking for TAP results report in workspace using pattern: *.tapDid not find any matching files. Setting build result to FAILURE.Checking ^not okJenkins Text Finder: File set '*.tap' is emptyNotifying upstream projects of job completionFinished: FAILURE

danbev added a commit to danbev/node that referenced this pull request Oct 25, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: nodejs#12075
Refs: nodejs/help#687
Refs: nodejs#15825
PR-URL: nodejs#16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@danbev

Copy link
Copy Markdown
ContributorAuthor

Landed in 50d7275

@danbevdanbev closed this Oct 25, 2017
@danbev
danbev deleted the nsswitch branch October 25, 2017 09:19
cjihrig pushed a commit that referenced this pull request Oct 25, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: #12075
Refs: nodejs/help#687
Refs: #15825
PR-URL: #16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@cjihrigcjihrig mentioned this pull request Oct 25, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: nodejs/node#12075
Refs: nodejs/help#687
Refs: nodejs/node#15825
PR-URL: nodejs/node#16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: #12075
Refs: nodejs/help#687
Refs: #15825
PR-URL: #16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorinsMylesBorins mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: #12075
Refs: nodejs/help#687
Refs: #15825
PR-URL: #16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: #12075
Refs: nodejs/help#687
Refs: #15825
PR-URL: #16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.
If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.
This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.
Refs: nodejs/node#12075
Refs: nodejs/help#687
Refs: nodejs/node#15825
PR-URL: nodejs/node#16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dnsIssues and PRs related to the dns subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@danbev@bnoordhuis@jasnell@addaleax@lpinca@cjihrig@MylesBorins@nodejs-github-bot