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

fix: IPv6 issues for nginx #7082

Merged
merged 4 commits into from
Feb 14, 2025
Merged

fix: IPv6 issues for nginx #7082

merged 4 commits into from
Feb 14, 2025

Conversation

qdrddr
Copy link
Contributor

@qdrddr qdrddr commented Feb 14, 2025

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

(link to issue, supportive screenshots etc.)
Bug with processing IPv6
#7081

What does this fix?

(if this is a bug fix)
Correctly processes IPv6

What is the new behavior?

(if this is a breaking or feature change)
Be able to run in k8s environments with IPv6

What is the current behavior?

(if this is a breaking or feature change)
Nginx container fails due to the bug

What libraries were added/updated?

(list all with version changes)
N/A

Does this change affect performance?

(if so describe the impacts positive or negative)
No

Does this change affect security?

(if so describe the impacts positive or negative)
No

What alternative approaches were there?

(briefly list any if applicable)

What feature flags were used to cover this change?

(briefly list any if applicable)

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • [ x] No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)
Proxy for thee main app

@qdrddr qdrddr requested a review from a team as a code owner February 14, 2025 02:06
Copy link

netlify bot commented Feb 14, 2025

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e8b1ba5

Copy link

netlify bot commented Feb 14, 2025

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e8b1ba5

@github-actions github-actions bot added the fix label Feb 14, 2025
@farioas
Copy link
Member

farioas commented Feb 14, 2025

Did you test this out? I have no k8s cluster with ipv6 to check :)

@qdrddr
Copy link
Contributor Author

qdrddr commented Feb 14, 2025

Yes, I have tested @farioas

Here is how the /etc/resolv.conf looks like when you have both IPv4 & IPv6 nameservers in the DualStack k8s environment:

cat /etc/resolv.conf
search ai-system.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.43.0.10
nameserver 2001:cafe:42:1::a
options ndots:5

After I process this file with this new code:

nameservers=$(awk '$1=="nameserver" {
    ns = $2;
    # Capture only IPv6 addresses (they contain a colon and no dot)
    if (ns ~ /^[0-9a-fA-F:]+$/ && ns ~ /:/ && ns !~ /\./) {
        printf "[%s] ", ns;
    } else {
        # IPv4 addresses
        printf "%s ", ns;
    }
}' /etc/resolv.conf)
echo "resolver $nameservers;" > $OPT_DIR/nginx/resolv.conf

Here is how the resulting $OPT_DIR/nginx/resolv.conf file would look like

resolver 10.43.0.10 [2001:cafe:42:1::a] ;

It looks correct to me.

@farioas farioas merged commit cbf53fd into HumanSignal:develop Feb 14, 2025
2 checks passed
@qdrddr
Copy link
Contributor Author

qdrddr commented Feb 17, 2025

Which version of the packaged docker container is this fix expected to be implemented?

@farioas
Copy link
Member

farioas commented Feb 17, 2025

It's available in docker image tag: 20250214.164321-develop-cbf53fdac

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

Successfully merging this pull request may close these issues.

2 participants