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

Bug: HostEnvVar should be 127.0.0.1, not localhost #124

Closed
hessjcg opened this issue Dec 6, 2022 · 0 comments · Fixed by #128 or #134
Closed

Bug: HostEnvVar should be 127.0.0.1, not localhost #124

hessjcg opened this issue Dec 6, 2022 · 0 comments · Fixed by #128 or #134
Assignees
Labels
priority: p0 Highest priority. Critical issue. P0 implies highest priority.

Comments

@hessjcg
Copy link
Collaborator

hessjcg commented Dec 6, 2022

Expected Behavior

When the HostEnvName field is set on a InstanceSpec, it should set an environment variable on the workload pods
with the value 127.0.0.1.

Actual Behavior

Instead it sets it to localhost which is problematic for the mysql command line tool. Mysql assumes localhost means "a local socket connection" while 127.0.0.1 is unambiguously a tcp connection.

@hessjcg hessjcg added the priority: p0 Highest priority. Critical issue. P0 implies highest priority. label Dec 6, 2022
@hessjcg hessjcg self-assigned this Dec 6, 2022
hessjcg added a commit that referenced this issue Dec 7, 2022
When a proxy is configured to serve a TCP connection, the application connecting must use the loopback
interface's ip4 address explicitly: 127.0.0.1 instead of the symbolic name localhost because localhost
is interpreted differently by different database client libraries. Using 127.0.0.1 instead avoids this ambiguity.

Fixes #124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment