您的位置:首页 > 其它

Ocata:Packstack Ocata does not configure nova for placement API

2017-03-10 09:54 435 查看
1、故障现象:Ocata配置完nova服务后,发现computer节点居然没有起来:
[root@linux-node1 nova]# systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: activating (start) since Fri 2017-03-10 08:53:58 CST; 6s ago
Main PID: 14063 (nova-compute)
CGroup: /system.slice/openstack-nova-compute.service
└─14063 /usr/bin/python2 /usr/bin/nova-compute
Mar 10 08:53:58 linux-node1.wanwan.com systemd[1]: Starting OpenStack Nova Compute Server...
[root@linux-node1 ~]# tail -10 /var/log/nova/nova-compute.log
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service [-] Error starting thread.
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service Traceback (most recent call last):
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 722, in run_service
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service     service.start()
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/service.py", line 144, in start
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service     self.manager.init_host()
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1136, in init_host
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service     raise exception.PlacementNotConfigured()
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service PlacementNotConfigured: This compute is not configured to talk to the placement service. Configure the [placement] section of nova.conf and restart the service.
2017-03-10 08:55:25.156 14177 ERROR oslo_service.service
2、处理过程
由于openstack ocata的版本发布时间还不太长,通过查资料发现这是一个bug,查看官方安装手册,没有对应解决方法
在控制节点上:
[root@linux-node1 ~]# yum -y install openstack-nova-placement-api
[root@linux-node1 ~]# openstack user create --domain default --password-prompt placement
User Password:#输入密码placement
Repeat User Password:#输入密码placement
[root@linux-node1 ~]# openstack role add --project service --user placement admin
[root@linux-node1 ~]# openstack service create --name placement --description "OpenStack Placement" placement
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Placement              |
| enabled     | True                             |
| id          | febbc831f12c4f03aa8f4fd59f6b6ffc |
| name        | placement                        |
| type        | placement                        |
+-------------+----------------------------------+
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 661b3c937fd040bf9fcf59a0e0985596 |
| name                | placement                        |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
[root@linux-node1 ~]# openstack endpoint create --region RegionOne placement admin http://10.10.10.11:8778 +--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 780d9d238aa24f7a81f197f0d86a0560 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | febbc831f12c4f03aa8f4fd59f6b6ffc |
| service_name | placement                        |
| service_type | placement                        |
| url          | http://10.10.10.11:8778          |
+--------------+----------------------------------+
[root@linux-node1 ~]# openstack endpoint create --region RegionOne placement internal http://10.10.10.11:8778 +--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 43cf8f9ac6a94f4e9f4815d4830eda01 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | febbc831f12c4f03aa8f4fd59f6b6ffc |
| service_name | placement                        |
| service_type | placement                        |
| url          | http://10.10.10.11:8778          |
+--------------+----------------------------------+
修改nova的配置文件:
[root@linux-node1 ~]# vim /etc/nova/nova.conf
[placement]
auth_uri = http://10.10.10.11:5000 auth_url = http://10.10.10.11:35357/v3 memcached_servers = 10.10.10.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
os_region_name = RegionOne
重启对应的服务:

[root@linux-node1 ~]# systemctl restart openstack-nova-compute.service
[root@linux-node1 ~]# systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2017-03-10 09:30:27 CST; 10s ago
Main PID: 26692 (nova-compute)
CGroup: /system.slice/openstack-nova-compute.service
└─26692 /usr/bin/python2 /usr/bin/nova-compute
Mar 10 09:30:06 linux-node1.wanwan.com systemd[1]: Starting OpenStack Nova Compute Server...
Mar 10 09:30:27 linux-node1.wanwan.com systemd[1]: Started OpenStack Nova Compute Server.
查看openstack的计算服务清单:

[root@linux-node1 ~]# openstack compute service list
+----+------------------+------------------------+----------+---------+-------+----------------------------+
| ID | Binary           | Host                   | Zone     | Status  | State | Updated At                 |
+----+------------------+------------------------+----------+---------+-------+----------------------------+
|  1 | nova-conductor   | linux-node1.wanwan.com | internal | enabled | up    | 2017-03-10T01:36:26.000000 |
|  2 | nova-scheduler   | linux-node1.wanwan.com | internal | enabled | up    | 2017-03-10T01:36:22.000000 |
|  3 | nova-consoleauth | linux-node1.wanwan.com | internal | enabled | up    | 2017-03-10T01:36:21.000000 |
|  7 | nova-compute     | linux-node1.wanwan.com | nova     | enabled | up    | 2017-03-10T01:36:27.000000 |
+----+------------------+------------------------+----------+---------+-------+-------------------------
[root@linux-node1 nova]# openstack catalog list
+-----------+-----------+---------------------------------------------------------------------------+
| Name      | Type      | Endpoints                                                                 |
+-----------+-----------+---------------------------------------------------------------------------+
| nova      | compute   | RegionOne                                                                 |
|           |           |   public: http://10.10.10.11:8774/v2.1/b25ba065fdbb44f9973bdff7b92c061e   |
|           |           | RegionOne                                                                 |
|           |           |   internal: http://10.10.10.11:8774/v2.1/b25ba065fdbb44f9973bdff7b92c061e |
|           |           | RegionOne                                                                 |
|           |           |   admin: http://10.10.10.11:8774/v2.1/b25ba065fdbb44f9973bdff7b92c061e    |
|           |           |                                                                           |
| keystone  | identity  | RegionOne                                                                 |
|           |           |   internal: http://10.10.10.11:5000/v3/                                   |
|           |           | RegionOne                                                                 |
|           |           |   admin: http://10.10.10.11:35357/v3/                                     |
|           |           | RegionOne                                                                 |
|           |           |   public: http://10.10.10.11:5000/v3/                                     |
|           |           |                                                                           |
| glance    | image     | RegionOne                                                                 |
|           |           |   internal: http://10.10.10.11:9292                                       |
|           |           | RegionOne                                                                 |
|           |           |   public: http://10.10.10.11:9292                                         |
|           |           | RegionOne                                                                 |
|           |           |   admin: http://10.10.10.11:9292                                          |
|           |           |                                                                           |
| placement | placement | RegionOne                                                                 |
|           |           |   internal: http://10.10.10.11:8778                                       |
|           |           | RegionOne                                                                 |
|           |           |   admin: http://10.10.10.11:8778                                          |
|           |           | RegionOne                                                                 |
|           |           |   public: http://10.10.10.11:8778                                         |
|           |           |                                                                           |
+-----------+-----------+---------------------------------------------------------------------------+
小结:新版本的Openstack还是存在一些bug,只能先在测试环境中多进行测试,填坑的过程也是收货满满的
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  placement Ocata
相关文章推荐