First of all as rpc_backend option in heat.conf file must be set as follows:
1 |
rpc_backend = heat.openstack.common.rpc.impl_kombu |
Another problem is the same as with Nova in post: http://stackblog.net/?p=14 i.e. heat-engine service does not start unless mysql service starts first. This is the same problem as with nova-scheduler and nova-cert.
Solution:
Heat-engine is a SysV service thus we need to first check mysql priority (in the example below it is 19):
1 2 3 4 5 6 7 |
root@ubuntu-openstack-aio:~/scripts# ll /etc/rc2.d/ total 20 drwxr-xr-x 2 root root 4096 Nov 17 16:23 ./ drwxr-xr-x 122 root root 12288 Nov 17 16:14 ../ -rw-r--r-- 1 root root 677 Mar 13 2014 README lrwxrwxrwx 1 root root 17 Nov 14 11:52 S15dnsmasq -> ../init.d/dnsmasq* lrwxrwxrwx 1 root root 15 Nov 14 00:32 S19mysql -> ../init.d/mysql* |
In all appropriate runlevels (2,3,4,5) add a symbollic link /etc/rcX.d directories so that heat-engine start *AFTER* mysql service:
1 2 3 4 |
ln -s /etc/init.d/heat-engine /etc/rc2.d/S99heat-engine ln -s /etc/init.d/heat-engine /etc/rc3.d/S99heat-engine ln -s /etc/init.d/heat-engine /etc/rc4.d/S99heat-engine ln -s /etc/init.d/heat-engine /etc/rc5.d/S99heat-engine |
or use:
1 |
update-rc.d heat-engine defaults 99 |
Even though heat-engine process seems to be UP:
1 2 3 4 |
root@ubuntu-openstack-aio:~# ps auxx | grep heat heat 2735 0.4 1.1 216200 50704 ? Ss 17:01 0:00 /usr/bin/python /usr/bin/heat-api-cfn heat 2770 0.4 1.1 216468 50924 ? Ss 17:01 0:00 /usr/bin/python /usr/bin/heat-api heat 5264 0.6 1.4 314344 64320 ? S 17:01 0:00 /usr/bin/python /usr/bin/heat-engine |
Service status is shown as STOP/WAITING:
1 2 |
root@ubuntu-openstack-aio:~# service heat-engine status heat-engine stop/waiting |
Due to some reason heat-engine service is called by some different service during bootup twice before mysql is up and it fails to launch (even though in boot log it shows [OK]
/var/log/heat/heat-engine.log
1 2 3 |
2014-11-17 17:01:41.280 2738 CRITICAL heat [req-da2e019e-8535-44ad-9e5b-4683edbe1f38 None] OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on 'controller' (111)") None None (...) 2014-11-17 17:01:41.280 2738 TRACE heat OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on 'controller' (111)") None None |
/var/log/boot.log
1 2 3 |
* Starting Heat Engine server^[[74G[ OK ] (...) * Starting Heat Engine server^[[74G[^[[31mfail^[[39;49m] |
After mysql is launched again heat-engine is started (thanks to adding it /etc/rcX.d with appropriate priority):
1 2 |
(...) * Starting Heat Engine heat-engine ^[[100G ^M^[[94G[ OK ] |
All in all service works fine but its status is shown incorrectly.