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

Stop Nginx socket listening on IPv6 when IPv6 is disabled #10781

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsgnr
Copy link

@dsgnr dsgnr commented Mar 3, 2025

What this PR does

Fixes an issue where the Nginx deployment would still bing to IPv6 even if we set gateway.nginx.config.enableIPv6 to false.
This causes the deployment to crash if IPv6 is disabled on the host.

✗ k logs deploy/mimir-nginx
/docker-entrypoint.sh: No files found in /docker-entrypoint.d/, skipping configuration
2025/03/03 10:06:22 [emerg] 1#1: socket() [::]:8080 failed (97: Address family not supported by protocol)
nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol)

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@dsgnr dsgnr requested a review from a team as a code owner March 3, 2025 10:19
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dimitarvdimitrov
Copy link
Contributor

the change you're making is in the nginx section, not in the gateway section of the values.yaml. This flag is already respected in the gateway section

{{- if .Values.gateway.nginx.config.enableIPv6 }}
listen [::]:{{ include "mimir.serverHttpListenPort" . }};
{{- end }}

You should migrate to the gateway

@dsgnr
Copy link
Author

dsgnr commented Mar 3, 2025

@dimitarvdimitrov, the Helm chart currently fails with the default values.yaml if the host has IPv6 disabled.

NAME                                        READY   STATUS      RESTARTS      AGE
mimir-alertmanager-0                        1/1     Running     0             3m1s
mimir-compactor-0                           1/1     Running     0             3m1s
mimir-distributor-85d7b44445-2phdz          1/1     Running     0             3m1s
mimir-ingester-zone-a-0                     1/1     Running     0             3m
mimir-ingester-zone-b-0                     1/1     Running     0             3m
mimir-ingester-zone-c-0                     1/1     Running     0             3m
mimir-make-minio-buckets-5.3.0-9cv4f        0/1     Completed   0             3m
mimir-minio-84564f4bc-44b9d                 1/1     Running     0             3m1s
mimir-nginx-5d44486945-2c94n                0/1     Error       5 (93s ago)   3m1s
mimir-overrides-exporter-694774785b-dzz4p   1/1     Running     0             3m1s
mimir-querier-5c69876c84-pfz5t              1/1     Running     0             3m1s
mimir-querier-5c69876c84-wh9j4              1/1     Running     0             3m1s
mimir-query-frontend-767944f4b-wbtpw        1/1     Running     0             3m1s
mimir-query-scheduler-6dbc7475b4-dgh69      1/1     Running     0             3m
mimir-query-scheduler-6dbc7475b4-lmks7      1/1     Running     0             3m1s
mimir-rollout-operator-746574f85-kn7zq      1/1     Running     0             3m1s
mimir-ruler-7ff57c574-nq5vh                 1/1     Running     0             3m
mimir-store-gateway-zone-a-0                1/1     Running     0             3m
mimir-store-gateway-zone-b-0                1/1     Running     0             3m
mimir-store-gateway-zone-c-0                1/1     Running     0             3m

Would you prefer a nginx.nginxConfig.disableIPv6 boolean instead?

@dimitarvdimitrov
Copy link
Contributor

Would you prefer a nginx.nginxConfig.disableIPv6 boolean instead?

Is it significantly different to migrate to the gateway nginx vs the root nginx deployment?

I would prefer not to reduce the friction around a deprecated component. That would force installs to migrate to the recommended deployment rather than fixing a problem early in the install and then having to do a migration in production systems.

@@ -41,6 +41,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [ENHANCEMENT] Set resources for smoke-test job. #10608
* [BUGFIX] Create proper in-cluster remote URLs when gateway and nginx are disabled. #10625
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics. #10044
* [BUGFIX] Fix Nginx listening sockets when IPv6 is disabled on in Helm values.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* [BUGFIX] Fix Nginx listening sockets when IPv6 is disabled on in Helm values.
* [BUGFIX] Fix Nginx listening sockets when IPv6 is disabled in Helm values.

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.

4 participants