安装openstack - mitaka遇到的坑

2018-09-13  本文已影响0人  你猜_19ca

认证服务

service keystone stop

初始化keystone服务失败

MariaDB [(none)]>drop database keystone;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> CREATE DATABASE keystone;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye

控制节点nova配置的时候default不能少

控制节点配置nova的时候, 必须在默认的nova.conf基础上修改

openstack-dashboard打开报错500

查看/var/log/apache2/error.log,发现如下报错信息:
[wsgi:error] [pid 11215:tid 140471222830848] [client 10.65.50.27:5433] Truncated or oversized response headers received from daemon process 'horizon': /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
解决办法:
打开openstack-dashboard的apache2配置文件
vi /etc/apache2/conf-available/openstack-dashboard.conf
增加一行
WSGIApplicationGroup %{GLOBAL}
重启apache2:
service apache2 reload

各个节点时间同步问题

查看各个服务是否正常

查看nova服务

nova-manage service list
结果如下,如果state是非:-)说明服务不正常,可能是NTP时间不同步导致:

Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
DEPRECATED: Use the nova service-* commands from python-novaclient instead or the os-services REST resource. The service subcommand will be removed in the 14.0 release.
Binary           Host                                 Zone             Status     State Updated_At
nova-consoleauth controller                           internal         enabled    :-)   2018-10-09 06:28:48
nova-scheduler   controller                           internal         enabled    :-)   2018-10-09 06:28:46
nova-conductor   controller                           internal         enabled    :-)   2018-10-09 06:28:44
nova-compute     compute1                             nova             enabled    :-)   2018-10-09 06:28:49
nova-osapi_compute 0.0.0.0                              internal         enabled    XXX   None      
nova-metadata    0.0.0.0                              internal         enabled    XXX   None

查看neutron服务

neutron agent-list

结果如下:

+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host       | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| 2b8919ee-edc3-4828-9c13-5c45f49a0b0c | DHCP agent         | controller | nova              | :-)   | True           | neutron-dhcp-agent        |
| 5401d36e-4bd6-49b8-a65d-779967b328a2 | Metadata agent     | controller |                   | :-)   | True           | neutron-metadata-agent    |
| b5899de2-a8e6-406c-9ce3-2595ed526aad | Linux bridge agent | compute1   |                   | :-)   | True           | neutron-linuxbridge-agent |
| fd2060ea-fd20-4e1e-9abd-dc40c7d1cfd7 | Linux bridge agent | controller |                   | :-)   | True           | neutron-linuxbridge-agent |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

子网操作

显示子网

openstack subnet list

删除子网

openstack subnet delete name/id

nova-compute启动失败

查看日志如下:

ERROR oslo.messaging._drivers.impl_rabbit [req-6de28541-3ca4-4fe2-a5e3-470a6ff0b10e - - - - -] AMQP server on controller:5672 is unreachable: [Errno 113] EHOSTUNREACH. Trying again in 18 seconds.
原因是控制节点的5672端口没有开放,在控制节点添加如下iptables规则:
iptables -I INPUT -p tcp --dport 5672 -j ACCEPT

上一篇下一篇

猜你喜欢

热点阅读