[erlang-questions] Distributed erlang problem

Serge Aleynikov saleyn@REDACTED
Wed Mar 19 14:51:06 CET 2008


Chandru wrote:
> Or I can have an application on the DB nodes which ping the OMC node every
> minute or so. Which seems a bit of a bodge but the only real solution I have
> at the moment.

Indeed.

> Well - there is an issue. This is because on the OMC node, host1-rep is
> resolving to an IP address to which routing doesn't exist from the OMC (and
> I can't get it added). The Security team won't allow this connectivity.
> 
> But is there a reason why the node name should have the hostname in it?
> Can't we have an erlang node on a machine registering with any arbitrary
> name in epmd? There could be kernel configuration on other nodes which can
> specify the host for each node name. This will have the added benefit that
> an mnesia database backup can easily be ported across various sets of nodes
> without having to change the name of the nodes in the backup file (which is
> a bit of a hack).

It sounds like what you need is to resolve a host name to IP on OMC that 
  doesn't resolve using default resolution method.

What you can do is specify the {kernel, [{inetrc, CustomConfigFile}]} 
option that will customize the name resolution search path used by 
distributed Erlang.

The CustomConfigFile could contain:

{file, hosts, "/etc/hosts"}.
{file, resolv, "/etc/resolv.conf"}.
{lookup, [file, dns]}.
{host, IpAddress1, ["db1@REDACTED"]}.
{host, IpAddress2, ["db1@REDACTED"]}.

This should solve your issue.

Serge

> Chandru wrote:
>>> I am having a hard time figuring out how to get a few nodes to talk to
>> each
>>> other within certain rules. See figure below. Each box is a separate
>>> physical server. The small boxes inside each big box are LAN cards.
>>>
>>>   +------------------+        +------------------+
>>>   |               +--+        +--+               |
>>>   | db1@REDACTED |  |........|  | db1@REDACTED |
>>>   |               +--+        +--+               |
>>>   |    +-oam--+      |        |       +-oam-+    |
>>>   +----+--+---+------+        +-------+--+--+----+
>>>           |                              |
>>>           |                              |
>>>           |                              |
>>>           |                              |
>>>           |      +-------------------+   |
>>>           |      |                   |   |
>>>           |      |                   |   |
>>>           +------+       OMC         ....|
>>>                  |                   |
>>>                  |                   |
>>>                  +-------------------+
>>>
>>>
>>> I've got two database nodes on two hosts, each of which have two LAN
>> cards.
>>> One set of LAN cards are called the replication interfaces; they connect
>> via
>>> a special LAN which is very low latency and high bandwidth. This is used
>> for
>>> mnesia replication. To enable this, I start the DB nodes with the -sname
>>> parameter set to 'db1@REDACTED'.
>>>
>>> Now there is a separate OMC node which should talk to the DB nodes via
>>> distributed erlang on another set of interfaces. The problem is that the
>>> 'host1-rep' interface is not reachable from the OMC host (due to
>> security
>>> issues). Only the 'host1-oam' interface is reachable. But, on the OMC
>> node,
>>> 'db1@REDACTED' is an unknown node.
>>>
>>> It seems that I need a feature where an erlang node on a machine can be
>>> reached via multiple  names, such as 'db1@REDACTED', 'db1@REDACTED', '
>>> db1@REDACTED, but I doubt this capability exists.
>>>
>>> Any suggestions? Anyone else had similar issues to deal with?
>>>
>>> regards,
>>> Chandru
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
> 




More information about the erlang-questions mailing list