Commit Graph

17 Commits

Author SHA1 Message Date
JimMoen 72eb34658d
style: erlfmt all remaining escripts 2023-11-08 11:51:10 +08:00
Zaiming (Stone) Shi e7b8df6ba9 chore(bin/emqx): hide upgrade/downgrade from usage info 2023-01-31 13:09:46 +01:00
Thales Macedo Garitezi 465e73cac0 feat: deny upgrades for now 2022-12-27 13:10:12 -03:00
Thales Macedo Garitezi 86a4010b8d refactor(review): use `lists:flatten/1` 2022-12-27 11:14:57 -03:00
Thales Macedo Garitezi 7c6bb63ce9 feat(upgrade): add forward version check for upgrade script
https://emqx.atlassian.net/browse/EMQX-6978

[Related EIP](c4864eeccb/active/0022-forward-check-install-upgrade-script.md)

Currently, when performing a hot upgrade, the scripts that are run are
those from the currently installed EMQX version. It has a validation
that prevents upgrade between different minor versions. If we want to
allow an upgrade from, say, 5.0.x to 5.1.y, then the scripts in
already released packages will deny such operation. Also, if an
upgrade installation script contains a bug in the current, it will
never be able to execute properly without manual patching.

By attempting to execute the scripts from the target version, we may
add fixes and new validations to new EMQX versions and have them
executed by older versions.
2022-12-23 17:50:33 -03:00
Shawn b9a9da3208 fix(relup): improve the error code and log messages 2022-05-25 10:58:06 +08:00
Shawn f036a946a8 fix: only support .tar.gz files when hot upgrade 2022-05-25 01:59:52 +08:00
Shawn b942fde836 fix: porting the install_upgrade.escript from v4.4 2022-05-24 15:05:08 +08:00
Zaiming (Stone) Shi 05af1874aa chore: ensure remsh prefix for remote nodes
for remsh prefixed nodes, ekka pick a random port to listen on
instead of following the conventional port mapping rule:
ekka listens on 4370 for emqx or emqx0 and 4371 for emqx1 and so on
2022-02-20 19:47:23 +01:00
Zaiming (Stone) Shi 1abac892c9 refactor: install_upgrade script no need to re-pack
OTP release handler only works with .tar.gz
as a result, we had to unpack .zip and re-pack .tar.gz
just to make OTP happy.

Now since we will be building .tar.gz packages
there is no need for this re-pack step anymore
2022-01-13 18:54:01 +01:00
Thales Macedo Garitezi c70a47bba6
refactor(mix): undo the `bin/emqx` script split into helper files 2021-12-30 13:45:13 -03:00
Thales Macedo Garitezi 0020cf592f
Merge remote-tracking branch 'origin/master' into build-with-mix-mkII 2021-12-28 11:28:40 -03:00
Thales Macedo Garitezi 5c615e583f
fix(install_upgrade): remove `cuttlefish` reference
This file is not present in the current release anymore.
2021-12-28 09:09:21 -03:00
Thales Macedo Garitezi dd36bef3bb
fix(install_upgrade): remove `vm_args` backup in `install`
The `install_upgrade.escript` depended on being able to retrieve the
`vm_args` argument from `init`, but that options has been removed
recently.  Since this backup was unused, we also remove it here.
2021-12-28 09:07:40 -03:00
Thales Macedo Garitezi 360a00622b
chore(mix): copy more files required by relup 2021-12-27 16:07:38 -03:00
Shawn e8cb8a3aa4 fix(relup): configs for plugins are missing after relup 2021-11-10 09:32:49 +08:00
terry-xiaoyu 151d820058 feature(project): change to rebar3 umbrella project 2020-10-31 11:07:25 +08:00