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..]

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.