[erlang-bugs] release_handler error in upgrading slim release

Siri Hansen <>
Mon Nov 25 12:01:12 CET 2013


Hi Shino,

release_handler is not explicitly "slim-release aware", since this is a
reltool mechanism. (And also, it is only experimental.)
I think, however, that you can solve your problem by unpacking your tar
file manually and then using release_handler:set_unpacked/2 instead of
release_handler:unpack_release/1.

/siri


2013/11/5 Shunichi Shinohara <>

> I try to make rebar work with slim release at
> https://github.com/rebar/rebar/pull/52 .
> Almost all goes well, but in upgrading in slim release environment
> an error occurs and fails. (R16B02, Linux)
>
> To simplify step to reproduce, I created repository which has
> rebar binary and some configuration files.
> https://github.com/shino/slim-upgrade-sample
>
> Steps to reproduce:
> 0. Clone the repository and cd to it.
>    git clone https://github.com/shino/slim-upgrade-sample.git
> 1. Generate version 1 and 2 of releases and upgrade package between
>    them. The script generate.sh in the repo does this work.
> 2. Boot the node with release version 1 and try to unpack the upgrade
>    package.
> 3. The following error occurs.
>   > release_handler:unpack_release("sample_2").
>   {error,{enoent,
>
>  "/opt/shino/scm/slim-upgrade-sample/sample/rel/sample_1/releases/sample_2.rel"}}
>
> "/opt/shino/scm/slim-upgrade-sample/sample/rel/sample_1/" is root directory
> of slim release generated by reltool.
> The file "sample_2.rel" which release_handler complains not-found goes
> under the "releases" directory of Erlang/OTP which execute the node.
> Quick look of source code, release_handler seems to assume "releases"
> directory
> exists just under root directory (it's appropriate for normal,
> non-slim release).
>
> - extract_rel_file/2: Extract rel file in tar ball under root directory.
>
> https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L835
> - check_rel/3,4: Try rel file under releases directory of slim release.
>
> https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L836
>
> P.S.
> Sorry that steps to reproduce contain non-OTP, rebar related things.
> I hope rebar is not related the error because of release_handler's code
> above.
>
> Best Regards,
> Shino
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20131125/122b4320/attachment.html>


More information about the erlang-bugs mailing list