Ensure the driver can connect when invalid peer hosts are in system.peers

Description

In a k8s env (or other cloud), it is possible that some host entries in system.peers are invalid. e.g. rpc_address and/or host_id nulled.

In those cases, the endpoint creation fails and raise an exception. The good behavior would be to simply ignore those invalid hosts. The metadata topology monitor should be responsible for checking the host row validity.

Environment

None

Pull Requests

None

Activity

Show:
Alan Boudreault
August 13, 2020, 10:46 AM
Alan Boudreault
September 10, 2020, 2:45 PM

The same logic than the java driver should be applied for this need. If one of the following fields are null, log a warning and ignore the discovered node: rpc_address, host_id, data_center, rack and tokens.

Mateusz Zakarczemny
October 22, 2020, 9:41 AM

What about other fields from system.peer? (See JAVA-852)

Alan Boudreault
October 22, 2020, 12:46 PM

This is indeed what was implemented. https://github.com/datastax/python-driver/pull/1092

Mateusz Zakarczemny
October 22, 2020, 1:43 PM

Cool thanks. I missed that PR.

Fixed

Assignee

Alan Boudreault

Reporter

Alan Boudreault

Fix versions

Labels

None

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Priority

Major
Configure