Ubuntu: How to specify what MAAS interface Juju should use



Question:

I have a MAAS cluster with machines that are connected with two networks. One "control" network for PXE booting and one "data" network for communication. My Juju client only has access to the "data" network. Both networks are fully managed by MAAS (DHCP and DNS).

When I bootstrap, the Juju client tries to connect to the machine using its control network IP, thus throwing a connection timed out error. How can I tell Juju to use the "data" network ip?

[juju 1.25.., MAAS 1.9..]


Solution:1

Short answer: You can't, but SSH tunnelling usually works (see below).

Juju tries to connect to all IP addresses of the deployed MAAS node, via SSH trying all addresses in parallel. Those addresses are returned by the MAAS API Juju uses.

If you don't have direct access to the "control" network, but you do have access to the "data" network, one way to do it is to use sshuttle(8) to set up a SSH tunnel to the MAAS server for a list of networks. This will work assuming you can connect to the MAAS server via SSH (via the "data" network or otherwise).

Example: sshuttle -r 192.168.1.104 10.20.0.0/24 172.31.42.0/24

192.168.1.104 is the MAAS server's IP address you can SSH into, the rest are one or more MAAS networks you want to be able to access through the established SSH tunnel (e.g. "control" and "data" networks for your case).

I have a similar setup and this works pretty well. You'll need to leave the sshuttle terminal running. Now you should be able to SSH into the deployed nodes using both their "control" and "data" addresses.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »