fix(config-repl): conf_save_config() must use workdir/name not workdir
load_primary_config() reads from workdir/name/conf — conf_save_config() was writing to workdir/conf. Latent bug: would have corrupted upgrade restart cycle once Task 11 wired the upgrade path. Update all conf_read_current_filename, conf_get_saved_tag, and conf_check_stale calls in the test suite to use the corrected effective_dir (workdir/name) path structure. Add new test test_conf_save_config_path_consistency that explicitly verifies the written path matches what load_primary_config() reads.
This commit is contained in:
parent
86fe35e671
commit
2ed7e34e25
3 changed files with 96 additions and 16 deletions
|
|
@ -255,6 +255,8 @@ running identical configs without parsing any binary content.
|
|||
|
||||
### 3.2 Write procedure (standby receiving new config)
|
||||
|
||||
**`effective_dir`** throughout this section denotes `${workdir}/${name}` — the controller instance's base directory. All conf/ paths are relative to it.
|
||||
|
||||
```c
|
||||
// 0. Ensure conf/ directory exists with restrictive permissions
|
||||
snprintf(conf_dir, ..., "%s/conf", effective_dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue