]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
include mx nodes in /etc/hosts of all nodes
authorelijah <elijah@riseup.net>
Sun, 9 Mar 2014 00:09:39 +0000 (16:09 -0800)
committerelijah <elijah@riseup.net>
Sun, 9 Mar 2014 00:09:39 +0000 (16:09 -0800)
lib/leap_cli/config/macros.rb

index 1402161fd766c1cbdd3061094f705390f99b7eb9..79f39725037ba404a99d66c0d1eaa795775886b2 100644 (file)
@@ -160,7 +160,7 @@ module LeapCli; module Config
     # Generates entries needed for updating /etc/hosts on a node (as a hash).
     #
     # Argument `nodes` can be nil or a list of nodes. If nil, only include the
-    # IPs of the other nodes this @node as has encountered.
+    # IPs of the other nodes this @node as has encountered (plus all mx nodes).
     #
     # Also, for virtual machines, we use the local address if this @node is in
     # the same location as the node in question.
@@ -172,6 +172,7 @@ module LeapCli; module Config
       if nodes.nil?
         if @referenced_nodes && @referenced_nodes.any?
           nodes = @referenced_nodes
+          nodes = nodes.merge(nodes_like_me[:services => 'mx'])  # all nodes always need to communicate with mx nodes.
         end
       end
       return nil unless nodes