From 29f340d3c03f9f2f49582f8ab0951e588c29d4d8 Mon Sep 17 00:00:00 2001 From: Albert Louis Rossi Date: Thu, 14 Sep 2023 09:03:31 -0500 Subject: [PATCH] dcache-qos,system-test: override db property to hsqldb Motivation: During system tests: ``` Unexpected error running Liquibase: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. ERROR - org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:69) at liquibase.integration.commandline.Main.doMigration(Main.java:884) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) ``` Neglected to override the new db properties for `qos-engine`. Modification: Added the override to the hsqlsdb properties. Result: No more stack trace/connection failure to postgresqls (?). Target: master Patch: https://rb.dcache.org/r/14099/ Requires-notes: no (unreleased) Acked-by: Svenja --- .../hsqldb/src/main/skel/hsqldb.properties | 2 ++ skel/share/defaults/qos-scanner.properties | 33 ------------------- skel/share/services/qos-scanner.batch | 3 -- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/plugins/hsqldb/src/main/skel/hsqldb.properties b/plugins/hsqldb/src/main/skel/hsqldb.properties index 575cefe592d..2b3fa4ab90f 100644 --- a/plugins/hsqldb/src/main/skel/hsqldb.properties +++ b/plugins/hsqldb/src/main/skel/hsqldb.properties @@ -42,3 +42,5 @@ qos.db.hikari-properties!maxLifetime = 0 qos-verifier.db.url=jdbc:hsqldb:file:${hsqldb.path}/${qos-verifier.db.name};shutdown=true;hsqldb.tx=mvcc;hsqldb.sqllog=3 qos-verifier.db.hikari-properties!maxLifetime = 0 +qos-engine.db.url=jdbc:hsqldb:file:${hsqldb.path}/${qos-engine.db.host};shutdown=true;hsqldb.tx=mvcc;hsqldb.sqllog=3 +qos-engine.db.hikari-properties!maxLifetime = 0 diff --git a/skel/share/defaults/qos-scanner.properties b/skel/share/defaults/qos-scanner.properties index 0b89d19407d..9f55aba5a7d 100644 --- a/skel/share/defaults/qos-scanner.properties +++ b/skel/share/defaults/qos-scanner.properties @@ -170,36 +170,3 @@ qos.limits.scanner.online-window=2 (one-of?MILLISECONDS|SECONDS|MINUTES|HOURS|DAYS)qos.limits.scanner.online-window.unit=DAYS qos.limits.scanner.qos-nearline-batch-size=500000 qos.limits.scanner.online-batch-size=200000 - -# ---- Configuration for scanner database connection pool --------------------------- -# -# The database connection pool reuses connections between successive -# database operations. By reusing connections dCache doesn't suffer -# the overhead of establishing new database connections for each -# operation. -# -# The options here determine how qos behaves as the number of concurrent -# requests fluctuates. -# --------------------------------------------------------------------------- -qos-scanner.db.connections.max=10 - -# ---- The minimum number of idle database connections. -# -qos-scanner.db.connections.idle=1 - -(prefix)qos-scanner.db.hikari-properties = Hikari-specific properties - -# ---- Database related settings reserved for internal use. -# -(immutable)qos-scanner.db.name=qos -qos-scanner.db.host=${dcache.db.host} -qos-scanner.db.user=${dcache.db.user} -qos-scanner.db.password=${dcache.db.password} -qos-scanner.db.password.file=${dcache.db.password.file} -qos-scanner.db.url=jdbc:postgresql://${qos-scanner.db.host}/${qos-scanner.db.name}?targetServerType=master -qos-scanner.db.schema.changelog=org/dcache/qos/model/db.changelog-master.xml -qos-scanner.db.schema.auto=${dcache.db.schema.auto} - -# ---- Used with listing of file operations. -# -qos-scanner.db.fetch-size=1000 \ No newline at end of file diff --git a/skel/share/services/qos-scanner.batch b/skel/share/services/qos-scanner.batch index fefcc930a03..ab285a39f26 100644 --- a/skel/share/services/qos-scanner.batch +++ b/skel/share/services/qos-scanner.batch @@ -9,9 +9,6 @@ check -strong qos.home check -strong qos.db.namespace.connections.max check -strong qos.db.namespace.connections.idle check -strong qos.db.namespace.fetch-size -check -strong qos-scanner.db.connections.max -check -strong qos-scanner.db.connections.idle -check -strong qos-scanner.db.fetch-size check -strong qos.plugins.storage-info-extractor check -strong qos.limits.scanner.submit-threads check -strong qos.limits.scanner.task-threads