[erlang-questions] Escript and hidden nodes

Lev Walkin vlm@REDACTED
Fri Dec 7 09:23:55 CET 2007


Ulf, there's no net_kernel:hidden_connect() in the
net_kernel manual page. Moreover, the source code
lists hidden_connect() and hidden_connect_node()
as two possible variants, both exported. Which
one do you recommend?

Ulf Wiger wrote:
> Not having tried, I would guess you should use
> net_kernel:hidden_connect(Node) instead of using rpc:call()
> set up the connection automatically.
> 
> BR,
> Ulf W
> 
> 2007/12/7, Lev Walkin <vlm@REDACTED>:
>> Hi,
>>
>> erl has an option flag -hidden:
>>
>>    Hidden nodes always establish hidden  con-
>>    nections  to  all other nodes except for nodes in the same global
>>    group. Hidden connections are not published  on  neither  of  the
>>    connected  nodes, i.e. neither of the connected nodes are part of
>>    the result from nodes/0 on the other node.
>>
>> I have a maintenance code which is getting run through escript:
>>
>>         #!/usr/local/bin/escript
>>         main(_) ->
>>                 net_kernel:start(['code-update', shortnames]),
>>                 Node = ...
>>                 rpc:call(Node, code, purge, [...]).
>>
>> Hovewer, this code causes the remote node to be aware of this
>> maintenance script since it is getting reflected in its nodes()
>> output. Moreover, the remote node receiving these maintenance
>> operations attempts to create a back-channel to this maintenance
>> script node, which is undesirable since maintenance script
>> might be running on a private NAT'd network and can't receive
>> backwards connection from a maintained system.
>>
>> My question is how to enable hidden operation of such maintenance
>> scripts, either through a command line option to escript or
>> some magic parameter to net_kernel:start()?
>>
>> --
>> Lev Walkin
>> vlm@REDACTED
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>




More information about the erlang-questions mailing list