[erlang-questions] Escript and hidden nodes

Lev Walkin <>
Fri Dec 7 07:50:36 CET 2007


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




More information about the erlang-questions mailing list