Ocata:Packstack Ocata does not configure nova for placement API

1、故障现象:Ocata配置完nova服务后,发现computer节点居然没有起来:

[[email protected] 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...
[[email protected] ~]# 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,查看官方安装手册,没有对应解决方法

在控制节点上:

[[email protected] ~]# yum -y install openstack-nova-placement-api
[[email protected] ~]# openstack user create --domain default --password-prompt placement
User Password:#输入密码placement
Repeat User Password:#输入密码placement
[[email protected] ~]# openstack role add --project service --user placement admin
[[email protected] ~]# 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                             |
+---------------------+----------------------------------+
[[email protected] ~]# 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          |
+--------------+----------------------------------+
[[email protected] ~]# 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的配置文件:

[[email protected] ~]# 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

重启对应的服务:

[[email protected] ~]# systemctl restart openstack-nova-compute.service
[[email protected] ~]# 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的计算服务清单:

[[email protected] ~]# 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 |
+----+------------------+------------------------+----------+---------+-------+-------------------------
[[email protected] 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,只能先在测试环境中多进行测试,填坑的过程也是收货满满的

时间: 2024-11-05 13:40:42

Ocata:Packstack Ocata does not configure nova for placement API的相关文章

Nova 通过Python API 查询,创建,删除flavor

1 [[email protected] ~]# cat flavor.py 2 from novaclient import client as nvclient 3 from novaclient import utils 4 from novaclient import base 5 6 from keystoneauth1.identity import v3 7 from keystoneauth1 import session 8 from keystoneclient.v3 imp

openstack ocata版本简化安装

Network Time Protocol (NTP) Controller Node apt install chrony Edit the /etc/chrony/chrony.conf 添加如下信息 #修改10.0.0.0/24为自己环境的网段 server controller iburst allow 10.0.0.0/24 注释掉 pool 2.debian.pool.ntp.org offline iburst line Restart the NTP service servic

OpenStack之Ocata单控部署测试

本着学以致用的原则,学习到新的东西一定要亲自去实践操作,就像别人回来给你描述那里的风景是多么多么美好,你如果不亲自去走一遭看一遍是体会不到的,要不然你大爷永远还是你大爷!P话!^_^O(∩_∩)O哈哈~~~~~ (仅供参考) 简介: Ocata与以往版本主要区别在于引入了cell(单元格),cell v2 自 Newton 版本引入 ,Ocata 版本变为必要组件,以后默认部署都会初始化一个单 cell 的架构. OpenStack 在控制平面上的性能瓶颈主要在 Message Queue 和

OpenStack Ocata三节点实验环境部署

一.测试环境准备 主机节点准备及网络规划我物理节点是一台塔式服务器,40核CPU,64G内存,SSD盘800G,HDD盘4T.操作系统:win7 x64虚拟化软件:VMware WorkStation 11 系统环境准备--最小化安装CentOS7.2系统(CentOS-7-x86_64-Minimal-1511.iso)--关闭防火墙.关闭SELinux systemctl stop firewalld.service systemctl disable firewalld.service -

nova分析(10)—— nova-rootwrap

一.nova-rootwrap的作用 部署玩过openstack的都应该知道,它会生成一个nova用户来管理所有服务.nova身份在linux中属于普通用户级别,避免了一些需要root身份运行的操作,提高linux系统的安全性.但是openstack在实际过程中会调用很多外部命令,例如就network服务而言就有:`ip`,`ovs-vsctl`,`iptables`,`dnsmasq`,`brctl`等等,这些命令在linux中都是需要以root身份来运行的,如果是普通用户通常的做法是在命令前

nova file injection

file injection代码 file injection原理来讲是比较简单的,在nova boot命令中,有参数--file,是将文件inject到image中 nova boot --flavor 2 --image d96b0e41-8264-41de-8dbb-6b31ce9bfbfc --key-name openstack --security-groups default --file /home/ubuntu/bootfromvolume1.xml=/home/cliu8/i

OpenStack(i版)之Keystone,Glance,Nova,Neutron,Horizon

一.前期准备 1.1.linux-node1端: [[email protected]1 ~]# egrep '(vmx|svm)' /proc/cpuinfo ##有输出就支持虚拟化 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [[email protected] ~]# uname -r 2.6.32-642.el6.x86_64 [[email protected] ~]# getenf

openstack (六) nova 计算组件部署

1.组件详解 功能:托管和管理虚拟主机 选主机: 用户请求 -> nova-api -> queue -> nova-scheduler -> nova-db(过滤+权重) -> nova-scheduler -> queue 创建VM: nova-compute -> queue -> nova-conductor -> nava-db -> nova-conductor -> queue -> nova-compute ->

中小企业openstack私有云布署实践【11.1 计算nova - compute节点配置(科兴环境)】

这里我只使用kxcompute1节点配置为示例,其它节点的配置基本是一样的,只是声明的管理IP不同而已 计算节点 # yum install openstack-nova-compute sysfsutils 修改配置文件 vi /etc/nova/nova.conf [DEFAULT] vcpu_pin_set = 4-31 resume_guests_state_on_host_boot=True rpc_backend = rabbit auth_strategy = keystone m