Skip to content

API server crashes due to config file parsing failure. #1793

@sitaowang1998

Description

@sitaowang1998

Bug

Symptom

Running the API server in k8s helm setup fails, with the following message:

Error: Config file /etc/clp-config.yaml does not exist

Caused by:
    0: `serde_yaml::Error`: database.name: invalid type: map, expected a string at line 32 column 5
    1: database.name: invalid type: map, expected a string at line 32 column 5

Analysis

  1. I think /etc/clp-config.yaml does not exist is a misleading message. The file actually exists, but the parsing fails.
  2. The root cause is that feat(clp-package)!: Add Spider config interfaces; Integrate Spider compression orchestration into the Docker Compose project. #1606 introduced breaking change in the config interface, i.e. database.name string changes to database.names map to support multiple database names. However, the clp_config::package::config::Config::Database in clp-rust-utils, and the subsequently uses of the class, is still using the old format.

Fix

  1. Fix the error message.
  2. Change the Database struct in clp-rust-utils, and the uses of it.

CLP version

junhaoliao@7447430

Environment

Ubuntu 22.04 host, helm char dev branch. I haven't tried it with existing docker compose workflow in main branch, but I think it contains the same bug.

Reproduction steps

Run test.sh in the tools/deployment/package-helm.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions