Re: erl_call -q

Bogdan Andu <[email protected]> Tue, 29 Mar 2022 16:37:13 +0300
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAP7yTnzQbAejhXxGf_Bp9X0ZzVk7kS_xKW4zc5QUX=GNyZOkvA@mail.gmail.com>
--0000000000006e296b05db5b8742
Content-Type: text/plain; charset="UTF-8"

But this defeats the purpose of NOT having a dedicated node to run a
dedicated module
to just stop nodes. Really? I was expecting this 'solution'.
C'mon man, this is erlang we are talking about!

It could do better than this!




On Tue, Mar 29, 2022 at 4:27 PM Luke Bakken <[email protected]> wrote:

> At this point I would put together a small module, and use -s or -eval
> to run the code. erlc is right there!
>
> On Tue, Mar 29, 2022 at 6:26 AM Bogdan Andu <[email protected]> wrote:
> >
> > I know erl -eval, but elixir --rpc-eval gives the error also, like this:
> > --rpc-eval : RPC failed with reason :nodedown
> > while erl -eval is silent about errors like node down which is very
> important.
> >
> > May be a try catch would do the trick but already is too much to pass to
> eval.
> >
> > On Tue, Mar 29, 2022 at 3:57 PM Luke Bakken <[email protected]> wrote:
> >>
> >> Give "-eval" a try instead.
> >>
> >> On Tue, Mar 29, 2022 at 5:40 AM Bogdan Andu <[email protected]> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I tried that before like this:
> >> > $ erl -setcookie proxy -proto_dist inet_tls -ssl_dist_optfile
> file_with_pem -name 'stop-node@host' -s rpc call target-node@host init
> stop []
> >> > Erlang/OTP 24 [erts-12.3] [source] [64-bit] [smp:4:4] [ds:4:4:10]
> [async-threads:1]
>

--0000000000006e296b05db5b8742
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>But this <span class=3D"gmail-sb-0"><span class=3D"gm=
ail-dt"><span class=3D"ex-sent gmail-first-child gmail-t gmail-no-aq gmail-=
sents"><span class=3D"gmail-mw_t_it">defeats the purpose</span><em class=3D=
"gmail-mw_t_it"> </em><span class=3D"gmail-mw_t_it">of</span> NOT having a =
dedicated node to run a dedicated module</span></span></span></div><div><sp=
an class=3D"gmail-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sent gma=
il-first-child gmail-t gmail-no-aq gmail-sents">to just stop nodes. Really?=
 I was expecting this &#39;solution&#39;.<br></span></span></span></div><di=
v><span class=3D"gmail-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sen=
t gmail-first-child gmail-t gmail-no-aq gmail-sents">C&#39;mon man, this is=
 erlang we are talking about!<br></span></span></span></div><div><span clas=
s=3D"gmail-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sent gmail-firs=
t-child gmail-t gmail-no-aq gmail-sents"><br></span></span></span></div><di=
v><span class=3D"gmail-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sen=
t gmail-first-child gmail-t gmail-no-aq gmail-sents">It could do better tha=
n this!<br></span></span></span></div><div><span class=3D"gmail-sb-0"><span=
 class=3D"gmail-dt"><span class=3D"ex-sent gmail-first-child gmail-t gmail-=
no-aq gmail-sents"><br></span></span></span></div><div><span class=3D"gmail=
-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sent gmail-first-child gm=
ail-t gmail-no-aq gmail-sents"><br></span></span></span></div><div><span cl=
ass=3D"gmail-sb-0"><span class=3D"gmail-dt"><span class=3D"ex-sent gmail-fi=
rst-child gmail-t gmail-no-aq gmail-sents"><br> </span></span></span></div>=
</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">=
On Tue, Mar 29, 2022 at 4:27 PM Luke Bakken &lt;<a href=3D"mailto:luke@bakk=
en.io">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex">At this point I would put together a small module, and=
 use -s or -eval<br>
to run the code. erlc is right there!<br>
<br>
On Tue, Mar 29, 2022 at 6:26 AM Bogdan Andu &lt;<a href=3D"mailto:bog495@gm=
ail.com" target=3D"_blank">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; I know erl -eval, but elixir --rpc-eval gives the error also, like thi=
s:<br>
&gt; --rpc-eval : RPC failed with reason :nodedown<br>
&gt; while erl -eval is silent about errors like node down which is very im=
portant.<br>
&gt;<br>
&gt; May be a try catch would do the trick but already is too much to pass =
to eval.<br>
&gt;<br>
&gt; On Tue, Mar 29, 2022 at 3:57 PM Luke Bakken &lt;<a href=3D"mailto:luke=
@bakken.io" target=3D"_blank">[email protected]</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Give &quot;-eval&quot; a try instead.<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Mar 29, 2022 at 5:40 AM Bogdan Andu &lt;<a href=3D"mailto:=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I tried that before like this:<br>
&gt;&gt; &gt; $ erl -setcookie proxy -proto_dist inet_tls -ssl_dist_optfile=
 file_with_pem -name &#39;stop-node@host&#39; -s rpc call target-node@host =
init stop []<br>
&gt;&gt; &gt; Erlang/OTP 24 [erts-12.3] [source] [64-bit] [smp:4:4] [ds:4:4=
:10] [async-threads:1]<br>
</blockquote></div>

--0000000000006e296b05db5b8742--