Patch for Erlang in Jails

tom at diogunix.com tom at diogunix.com
Fri Nov 19 00:51:34 UTC 2010


/usr/ports/lang/erlang
/usr/ports/lang/erlang-lite


Hello Olgeni, Ashish, Port maintainers,

through a couple of tests I found out that Erlang 14B as currently in the 
Ports Collection and therefor also built when building the most popular 
Erlang program (ejabberd) can't run in a FreeBSD Jail as it collides with 
the localhost specialities of Jails.

Reason: 
In Erlang 14B a new check was introduced for the communication of the empd 
daemon with the host. As this check currently is not configurable, no 
current Erlang will run in a Jail - as a follow-up too effecting all Erlang 
programs of course.

Thanks to Michael from the Erlang mailing list (see CC), it seems a solution 
came up to run Erlang 14B in a Jail. 

A few minutes ago, Michael provided a quick patch for Erlang 14B to disable 
the check metnioned above.

Here's his quick patch:

> diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
> index ef471a4..e2cc2dc 100644
> --- a/erts/epmd/src/epmd_srv.c
> +++ b/erts/epmd/src/epmd_srv.c
> @@ -766,6 +766,9 @@ static int conn_open(EpmdVars *g,int fd)
>        dbg_tty_printf(g,2,(s->local_peer) ? "Local peer connected" :
>                    "Non-local peer connected");
> 
> +      /* XXX allow local messages from all clients */
> +      s->local_peer = EPMD_TRUE;
> +
>        s->want = 0;           /* Currently unknown */
>        s->got  = 0;
>        s->mod_time = current_time(g); /* Note activity */

Michael also announced to make a better patch in a few days. Also the Erlang 
folks might offer a future option to disable the check or provide another 
possibility to properly run Erlang and Erlang programs (such as ejabberd) in 
a Jail.

I'm not sure on how to deal with this. 
I just thought you should know about what's going on.

Hope this helps.

kind regards
Tom


More information about the freebsd-ports mailing list