emqx
emqx copied to clipboard
fix: cluster/local-override.conf does not take effect at vm.args/app.config
Config changes such as log levels etc can be applied from dashboard in realtime. However due to the sys.config (or app.config) generation did not take cluster-override (nor local-override) into account. such config change are not persisted.
This PR tries to include both cluster and local overrides into config generation stage.
- [x] Verify space is allowed in data_dir config (and env override)
- [ ] Fix
emqx.cmd
for Windows
Pull Request Test Coverage Report for Build 3049662246
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 33 unchanged lines in 12 files lost coverage.
- Overall coverage decreased (-0.03%) to 77.361%
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
apps/emqx_conf/src/emqx_conf_schema.erl | 1 | 92.31% |
apps/emqx_dashboard/src/emqx_dashboard_monitor.erl | 1 | 69.44% |
apps/emqx/src/emqx_broker.erl | 1 | 81.87% |
apps/emqx/src/emqx_cm.erl | 1 | 88.99% |
apps/emqx/src/emqx_limiter/src/emqx_limiter_schema.erl | 1 | 85.92% |
apps/emqx/src/emqx_logger_textfmt.erl | 1 | 47.37% |
apps/emqx/src/emqx_message.erl | 1 | 94.12% |
apps/emqx/src/emqx_router_utils.erl | 1 | 60.47% |
apps/emqx_gateway/src/mqttsn/emqx_sn_frame.erl | 2 | 64.04% |
apps/emqx/src/persistent_session/emqx_persistent_session.erl | 2 | 93.01% |
<!-- | Total: | 33 |
Totals | |
---|---|
Change from base Build 3049512272: | -0.03% |
Covered Lines: | 20626 |
Relevant Lines: | 26662 |
💛 - Coveralls
fix emqx.cmd for windows too. also: test space in data dir.
/data1/test good/
is ok.
I'm not familiar with cmd on windows, I don't have a windows environment to debug, maybe find someone to help this out.
will fix windows in another PR.
as discussed. we will need to fix it in a different approach. the hocon_cli is not quite helpful in this case. we'll need to perform config generation just like how emqx_config:init_load does:
- load base config (
emqx.conf
+ merge envs) - read
data_dir
from loaded base config, so we know where the{cluster|loca}-override.conf
files are, and also know to generate theapp.<time>.config
file. - apply
cluster-overrides.conf
+local-overrides.conf
on top of the base config - generate app.