pageserver: consistent validation of tenant conf #5300
Labels
a/tech_debt
Area: related to tech debt
c/storage/pageserver
Component: storage: pageserver
m/good_first_issue
Moment: when doing your first Neon contributions
The pageserver gets tenant configs into memory three ways:
TenantConf
that is part ofPageServerConf
, loaded frompageserver.conf
during startupTenantConfOpt
that is saved to disk for each tenant, and loaded on subsequent startupsTenantConfOpt
.TOML is serde compatible, but we have a bunch of hand-rolled code in
parse_toml_tenant_conf
that mainly exists to provide nicer errors than serde would give, if something invalid is in the config. This is useful for files that are liable to be edited like a human, likepageserver.conf
.That specialized loading code is only used in cases 1 & 2. In case 3, when we receive an API call relating to configuration, it is not used: a caller would get a serde-style error if they provide something invalid. In case 2, we may stop using the special loading code as well (see #5299), since the data we save per tenant has already passed through an API call and deserialized successfully there.
All this is kind of messy. We should:
The text was updated successfully, but these errors were encountered: