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

remove unroutable ipv6 config #694

Merged
merged 1 commit into from
Feb 24, 2021
Merged

remove unroutable ipv6 config #694

merged 1 commit into from
Feb 24, 2021

Conversation

b4ldr
Copy link
Member

@b4ldr b4ldr commented Dec 22, 2020

The current configuration configures the docker daemon to issue ipv6
addresses in an RFC 3849 IPv6 documentation range[1], most Likely copied f
rom the docker documentation[2]. I suspect that theses images dont have
any additional IPv6 prefixes delegated to them so im not sure any value
makes senses here.

I suspect that this is never the desired outcome as it means the docker
instance gets configured with a un-routable global IPv6 address. This
means outgoing connections will first try to connect to resources via
IPv6 (if a AAAA is avalible) and time out before trying IPv4. This can
be observed in a beaker job[3] where wget first tries to download the
puppet.deb file over ipv6

In most cases i think one just wants to have the docker image have a
ipv6 loopback and linklocal address which for reasons [4] docker dosn't
give us. I don't think anyone actually needs a global IPv6
address. As such adding something like the following to[5]
spec_helper_acceptance.rb[6] would produce the desired affect

shell('sysctl net.ipv6.conf.all.disable_ipv6=0')

[1]https://tools.ietf.org/html/rfc3849
[2]https://docs.docker.com/config/daemon/ipv6/
[3]https://github.com/voxpupuli/puppet-unbound/runs/1595247379?check_suite_focus=true
(line 272)
[4]moby/moby#33099
[5]https://github.com/voxpupuli/puppet-unbound/blob/master/spec/acceptance/unbound_spec.rb#L13
[6]voxpupuli/voxpupuli-acceptance#16

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Perhaps we should pick a range from fd00::/8 instead?

Comment on lines -82 to -85
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
Copy link
Member

Choose a reason for hiding this comment

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

I added this because in https://github.com/theforeman/foreman/puppet-dns we needed to test with IPv6 localhost. This enabled me to perform requests to ::1.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ekohl can you try the fix in https://github.com/voxpupuli/puppet-unbound/blob/master/spec/acceptance/unbound_spec.rb#L13 or the other PR to see if that resolves the issue. I initialy added that fix for the same reason in unbond (and i thought nsd but they may have been internal modules)

Copy link
Member Author

Choose a reason for hiding this comment

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

i have created theforeman/puppet-dns#182 to test

b4ldr added a commit to b4ldr/voxpupuli-acceptance that referenced this pull request Dec 22, 2020
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Let's clean this up and see if we need to fix it locally.

@ekohl
Copy link
Member

ekohl commented Feb 23, 2021

Looks like we need a signed commit in this repository. Could you manage that?

@b4ldr b4ldr force-pushed the fix_ipv6 branch 3 times, most recently from 2f02995 to 9bf0636 Compare February 24, 2021 11:11
The current configuration configures the docker daemon to issue ipv6
addresses in an RFC 3849 IPv6 documentation range[1], most Likely copied f
rom the docker documentation[2].  I suspect that theses images dont have
any additional IPv6 prefixes delegated to them so im not sure any value
makes senses here.

I suspect that this is never the desired outcome as it means the docker
instance gets configured with a un-routable global IPv6 address.  This
means outgoing connections will first try to connect to resources via
IPv6 (if a AAAA is avalible) and time out before trying IPv4.  This can
be observed in a beaker job[3] where wget first tries to download the
puppet.deb file over ipv6

In most cases i think one just wants to have the docker image have a
ipv6 loopback and linklocal address which for reasons [4] docker dosn't
give us.  I  don't think anyone  actually needs a global IPv6
address.  As such adding something like the following to[4]
spec_helper_acceptance.rb would produce the desired affect

  shell('sysctl net.ipv6.conf.all.disable_ipv6=0')

[1]https://tools.ietf.org/html/rfc3849
[2]https://docs.docker.com/config/daemon/ipv6/
[3]https://github.com/voxpupuli/puppet-unbound/runs/1595247379?check_suite_focus=true
(line 272)
[4]moby/moby#33099
[5]https://github.com/voxpupuli/puppet-unbound/blob/master/spec/acceptance/unbound_spec.rb#L13

Signed-off-by: John Bond <github@johnbond.org>
@b4ldr
Copy link
Member Author

b4ldr commented Feb 24, 2021

Looks like we need a signed commit in this repository. Could you manage that?

fixed

@ekohl ekohl merged commit 84028fa into voxpupuli:master Feb 24, 2021
@ekohl
Copy link
Member

ekohl commented Feb 24, 2021

Thanks!

b4ldr added a commit to b4ldr/voxpupuli-acceptance that referenced this pull request Jun 4, 2021
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