erlangupgradeerlang-otprebar3

upgrade of erlang applications based on relup by rebar3


I am studying the upgrade of erlang applications based on this article.

But there is some problem when I execute rebar3 relup:

Option --relname is missing

hello@centos7-dev:~/relapp1 ((1.0.12))$ rebar3 relup
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling relapp
Solving Release relapp-1.0.12Resolved relapp-1.0.12release: relapp-1.0.12
     erts: 13.0.4
     goals:
          relapp
          parse_trans
          sasl
     applications:
          {kernel,"8.4.2"}
          {stdlib,"4.0.1"}
          {syntax_tools,"3.0"}
          {parse_trans,"3.0.0"}
          {relapp,"1.0.12"}
          {sasl,"4.2"}
......
....relapp1/_build/default/rel/relapp/lib/sasl-4.2/ebin/sasl.apprelease start script createdRelease successfully assembled: 
_build/default/rel/relapp===> Option --relname is missing

The environments are as follows:

Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Eshell V13.0.4  (abort with ^G)
rebar 3.20.0 on Erlang/OTP 25 Erts 13.0.4

Solution

  • After many times of retry and experiment, I found it in this article.

    Hot code reloading with Erlang and Rebar3

    The answer is such as:

    rebar3 relup -n nine9s -v "0.2.0" -u "0.1.0"
    

    However, there are some issues which need attention.

    1. The rebar.config file

      You should replace the default options {mode, dev} with {dev_mode, false}

    2. the *.appup.src

      You cannot include the point_of_no_return option in this file, otherwise there will be some problem such as:

      No release upgrade script entry for xxxx-0.2.0 to xxxx-0.1.0 in file