再次部署openstack
经历一周的折磨,终于第一次完成部署 。。。。然而,仍然很多问题,如用户管理模块打不开,vxlan隧道起不来,
这次基于centos7.8 部署 R版
参考:
https://docs.openstack.org/rocky/install/
https://blog.csdn.net/networken/article/details/80682437
1 keystone 数据库初始失败
原因: 授权问题,官方文档少一个。。。
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'controller' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
验证
mysql -ukeystone -pKEYSTONE_DBPASS -e "show tables from keystone;" 有结果
openstack project list 有结果:
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 015a58ec2ad549d8a9cf34683e9c5660 | service |
| 34e233f1aa0b48e1af3c26323a594dae | admin |
+----------------------------------+---------+
openstack service create --name nova \
--description "OpenStack Compute" compute
2 glance 上传成功,显示正常
openstack image create "cirros" \
--file cirros-0.4.0-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--public
openstack image list
3 nova 部署 su -s /bin/sh -c "nova-manage api_db sync" nova 报错
原因: R版官网文档没有部署placement 数据库,
解决:参考U版 部署placement数据库
验证: less nova-manage.log 无报错
其他数据库初始化警告,可忽略
nova 部署完成验证:
# openstack compute service list
+----+------------------+------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+------------+----------+---------+-------+----------------------------+
| 1 | nova-consoleauth | controller | internal | enabled | up | 2020-07-10T16:16:15.000000 |
| 2 | nova-scheduler | controller | internal | enabled | up | 2020-07-10T16:16:16.000000 |
| 4 | nova-conductor | controller | internal | enabled | up | 2020-07-10T16:16:14.000000 |
| 7 | nova-compute | compute1 | nova | enabled | up | 2020-07-10T16:16:20.000000 |
+----+------------------+------------+----------+---------+-------+----------------------------+
# openstack catalog list
+-----------+-----------+-----------------------------------------+
| Name | Type | Endpoints |
+-----------+-----------+-----------------------------------------+
| nova | compute | RegionOne |
| | | internal: http://controller:8774/v2.1 |
| | | RegionOne |
| | | admin: http://controller:8774/v2.1 |
| | | RegionOne |
| | | public: http://controller:8774/v2.1 |
| | | |
| glance | image | RegionOne |
| | | public: http://controller:9292 |
| | | RegionOne |
| | | admin: http://controller:9292 |
| | | RegionOne |
| | | internal: http://controller:9292 |
| | | |
| placement | placement | RegionOne |
| | | admin: http://controller:8778 |
| | | RegionOne |
| | | public: http://controller:8778 |
| | | RegionOne |
| | | internal: http://controller:8778 |
| | | |
| keystone | identity | RegionOne |
| | | admin: http://controller:5000/v3/ |
| | | RegionOne |
| | | internal: http://controller:5000/v3/ |
| | | RegionOne |
| | | public: http://controller:5000/v3/ |
| | | |
+-----------+-----------+-----------------------------------------+
异常告警:
# nova-status upgrade check
+-------------------------------------------------------------------+
| Upgrade Check Results |
+-------------------------------------------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
| Check: Resource Providers |
| Result: Warning |
| Details: There are no compute resource providers in the Placement |
| service but there are 1 compute nodes in the deployment. |
| This means no compute nodes are reporting into the |
| Placement service and need to be upgraded and/or fixed. |
| See |
| https://docs.openstack.org/nova/latest/user/placement.html |
| for more details. |
+-------------------------------------------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
| Check: API Service Version |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
| Check: Request Spec Migration |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
| Check: Console Auths |
| Result: Success |
| Details: None |
+-------------------------------------------------------------------+
故障原因:
nova.conf Placement 段配置密码配置错误
正确如下:
# nova-status upgrade check
+--------------------------------+
| Upgrade Check Results |
+--------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Resource Providers |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: API Service Version |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Request Spec Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Console Auths |
| Result: Success |
| Details: None |
+--------------------------------+
4 dashboard 慢
1
sed -i '/OPTIONS/c OPTIONS="-l 0.0.0.0"' /etc/sysconfig/memcached
systemctl restart memcached
2
vi /etc/keystone/keystone.conf
[token]
# 官方默认的只有下面这句话
# provider = fernet
caching = true
driver = memcache
[memcache]
servers = controller:11211
-----------------
总结:
1 配置文件修改时,要仔细
2 最好每次每个步骤完都验证,特别是数据库
3 用虚拟环境装,多打快照
4 排错时,根据报错日志,网上搜索,不一定对,但试试未尝不可。 linux 俺几乎一窍不通,这次部署openstack Linux进步不少
5 因为是独立的网络节点,所以在哪些是controller上必装的,哪些是network必装的比较懵逼,现在的理解是:
controller上只需要部署neutron-server
其他代理全装在network节点。计算节点需要ml2, linux-bridge, 如果需要出口,部署l3和metadate agent, 如果需要dhcp 分布式,就部署dhcp-agent,总之需要高可用,可以多部署几个。
接口: controller 需管理网,network 需管理网,隧道网(可以同管理网混)和外部网络 , 计算节点 需管理网,隧道网(可以同管理网混),外部网络可选。
6其他组件部署和高可用部署等有空