Error OpenStack 资源加载异常

Error1

openstack在controller节点使用 "openstack network agent list" 显示计算节点状态为 😦



排查日志文件, 找到报错如下


[root@compute ~]# less /var/log/neutron/linuxbridge-agent.log 
...
2021-09-01 08:14:10.593 37443 ERROR neutron   File "/usr/lib/python2.7/site-packages/oslo_privsep/daemon.py", line 357, in __init__
2021-09-01 08:14:10.593 37443 ERROR neutron     listen_sock.bind(sockpath)
2021-09-01 08:14:10.593 37443 ERROR neutron   File "/usr/lib64/python2.7/socket.py", line 224, in meth
2021-09-01 08:14:10.593 37443 ERROR neutron     return getattr(self._sock,name)(*args)
2021-09-01 08:14:10.593 37443 ERROR neutron error: [Errno 13] Permission denied


解决方案

    一步到位, 如下
    [root@compute ~]# yum install -y openstack-selinux


    [root@compute ~]# vi /etc/selinux/config

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    #SELINUX=enforcing
    SELINUX=disabled
    # SELINUXTYPE= can take one of three values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected. 
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted

    [root@compute ~]# setenforce 0

问题还没处理完, 权限报错没了, 但是计算节点代理依旧没检测道
排查日志, 发现新报错

[root@controller ~]# less /var/log/neutron/server.log 
...
ERROR neutron.db.agents_db [req-c6d0aa9a-5ed5-4ada-8db1-cb8f3c6df1f2 - - - - -] Message received from the host: compute during the registration of Linux bridge agent has a timestamp: 2021-09-01T13:40:30.344421. This differs from the current server timestamp: 2021-09-02T05:50:29.057028 by 58198.712607 seconds, which is more than the threshold agent down time: 75.

对比两个节点的系统时间,确实有差异

解决方案

"chronyc sources" 时间同步无效

[root@controller ~]# date +"%Y-%m-%d %H:%M:%S" 
2021-09-02 02:02:30

[root@compute ~]# date -s "2021-09-02 02:02:30"

查看控制节点当前时间, 并修改计算节点系统时间(我的虚拟机无其他服务, 所以直接改了)

---------------------------------------------------------------------------------------------------------

Error2

"gnocchi resource list" 获取不到云主机信息


[root@controller ~]# gnocchi resource show fdd2a43e-5c73-4a50-81b6-6115ddd46671
Resource fdd2a43e-5c73-4a50-81b6-6115ddd46671 does not exist (HTTP 404)

解决方案

步骤一: 检查 controller 与 compute 节点的时间,是否同步
步骤二: 将 controller 与 compute 节点的 ceilometer & gnocchi 服务重启一下(按部署的顺序,计算节点顺便重启 nova 相关的服务)

[root@controller ~]# gnocchi resource show fdd2a43e-5c73-4a50-81b6-6115ddd46671
+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 68b45d547f5f409ebc38788f135f7cb7                                  |
| created_by_user_id    | cfb54e52063f4c7f8cde55c548adb4dd                                  |
| creator               | cfb54e52063f4c7f8cde55c548adb4dd:68b45d547f5f409ebc38788f135f7cb7 |
| ended_at              | None                                                              |
| id                    | fdd2a43e-5c73-4a50-81b6-6115ddd46671                              |
| metrics               | cpu: 909a4463-b560-42af-ab70-aeec1c95a434                         |
|                       | memory.usage: 16802fc1-26ca-44a3-9bda-f44a925d1e77                |
| original_resource_id  | fdd2a43e-5c73-4a50-81b6-6115ddd46671                              |
| project_id            | 67aa569467bd4333a1142d9ee4999631                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-10-18T02:50:08.683936+00:00                                  |
| started_at            | 2021-10-18T02:50:08.683921+00:00                                  |
| type                  | instance                                                          |
| user_id               | a254c805f34c4418b685730db6088eff                                  |
+-----------------------+-------------------------------------------------------------------+
posted on 2021-10-27 10:06  〆灬丶  阅读(183)  评论(0编辑  收藏  举报