-
Notifications
You must be signed in to change notification settings - Fork 648
Description
The Datastore emulator supports-- and automatically use sometimes-- IPv6 addresses (https://cloud.google.com/sdk/gcloud/reference/beta/emulators/datastore/start). Our code has only been parsing input such as "localhost:8081", which is still the default emulator address format. However, if you start a second emulator, or just define the address yourself, it can be IPv6.
So, this is a two part issue.
-
Our code needs to figure out how to handle these addresses. This will definitely involve changes to our code, and possibly to the generated client code or gax as well. That code automatically concatenates
servicePathandport, but IPv6 is a bit different. We might be able to get creative with parsing the IPv6 to work around that, e.g.options.servicePath = '[::1:8244]'andoptions.port = ??. -
I can't seem to get gRPC to send requests to the IPv6 address. Here are the settings our client passes and then the response.
{ libName: 'gccl',
libVersion: '4.3.0',
scopes:
[ 'https://www.googleapis.com/auth/cloud-platform',
'https://www.googleapis.com/auth/datastore' ],
servicePath: '[::1:8244]',
port: 443,
projectId: undefined }
{ Error: Deadline exceeded
at Http2CallStream.call.on (/Users/stephen/dev/nodejs-datastore/node_modules/@grpc/grpc-js/build/src/client.js:96:45)
at Http2CallStream.emit (events.js:194:15)
at process.nextTick (/Users/stephen/dev/nodejs-datastore/node_modules/@grpc/grpc-js/build/src/call-stream.js:71:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 4,
details: 'Deadline exceeded',
metadata: Metadata { options: undefined, internalRepr: Map {} } }The emulator readout doesn't change, so it's not being hit.
- Is there a default emulator port for these addresses?
- Can gRPC handle directly pinging IPv6 addresses?
- Is there a strict format we should be following?
- Do we use
http://? - Does the IP have to be wrapped within brackets?
- Is a specific port required?
- Do we use
I've tried all of the combinations I can think of, and it's either "Invalid URL: http://::1:8244" or a Deadline Exceeded error.
