Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ruby] Ruby should return expected SocketError exception when DNS lookup fails #3087

Merged

Conversation

robbkidd
Copy link
Contributor

@robbkidd robbkidd commented Oct 25, 2019

As researched in #3082, RHELish hosts will have a "myhostname" NSS plugin added to their /etc/nsswitch.conf configurations by the systemd-libs package's %post action every time the package is installed or updated. These tests copy the sed-fu used to make that plugin addition to verify that Ruby will return the expected SocketError exception when DNS lookup fails.

Adding these tests to demonstrate the failures. Will follow-up in this PR with a change to make the tests pass.

@chef-expeditor
Copy link
Contributor

Hello robbkidd! Thanks for the pull request!

Here is what will happen next:

  1. Your PR will be reviewed by the maintainers.
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

@robbkidd
Copy link
Contributor Author

I notice in the fan-out of buildkite jobs that the "what changed in this PR" detection does not pick up that core/ruby24 is affected by this change. Maybe it relies only on paths changed coming from git diffs and does not consider the paths= entries in bldr.toml?

@predominant
Copy link
Collaborator

Added needs discussion tag, so it shows up red while its in "WIP" status. Makes it easier while skimming the current open PRs.

@robbkidd robbkidd changed the title [ruby] 🚧WIP: Ruby should return expected SocketError exception when DNS lookup fails [ruby] Ruby should return expected SocketError exception when DNS lookup fails Nov 14, 2019
@robbkidd
Copy link
Contributor Author

I think this is no longer WIP and ready for review.

@robbkidd robbkidd force-pushed the ruby-dns-resolve-on-rhelish-hosts branch from f5f8924 to 259c9df Compare December 2, 2019 22:25
RHELish hosts will have a "myhostname" NSS plugin added to their
/etc/nsswitch.conf configurations by the systemd-libs package's %post
action every time the packge is installed or updated. These tests copy
the sed-fu used to make that plugin addition to verify that Ruby will
return the expected SocketError exception when DNS lookup fails.

Signed-off-by: Robb Kidd <[email protected]>
So that Ruby returns the correct error when DNS lookups fail when this
NSS plugin is enabled (on most RHEL-ish hosts).

Signed-off-by: Robb Kidd <[email protected]>
@robbkidd robbkidd force-pushed the ruby-dns-resolve-on-rhelish-hosts branch from 259c9df to 7761cce Compare January 23, 2020 15:40
@robbkidd
Copy link
Contributor Author

I rebased this branch against latest core-plans master. I am still in favor of merging. I can't think of anything else that needs to be done to this PR, but I am super appreciative of any feedback other folks have.

@gavindidrichsen gavindidrichsen merged commit 4b8d752 into habitat-sh:master Jan 23, 2020
@robbkidd robbkidd deleted the ruby-dns-resolve-on-rhelish-hosts branch January 23, 2020 16:22
@gavindidrichsen
Copy link
Contributor

gavindidrichsen commented Jan 28, 2020

Hi @robbkidd. After merging core/ruby all core/* dependent plans built successfully except for core/sentinel:

(travis_ci_version_2) ➜  core-plans git:(master) ✗ hab bldr job status 1431246614380838912 -s | grep -E "(core\/|habitat\/)"
2020-01-24T16:41:23.071458+00:00  1431246614380838912  Complete  core/ruby  x86_64-linux
core/ruby                               Success  1431246616419901440  core/ruby/2.5.7/20200124164126                             x86_64-linux
core/scaffolding-ruby                   Success  1431264009452838912  core/scaffolding-ruby/0.8.11/20200124172329                x86_64-linux
core/sensu                              Success  1431264009226338304  core/sensu/1.6.2/20200124172329                            x86_64-linux
core/sentinel                           Failure  1431249644514516992                                                             x86_64-linux
core/fluentd                            Success  1431264009679339520  core/fluentd/1.0.2/20200124172359                          x86_64-linux
core/github_changelog_generator         Success  1431249663473344512  core/github_changelog_generator/1.14.3/20200124171459      x86_64-linux
core/bundler                            Success  1431249664177995776  core/bundler/1.17.3/20200124171459                         x86_64-linux
(travis_ci_version_2) ➜  core-plans git:(master) ✗

After some investigation, choosing to promote this as:

  • core/sentinel is NOT in core-plans repository but in its own repository;
  • core/sentinel was broken already with or without the latest core/ruby. I raised an issue here

Therefore, I'm promoting this build group:
5 core/ruby/2.5.7/20200124164126
6 core/scaffolding-ruby/0.8.11/20200124172329
7 core/sensu/1.6.2/20200124172329
8 core/fluentd/1.0.2/20200124172359
9 core/github_changelog_generator/1.14.3/20200124171459
10 core/bundler/1.17.3/20200124171459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants