在修正了错误一后,执行同步命令,结果出现 specified key was too long; max key length is 767 bytes。仔细研究了一下,是SQL数据库的编码设置出了问题。openstack采用的数据库默认编码是utf8,我们可以看到在上一篇文章环境准备中,安装完MariaDB后,配置openstack.conf文件时,写入的默认编码是utf8, 可是当我们进入数据库后,输入命令 show variables like “%char%”时,显示的编码方式多数都是utf8mb4  (原谅我没有截图)。utf8mb4是utf8的超集,在utf8mb4编码下一个字符4个字节,而在utf8编码下一个字符3个 字节。也就是说,在max key length 是767字节的情况下,如果使用的是utf8mb4编码,则在创建表格时,表格中定义的变量长度不能超过191个字符。可是在同步keystone的表格操作过程中,会出现变量长度达到250 的情况,这样就出现了上述的错误。
解决方案是:将/etc/mysql/mariadb.conf.d目录下的所有.cnf文件中出现uft8mb4的地方都修改成uft8,然后重
启数据库。重启完之后我们再进入数据库,输入命令 show variables like “%char%”

Reference link:

http://m.blog.csdn.net/article/details?id=52104116


Nova services all down
Solution:
rabbitmqctl add_user openstack RABBIT_PASS
rabbitmqctl set_permissions openstack “.*” “.*” “.*”
rabbitmqctl change_password openstack RABBIT_PASS
sudo service nova-compute restart

Reference link

https://ask.openstack.org/en/question/55294/nova-service-state-all-down/
In /etc/init/nova-cert.conf and /etc/init/nova-scheduler.conf add a line “start on mysql_started” and comment “start on runlevel” line


nova-scheduler does not start after reboot

Solution:

In /etc/init/nova-cert.conf and /etc/init/nova-scheduler.conf add a line “start on mysql_started” and comment “start on runlevel” line
start on mysql_started
#start on runlevel [2345]
stop on runlevel [!2345]

This means start a service when a custom event mysql_started is emitted.As these nova-cert/scheduler depends on mysql to start properly add the following line in /etc/init.d/mysql as a list line of start option :

initctl emit mysql_started

Reference link:


Openstack Mitaka: can not access dashboard, Internal Server Error

Solution:

Added the line WSGIApplicationGroup %{GLOBAL} to start of the file /etc/apache2/conf-available/openstack-dashboard.conf.

Then execute this on the given path: /usr/share/openstack-dashboard$ sudo python manage.py compress

Reference link:

https://ask.openstack.org/en/question/91352/openstack-mitaka-can-not-access-dashboard/

 

 

Advertisements