I would like deploy one or more charms with juju on MAAS environments (without OpenStack). The environment of the MAAS Controller is Ubuntu 12.10 with 2 NICs. One of the NIC is connected to a external DHCP and the other is holding by the MAAS-dhcp and is connected to a switch with 2 client servers (Ubuntu 12.04 LTS). The settings are as follows
$ sudo vim /etc/network/interfaces
auto em1
iface em1 inet static
address [out-ip]
netmask [out-netmask]
gateway [out-gateway]
dns-nameservers [out-dns]
auto em2
iface em2 inet static
address [inner ip]
network [inner network]
netmask [inner netmask]
broadcast [inner broadcast address]
$sudo vim /etc/sysctl.conf
uncomment net.ipv4.ip_forward=1
$ sudo vim /etc/rc.local
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$ sudo /etc/init.d/networking restart
$ sudo dpkg-reconfigure maas-region-controller
[inner ip]
$ sudo dpkg-reconfigure maas-cluster-controller
http://[inner ip]:80/MAAS
$ sudo vim /etc/maas/ephmeralss
set ARCHES="amd64"
$ sudo maas createsuperuser
$ sudo maas-impoart-pxe-files
open web UI (http://[inner ip]/MAAS) & press setting button & set Cluster controllers
$ sudo vim /var/share/preseeds/preseed-master …
open computer to let clients set to ready status ( DO NOT PRESS 'START NODE' BUTTON )
check if nodes are all in READY status
MAAS clients are all in ready status:
setting juju environments.yaml
juju bootstrap ( check if one of the node -> allocated to *)
open the allocated Server to PXE boot and the setup a Ubuntu
after the installation
juju status
machines:
0:
agent-state: running
dns-name: node-4487fc70b037
instance-id: /MAAS/api/1.0/nodes/node-xxx
instance-state: unknown
service{}
When I try to deploy one charm ( for example mysql ), the other client is booted and installed ubuntu. However, after the installation, the charm still wasn't deployed. and I try:
juju status
machines:
0:
agent-state: running
dns-name: node-4487fc70b037
instance-id: /MAAS/api/1.0/nodes/node-64248652-6a9b-11e2-9347-842b2b6a17a3/
instance-state: unknown
1:
agent-state: not-started
dns-name: node-0025b31884f5
instance-id: /MAAS/api/1.0/nodes/node-011c5b14-6a9d-11e2-9c04-842b2b6a17a3/
instance-state: unknown
services:
mysql:
charm: cs:precise/mysql-15
relations: {}
units:
mysql/0:
agent-state: pending
machine: 1
public-address: null
I also checked /var/log/juju/machine-agent.log of machine 1 ( the non-started machine) and it shows that
2013-01-30 01:19:58,444: twisted@ERROR: Unhandled error in Deferred:
2013-01-30 01:19:58,454: twisted@ERROR: Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python2.7/dist-packages/juju/agents/base.py", line 238, in startService
yield self.connect()
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python2.7/dist-packages/juju/agents/base.py", line 208, in connect
self.config["zookeeper_servers"])
File "/usr/lib/python2.7/dist-packages/txzookeeper/retry.py", line 302, in connect
return self.client.connect(*args, **kw)
File "/usr/lib/python2.7/dist-packages/txzookeeper/client.py", line 468, in connect
self._servers, callback, self._session_timeout)
zookeeper.ZooKeeperException: Could not internally obtain zookeeper handle
I wait for one day and it keeps pending. The machine 1 is also remaining on not-started. I also checked to ssh two clients that they are quite ok. However, I cannot use juju ssh 1 to connect to the client. I really don't know what to do. Please help me.