Skip to content

Conversation

@voidzcy
Copy link
Contributor

@voidzcy voidzcy commented Dec 5, 2019

In the future, the xDS bootstrap may provides multiple xDS server, with each has its own server URI and channel credential configurations. gRPC client will try to connect to them one by one until found the first reachable one. For now, we only support using the first one.

In this PR:

  • Changed the logic of parsing bootstrap file, including the format of data returned to gRPC client.
  • Reformated JSON strings in bootstrap related tests.
  • Added a couple of test cases for parsing bootstrap file.
  • Changed constructor for XdsClientIImpl to take in a list of management servers.

@voidzcy voidzcy requested a review from dapengzhang0 December 5, 2019 21:35
@voidzcy voidzcy marked this pull request as ready for review December 5, 2019 21:35

/**
* Returns the URI the traffic director to be connected to.
* Returns the list of connection configurations for traffic directors to be connected to.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection configurations is too specific, and is only true for the current user. Should be xDS server information

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "Returns the list of xDS servers to be connected to.". General enough.

throw new IOException("Invalid bootstrap: 'channel_creds' contains unknown type.");
List<Map<String, ?>> serverConfigList = JsonUtil.checkObjectList(rawServerConfigs);
for (Map<String, ?> serverConfig : serverConfigList) {
// Field "server_uri" is required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is redundant. The throwing exception is self-explaining.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted.

@voidzcy voidzcy merged commit d168632 into grpc:master Dec 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants