Project

General

Profile

Actions

Bug #15273

closed

[API] accept lowercase postgresql connection params

Added by Tom Clegg over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Story points:
-

Description

In #13996 apiserver started getting its database config from the cluster config file (Clusters.zzzzz.PostgreSQL.Connection.*).

However, it tries to use mixed-case keys like "DBName", instead of the lowercase keys like "dbname" that admins have been instructed to use in their config files. Mixed- and lower-case keys don't get merged properly, so existing config files don't work.

Propose to fix this by using lowercase keys in the apiserver code and example config.

(These keyvalues are intended to be sent directly to postgresql, whose docs write them in lowercase with no mention of automatic case flattening.)


Related issues 1 (0 open1 closed)

Related to Arvados - Idea #13996: [API] Migrate RailsAPI to new cluster config fileResolvedPeter Amstutz03/26/2019Actions
Actions #2

Updated by Tom Clegg over 5 years ago

  • Related to Idea #13996: [API] Migrate RailsAPI to new cluster config file added
Actions #3

Updated by Tom Clegg over 5 years ago

15273-db-conn-keys @ 505fc33ba2c04462bcb7ae6a4d163c1163b97f1e -- https://ci.curoverse.com/view/Developer/job/developer-run-tests/1255/

Also fixes a typo (looks like apiserver was not paying attention to Port/port param due to typo "Post")

Actions #4

Updated by Tom Clegg over 5 years ago

  • Description updated (diff)
Actions #5

Updated by Peter Amstutz over 5 years ago

Tom Clegg wrote:

15273-db-conn-keys @ 505fc33ba2c04462bcb7ae6a4d163c1163b97f1e -- https://ci.curoverse.com/view/Developer/job/developer-run-tests/1255/

Also fixes a typo (looks like apiserver was not paying attention to Port/port param due to typo "Post")

The way the API server constructs the connection URL, it doesn't really care about the capitalization of the keys. If this makes other code that connects to the database work more consistently, LGTM.

Actions #6

Updated by Tom Clegg over 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF