erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

shell script updates #775

Closed tsloughter closed 4 years ago

tsloughter commented 4 years ago

These commits include linting of the shell scripts that come with relx and the removal of nodetool and its replacement with erl_call.

The main possible issue with removing nodetool and instead using erl_call for communicating with the running node is that only in 23+ does erl_call have the ability to ignore epmd and connect to a node based on address:port (will be adding a way to use that option shortly and include it in this PR).

But, I don't think there is much use of this yet, most people continue to use epmd, so I don't think it is something that should force us to keep dual scripts and continue bundling nodetool.

tsloughter commented 4 years ago

Just realized there is an unused test os_var_timeouts in rlx_extended_bin_SUITE. I would have broken it if it were enabled.

tsloughter commented 4 years ago

@ferd could you run the tests on osx? I can't get output from cirrus to say why they are failing/running forever.

ferd commented 4 years ago

I'm getting it hanging on rlx_extended_bin_SUITE:extension_script/1:

Assembling release foo-0.0.1
Including Erts from /Users/ferd/bin/erls/22.0
Warnings generating release:
*WARNING* Missing application sasl. Can not upgrade with this release
release start script created

And nothing moves on from there. Seems to be stuck in one of these calls:

image

tsloughter commented 4 years ago

Hm, the sleep 1 means maybe it is the new lines I added after start but before the start hooks run:

        # wait for node to be up before running hooks
        while ! erl_call 'erlang is_alive' > /dev/null 2>&1
        do
            sleep 1
        done
tsloughter commented 4 years ago

replaced by https://github.com/erlware/relx/pull/779