[Backport 8.x] Fix Resolv regression when querying IPv6 DNS servers#538
Merged
Conversation
JRuby 9.4.13.0 switched back to using the upstream Ruby `resolv` gem instead of maintaining an in-tree version that carried JRuby-specific patches. However, this switch lost a JRuby patch that normalized IPv6 addresses during DNS lookups. The result is that queries to IPv6 DNS servers are sent using compressed addresses (e.g. `2001:db8::1`), while responses arrive from un-compressed addresses (e.g. `2001:db8:0:0:0:0:0:1`). This mis-match means that queries to IPv6 servers are never seen as "answered" and the library returns an empty `[]` response after waiting for 160 seconds. This commit fixes the issue by loading a monkey-patch that re-applies the lost JRuby fix: responses are normalized through `Addrinfo.ip`, which compresses the IPv6 address on the answer and ensures a match. Fixes #535 Ref: jruby/jruby#9550 Ref: jruby/jruby#4496 Ref: ruby/resolv@5c16180 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com> (cherry picked from commit ddf5188)
This commit updates the CLI entrypoints to load the Resolv IPv6 patch: - puppetserver gem - puppetserver irb - puppetserver ruby This is done by swapping the existing call to `initialize-and-create-jruby-config` for a new `initialize-jruby-cli-config` method that calls the old initialize and then defines an `:initialize-scripting-container` lifecycle method that adds `puppet/server/patches/resolv_ipv6_normalization` to the default list of required libraries. Thus, the CLI entrypoints behave as if the `-rpuppet/server/patches/resolv_ipv6_normalization` CLI flag was always present. Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com> (cherry picked from commit 67225c7)
OpenVoxProjectBot
enabled auto-merge
July 24, 2026 23:06
Contributor
|
The rpm/deb packages and the JAR file for openvox-server are available in a zip archive: |
Member
|
Confirmed fixed on AlmaLinux 10, with IPv6 DNS configured, by the test package CI built from this PR: # dnf downgrade -y openvox-server 8.15.1
# /opt/puppetlabs/bin/puppetserver ruby -rtimeout -rresolv -e 'Timeout.timeout(10) { puts Resolv::DNS.new.getaddresses("voxpupuli.org") }'
Timeout::Error: execution expired
timeout at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/timeout.rb:199
<main> at -e:1
# dnf install -y ./openvox-server-8.16.0-0.1SNAPSHOT.2026.07.24T2309.el10.noarch.rpm
# /opt/puppetlabs/bin/puppetserver ruby -rtimeout -rresolv -e 'Timeout.timeout(10) { puts Resolv::DNS.new.getaddresses("voxpupuli.org") }'
2606:4700:3035::ac43:c6e3
2606:4700:3035::6815:54ee
104.21.84.238
172.67.198.227 |
Sharpie
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #537 to
8.x.Fixes #535