From 223834a420f4e0f2a48585c9779b5d3e88220e6e Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 14 Nov 2022 16:03:14 +0200 Subject: [PATCH] Fix confusion between Postgres and pageserver connection string in test. We passed the pageserver's libpq endpoint URL as the 'compute_ctl --connstr' argument, but that was bogus: the --connstr URL is supposed to be the URL to the *Postgres* instance that compute_ctl launches and monitors, not to the pageserver. compute_ctl does need the pageserver URL too, but it is read from the cluster spec JSON, not --connstr. That was pretty confusing, as you got a lot of "unknown command" errors in the pageserver log, when compute_tools tries to run regular SQL commands on the pageserver. The test still passed, however, as it doesn't require the SQL commands to succeed. But to make this less confusing, use an invalid hostname instead, so that the queries will fail to even connect. --- test_runner/regress/test_compute_ctl.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test_runner/regress/test_compute_ctl.py b/test_runner/regress/test_compute_ctl.py index 01b64b8b17..1851aeed55 100644 --- a/test_runner/regress/test_compute_ctl.py +++ b/test_runner/regress/test_compute_ctl.py @@ -179,7 +179,16 @@ def test_sync_safekeepers_logs(neon_env_builder: NeonEnvBuilder, pg_bin: PgBin): # run compute_ctl and wait for 10s try: ctl.raw_cli( - ["--connstr", ps_connstr, "--pgdata", pgdata, "--spec", spec, "--pgbin", pg_bin_path], + [ + "--connstr", + "postgres://invalid/", + "--pgdata", + pgdata, + "--spec", + spec, + "--pgbin", + pg_bin_path, + ], timeout=10, ) except TimeoutExpired as exc: