Ask Your Question
0

JuJu bootstrap fails, connection refused port 22

asked 2014-04-14 14:25:16 -0600

ram5391 gravatar image

updated 2014-04-14 14:28:43 -0600

I have a MAAS installation with it's interface at 10.12.1.3/MAAS. It is responsible for DHCP/DNS and the configurations are as follows: ip: 10.12.1.4 subnet mask: 255.255.255.0 broadcast ip: 10.12.1.255 router ip: 10.12.1.1 ip range low: 10.12.1.10 ip rane high: 10.12.1.100

I am booting virtualbox machines on the same machine as the cluster controller/region controller, and they enlist fine. I change their name in MAAS, accept, and commission them. The enlistment and commission process take a very long time (just food for thought). Once the machine has been commissioned, (it says ready in MAAS nodes list). Run JuJu bootstrap. Juju has the following environments.yaml:

environments:
    maas:
        type: maas
        maas-server: 'http://10.12.1.3/MAAS/'
        maas-oauth: pVreWZYhzaAFmqNjV3:W96PuEtANsr3n2SkGR:xF8dccH7NPUjhpejauzek$
        admin-secret: 'whatever'
        default-series: precise
        #authorized-keys-path: ~/.ssh/id_rsa.pub

when I run juju bootstrap, then power on the virtualbox VM, I get this:

picked arbitrary tools &{"1.18.1-precise-amd64" "https://streams.canonical.com/juju/tools/releases/juju-1.18.1-   precise-amd64.tgz" "65ea92cd8812bff3e49df78f9e8e964e91c44af0abd49d880c4333a78c8abfda" %!q(int64=5368375)} - /MAAS/api/1.0/nodes/node-f942c69e-c400-11e3-bc28-0025906c5dd6/
Waiting for address
 Attempting to connect to test.draco:22

This screen will hang out for 10 minutes, and then I recieve the following:

 ERROR juju.provider.common bootstrap.go:123 bootstrap failed: waited for 10m0s without being able to connect: ssh: connect to host test.draco port 22: Connection refused

if I run a juju status while it is attempting to bootstrap, I get the following:

ERROR state/api: websocket.Dial wss://nova1.draco:17070/: dial tcp 10.12.1.10:17070: connection refused

over and over again.

I am using the 12.04.4 MAAS ubuntu install, and Juju version: 1.18.1-precise-amd64

The ssh keys have been generated, uploaded to maas, re-generated and uploaded to MAAS again. Also, the machine that juju is supposed to build will finish building (status in MAAS changes to "Allocated to bla") despite the environment bootstrap failure, and then it will power off. The status in MAAS goes back to "ready" and if I turn the virtual machine back on, it seems to go back into enlisting.

Anyone know what could be going wrong?

edit retag flag offensive close merge delete

Comments

2 answers

Sort by » oldest newest most voted
0

answered 2014-04-15 10:13:12 -0600

racedo gravatar image

If you want to use 12.04.4, which is a good idea until 14.04 is released and stable, then use the Cloud Tools pocket of the Cloud Archive for MAAS instead of the one coming from main in 12.04: https://wiki.ubuntu.com/ServerTeam/Cl...

The new versions of Juju don't work with the old versions of MAAS.

Once you have the version in Cloud Tools, if it still doesn't work try to use first the default installer instead of the fast path installer, only use the fast path installer when you know the default one works.

Alternatively, consider Foreman if you intend to use anything other than Ubuntu.

edit flag offensive delete link more
0

answered 2014-04-15 03:00:37 -0600

prathamesh_deshpande gravatar image

Hello, First thing: Please switch to Ubuntu 13.10 if you can, it has many bugs fixed. You wrote "The enlistment and commission process take a very long time (just food for thought)", I will give you one more :) In 13.10 there's a fast installer tag, use it to save some serious node deployment time. I will tell you what I did in my setup: I used Ubuntu 13.10 and KVM 1) Nodes added in KVM must only be prepared to PXE boot and left as is. 2) This will in turn invoke the maas-dhcp and maas-dns, which takes over and assigns an IP from the dhcp pool provided in the cluster configuration. 3) Then the VM shuts down and needs to be powered on manually(trying to get over this: see virsh-settings image) 4) On your MaaS server, you need to do following: a) Install Juju and core dependencies b) juju generate-config: which provides an environments.yaml file to be edited as per your needs (hp cloud/azure/maas/linux containers/maas) c) juju sync-tools: juju tools to be downloaded from amazonaws which are used by the juju nodes in cloud-init scripts. d) juju -v bootstrap --upload-tools: This will bootstrap a VM and install specified OS(used precise Pangolin) on it. e) juju deploy mysql: Will deploy the mysql charm on one of the 'ready' nodes.

5) So, for the 4th step to properly execute, we need to ensure that all nodes that are in 'Declared' state must be 'Commission'ed. Doing this will make the state to be 'Ready'. 6) Bootstrap and deployment of charms works only if the nodes are in ready state. MaaS takes care of installation of OS and other things. Use fast installer tag. 7) Once you’ve run “juju bootstrap --upload-tools” from the MAAS Controller, the MAAS GUI will show the node as allocated (a section of the pie chart will go from green to light blue). 8) One more important thing: We need to add the MAAS IP address as a nameserver in /etc/resolv.conf when using Juju otherwise the ‘juju status’ command will timeout.

Hope this helps.

edit flag offensive delete link more

Comments

Forgot to mention this, in my environments.yaml, i had also set authorized-keys-path:

prathamesh_deshpande gravatar imageprathamesh_deshpande ( 2014-04-15 03:02:40 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-14 14:25:16 -0600

Seen: 2,210 times

Last updated: Apr 15 '14