Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: fix TestAuthenticationAndHBARules stress tests SSL issue
informs cockroachdb#131532 informs cockroachdb#131110 informs cockroachdb#130253 informs cockroachdb#127745 Epic CRDB-41958 TestAuthenticationAndHBARules fails for `special_cases`, `hba_default_equivalence`, `empty_hba` data driven tests for secure mode. The failures occur when root user is trying to authenticate with cert-password auth method and `sslmode` is set to `verify-ca` with `sslcert` being empty. The expected behavior is root authentication defaults to password method and fails as no password is set for root, but instead we get: ``` SSL is not enabled on the server ``` Since the failures are there only under stress, it might be because db server shutdown or paused before responding to request for upgrade connection to SSL from lib/pq client from here https://github.com/lib/pq/blob/3d613208bca2e74f2a20e04126ed30bcb5c4cc27/conn.go#L1116-L1130. Retrying connection establishment when this specific error is obtained might fix the problem as this logic seems faulty(it checks for absence of 'S' in server response whereas the correct check should be for 'N' in response). Release note: None
- Loading branch information