Closed phvalguima closed 5 months ago
I believe we need to relax this section of data_interfaces: https://github.com/canonical/data-platform-libs/blob/306fa90aa77f31c9c5259b5dcb6e53844a355abf/lib/charms/data_platform_libs/v0/data_interfaces.py#L2377
To truly resolve this issue.
The method
_use_external_connection
should only resolve to False if: (1) the config option is set to False; or (2) the relation is not done via CMR. In any other case, it must raise an exception to be caught by RelationManager and abandon that event.The main reason is because
database_requested
event happens once on the Provider side, and this event reports if the requirer needs to be exposed (i.e. external-node-connectivity=True) or not.Therefore, we should only publish the database name on the relation databag once the sysbench spotted the first unit in the remote end and can correctly decide if we are dealing with a CMR or not.