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

envoy failed to start on linux servers without ipv6 #111

Closed
rophy opened this issue Aug 3, 2024 · 5 comments · Fixed by #114
Closed

envoy failed to start on linux servers without ipv6 #111

rophy opened this issue Aug 3, 2024 · 5 comments · Fixed by #114
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@rophy
Copy link

rophy commented Aug 3, 2024

  • host: Ubuntu 22.04.3 LTS
  • docker: 24.0.7
  • cloud-provider-kind: 0.3.0
E0803 14:16:18.014910       1 controller.go:298] error processing service istio-gateway/istio-gateway (retrying with exponential backoff): failed to ensure load balancer: failed to create continers kindccm-MDL2VIYWAK3ZKKYF6N7NN3NLC7W5RZ4JL24CY7PK [--detach --tty --label io.x-k8s.cloud-provider-kind.cluster=kind --label io.x-k8s.cloud-provider-kind.loadbalancer.name=kind/istio-gateway/istio-gateway --net kind --init=false --hostname kindccm-MDL2VIYWAK3ZKKYF6N7NN3NLC7W5RZ4JL24CY7PK --privileged --restart=on-failure --sysctl=net.ipv4.ip_forward=1 --sysctl=net.ipv6.conf.all.disable_ipv6=0 --sysctl=net.ipv6.conf.all.forwarding=1 --sysctl=net.ipv4.conf.all.rp_filter=0 --publish=10000/TCP --publish-all envoyproxy/envoy:v1.30.1 bash -c echo -en 'node:
  cluster: cloud-provider-kind
  id: cloud-provider-kind-id

dynamic_resources:
  cds_config:
    resource_api_version: V3
    path: /home/envoy/cds.yaml
  lds_config:
    resource_api_version: V3
    path: /home/envoy/lds.yaml


admin:
  access_log_path: /dev/stdout
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 10000
' > /home/envoy/envoy.yaml && touch /home/envoy/cds.yaml && touch /home/envoy/lds.yaml && while true; do envoy -c /home/envoy/envoy.yaml && break; sleep 1; done]: exit status 127

Trying to run the docker run command as shown in the log, I can see:

> docker run --rm --detach --tty --label io.x-k8s.cloud-provider-kind.cluster=kind --label io.x-k8s.cloud-provider-kind.loadbalancer.name=kind/istio-gateway/istio-gateway --net kind --init=false --hostname kindccm-MDL2VIYWAK3ZKKYF6N7NN3NLC7W5RZ4JL24CY7PK --privileged --sysctl=net.ipv4.ip_forward=1 --sysctl=net.ipv6.conf.all.disable_ipv6=0 --sysctl=net.ipv6.conf.all.forwarding=1 --sysctl=net.ipv4.conf.all.rp_filter=0 --publish=10000/TCP --publish-all envoyproxy/envoy:v1.30.1
1aa7bf2e0746c73aa788621673b761355ef364686f2168b9f8f0717e88612090
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/ipv6/conf/all/disable_ipv6: no such file or directory: unknown.

docker run will work if I remove those ipv6 related options: --sysctl=net.ipv6.conf.all.disable_ipv6=0 --sysctl=net.ipv6.conf.all.forwarding=1

@aojea
Copy link
Contributor

aojea commented Aug 5, 2024

hmmm it seems we need to add a way to detect if the cluster is ipv6, in kind the user defines the cluster ip family

https://github.com/search?q=repo%3Akubernetes-sigs%2Fkind%20disable_ipv6&type=code

@aojea aojea added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2024
@rophy
Copy link
Author

rophy commented Aug 6, 2024

Since this is an "extension" of kind, is it possible to determine those from kind at run time?

@aojea
Copy link
Contributor

aojea commented Aug 6, 2024

@rophy can you test this and confirm this aproach works in your environment #114?

@rophy
Copy link
Author

rophy commented Aug 6, 2024

Sure, will try and feedback today.

@rophy
Copy link
Author

rophy commented Aug 7, 2024

works for me, thanks!

I can see the ipv6 options being removed from generated docker run command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants