Error OpenStack resource loading abnormally

created at 11-01-2021 views: 2

Error1

Openstack uses "openstack network agent list" on the controller node to display the state of the computing node as 😦

Check the log file and find the error as follows

[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

solution for error1

One step in place, as follows


    [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

The problem has not been solved yet, and the authority report is gone, but the computing node agent still has not detected it.
Check the log and find a new error

[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.

Comparing the system time of the two nodes, there is indeed a difference

"chronyc sources" time synchronization is invalid

[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"

View the current time of the control node, and modify the system time of the compute node (my virtual machine has no other services, so I changed it directly)

Error2

"gnocchi resource list" cannot get cloud host information

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

solution for error2

Step 1: Check whether the time of controller and compute node are synchronized
Step 2: Restart the ceilometer & gnocchi services of the controller and compute nodes (according to the order of deployment, the compute nodes will restart nova related services by the way)

[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                                  |
+-----------------------+-------------------------------------------------------------------+
created at:11-01-2021
edited at: 11-01-2021: