Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cluster/local-override.conf does not take effect at vm.args/app.config #8895

Closed
wants to merge 6 commits into from

Conversation

zhongwencool
Copy link
Member

@zhongwencool zhongwencool commented Sep 5, 2022

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.

  • Verify space is allowed in data_dir config (and env override)

Fix emqx.cmd for Windows in another PR.

@coveralls
Copy link
Collaborator

coveralls commented Sep 5, 2022

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%
Totals Coverage Status
Change from base Build 3049512272: -0.03%
Covered Lines: 20626
Relevant Lines: 26662

💛 - Coveralls

Copy link
Member

@zmstone zmstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix emqx.cmd for windows too.
also: test space in data dir.

bin/emqx Outdated Show resolved Hide resolved
bin/emqx Outdated Show resolved Hide resolved
bin/emqx Outdated Show resolved Hide resolved
@zhongwencool
Copy link
Member Author

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.

@zmstone
Copy link
Member

zmstone commented Sep 15, 2022

will fix windows in another PR.

CHANGES-5.0.md Outdated Show resolved Hide resolved
bin/emqx Outdated Show resolved Hide resolved
@zhongwencool zhongwencool force-pushed the fix-override-conf branch 2 times, most recently from 902b75c to ecdd6b0 Compare December 27, 2022 02:00
@zmstone
Copy link
Member

zmstone commented Dec 27, 2022

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:

  1. load base config (emqx.conf + merge envs)
  2. read data_dir from loaded base config, so we know where the {cluster|loca}-override.conf files are, and also know to generate the app.<time>.config file.
  3. applycluster-overrides.conf + local-overrides.conf on top of the base config
  4. generate app..config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants