Bug #15273
closed[API] accept lowercase postgresql connection params
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.)
Updated by Tom Clegg over 5 years ago
- Related to Idea #13996: [API] Migrate RailsAPI to new cluster config file added
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")
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.
Updated by Tom Clegg over 5 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|da266d025f557cdd392d750ef0ff4b58d3757251.