From 5b7f176c1d52cfd9faa7d9ad182e638fbd5b6562 Mon Sep 17 00:00:00 2001 From: yixingj Date: Wed, 28 Mar 2018 16:00:53 +0800 Subject: [PATCH] Add dbname paramter in dburl add dbname to dburl --- make/common/templates/clair/config.yaml | 2 +- make/prepare | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/make/common/templates/clair/config.yaml b/make/common/templates/clair/config.yaml index c5219afd0..aaca46bc2 100644 --- a/make/common/templates/clair/config.yaml +++ b/make/common/templates/clair/config.yaml @@ -2,7 +2,7 @@ clair: database: type: pgsql options: - source: postgresql://$username:$password@$host:$port?sslmode=disable + source: postgresql://$username:$password@$host:$port/$dbname?sslmode=disable # Number of elements kept in the cache # Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database. diff --git a/make/prepare b/make/prepare index 6dd2742cd..60dcccc67 100755 --- a/make/prepare +++ b/make/prepare @@ -565,8 +565,10 @@ if args.clair_mode: password = clair_db_password, username = clair_db_username, host = clair_db_host, - port = clair_db_port) - # config http proxy for Clair + port = clair_db_port, + dbname = clair_db) + +# config http proxy for Clair http_proxy = rcp.get("configuration", "http_proxy").strip() https_proxy = rcp.get("configuration", "https_proxy").strip() no_proxy = rcp.get("configuration", "no_proxy").strip()