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

pulp-in-one: nginx doesn't listen on IPv6 addresses #595

Open
kbrantley opened this issue Feb 10, 2024 · 0 comments
Open

pulp-in-one: nginx doesn't listen on IPv6 addresses #595

kbrantley opened this issue Feb 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kbrantley
Copy link

kbrantley commented Feb 10, 2024

Version
docker.io/pulp/pulp:latest
"Created": "2024-02-05T18:49:01.533467888Z",

Describe the bug
nginx's config uses "listen 80 default_server deferred;" as the definition for which port to use. This prevents pulp from working in a dual stack (or IPv6 only) environment.

To Reproduce
Steps to reproduce the behavior:

  1. Start a pulp-in-one container in an environment that assigns an IPv6 address.
  2. Try to access the service over IPv6.

Expected behavior
The instance of nginx running within the container should be accessible over IPv6.

Additional context

Fixing this may be as simple as the config file to read "listen [::]:80 default_server deferred;" -- and that's it. In fact, doing that within the container and reloading nginx shows that it starts listening on IPv6 appropriately:

# From within the container, observe that nginx is only listening on IPv4:
[root@d7a3b2234942 /]# ss -lnp | grep 80
tcp   LISTEN 0      0                                0.0.0.0:80         0.0.0.0:*    users:(("nginx",pid=376,fd=7))

# Tweak the config, and reload nginx:
[root@d7a3b2234942 /]# sed -i 's/listen 80/listen [::]:80/g' /etc/nginx/nginx.conf
[root@d7a3b2234942 /]# killall -SIGHUP nginx

# Observe that nginx is now listening on IPv4+IPv6:
[root@d7a3b2234942 /]# ss -lnp | grep 80
tcp   LISTEN 0      0                                      *:80               *:*    users:(("nginx",pid=376,fd=10))

While this likely resolves the TODO on line one, this fix would also "complicate" fixing #582. To fix both this and #582, some additional logic would need to be added to the container to change the configuration depending on if IPv6 is enabled (no matter if an IPv6 address is assigned) or not.

@mikedep333 mikedep333 added bug Something isn't working and removed Triage-Needed labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants