rpc: Ensure status.Endpoints[0] is not an IPv6 endpoint if possible.

https://vanadium-review.googlesource.com/#/c/22654/ and
https://vanadium-review.googlesource.com/#/c/22657/
intentionally removed code that filtered out IPv6 addresses when
possible because we intend for devices that can communicate to do so,
and hiding addresses is problematic for that.

However, it seems that those changes caused continuous integration
test failures when the tests were run in Kubernets on Google Compute
Engine (GCE). For example, you would see error messages like:

dial tcp [fe80::42:aff:fe44:806]:55852: connect: invalid argument]

which is because GCE doesn't support IPv6 addresses
(https://cloud.google.com/compute/docs/networking)
but Kubernetes containers seem to contain interfaces with
the IPv6 link-local address, causing confusion.

This behavior occurs because various tests dial a single
endpoint for the server (rpc.Server.Status().Endpoints[0]).
The hack fix for now is to always re-order Endpoints so that
the first one isn't an IPv6 one if possible.

Change-Id: Ia07c95e9bfc5d6698eff84e7b7e7e27b4be018b3
1 file changed
tree: 811ab551819cfc00888234b22de2baac6b7e4919
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.