Openstack创建虚拟机过程中遇到的问题

Function ‘nova.servicegroup.drivers.db.DbDriver._report_state’ run outlasted interval by 7.53 sec

创建虚拟机过程中,把虚拟机分配到A节点,进入A节点/var/log/nova/compute.log中查看日志

2020-03-04 14:38:45.811 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 10.44 sec
2020-03-04 14:39:21.464 22256 INFO nova.compute.resource_tracker [req-2fc669ea-ac83-474d-8372-160eeacebc58 - - - - -] Final resource view: name=worker.node phys_ram=32767MB used_ram=4864MB phys_disk=1019GB used_disk=130GB total_vcpus=4 used_vcpus=4 pci_stats=[]
2020-03-04 14:40:15.518 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 8.68 sec
2020-03-04 14:40:21.377 22256 INFO nova.compute.resource_tracker [req-2fc669ea-ac83-474d-8372-160eeacebc58 - - - - -] Final resource view: name=worker.node phys_ram=32767MB used_ram=4864MB phys_disk=1019GB used_disk=130GB total_vcpus=4 used_vcpus=4 pci_stats=[]
2020-03-04 14:40:26.836 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 1.32 sec
2020-03-04 14:40:54.617 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 17.78 sec
2020-03-04 14:41:06.477 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 1.86 sec
2020-03-04 14:41:17.868 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 1.39 sec
2020-03-04 14:41:21.393 22256 INFO nova.compute.resource_tracker [req-2fc669ea-ac83-474d-8372-160eeacebc58 - - - - -] Final resource view: name=worker.node phys_ram=32767MB used_ram=4864MB phys_disk=1019GB used_disk=130GB total_vcpus=4 used_vcpus=4 pci_stats=[]
2020-03-04 14:41:35.401 22256 WARNING oslo.service.loopingcall [-] Function 'nova.servicegroup.drivers.db.DbDriver._report_state' run outlasted interval by 7.53 sec

解决办法:
修改/etc/nova/nova.conf文件,增加以下属性

# Possible values:
#
# * 60 (default)
# * If value is 0, then one attempt is made.
# * Any negative value is treated as 0.
# * For any value > 0, total attempts are (value + 1)
#  (integer value)
block_device_allocate_retries=60

参考:https://blog.csdn.net/zuopiezia/article/details/80458821

class ‘pymysql.err.ProgrammingError’> (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near

很多服务的状态虽然是运行状态,但是报了异常,说是SQL数据库的问题

Feb 28 17:52:23 manager.node systemd[1]: Starting OpenStack Nova VNC console auth Server...
Feb 28 17:52:35 manager.node systemd[1]: Started OpenStack Nova VNC console auth Server.
Feb 29 09:46:00 manager.node nova-consoleauth[1952]: /usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py:74: SAWarning: An exception has occurred during handling of a previous exception.  The previous exception is:
Feb 29 09:46:00 manager.node nova-consoleauth[1952]: <class 'pymysql.err.ProgrammingError'> (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1")
Feb 29 09:46:00 manager.node nova-consoleauth[1952]: "is:\n %s %s\n" % (self._exc_info[0], self._exc_info[1]))

查看数据库,发现可以登陆,但是查询表查询不到了

[root@manager ~]# mysql -root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5362
Server version: 10.1.20-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
Ignoring query to other database
MariaDB [(none)]> show databases;
Ignoring query to other database
MariaDB [(none)]> Ctrl-C -- exit!
Aborted

解决方法:重启mariadb服务(可能是服务器重启过的原因吧)

cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory

[root@manager ~]# systemctl status neutron-openvswitch-agent
● neutron-openvswitch-agent.service - OpenStack Neutron Open vSwitch Agent
   Loaded: loaded (/usr/lib/systemd/system/neutron-openvswitch-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-03-27 15:58:50 CST; 5s ago
  Process: 2885 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
 Main PID: 2891 (neutron-openvsw)
   CGroup: /system.slice/neutron-openvswitch-agent.service
           └─2891 /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --con...

Mar 27 15:58:50 manager.node systemd[1]: Starting OpenStack Neutron Open vSwitch Agent...
Mar 27 15:58:50 manager.node neutron-enable-bridge-firewall.sh[2885]: net.bridge.bridge-nf-call-iptables = 1
Mar 27 15:58:50 manager.node neutron-enable-bridge-firewall.sh[2885]: net.bridge.bridge-nf-call-ip6tables = 1
Mar 27 15:58:50 manager.node systemd[1]: Started OpenStack Neutron Open vSwitch Agent.
Mar 27 15:58:52 manager.node neutron-openvswitch-agent[2891]: net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
Mar 27 15:58:52 manager.node neutron-openvswitch-agent[2891]: net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)
Mar 27 15:58:52 manager.node neutron-openvswitch-agent[2891]: PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
Mar 27 15:58:52 manager.node neutron-openvswitch-agent[2891]: PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)

安装以下包解决

yum install libibverbs -y
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OpenStack是一种用于构建私有云或公有云的开源软件平台。在进行OpenStack搭建时,可能会遇到以下问题: 1. 硬件要求:OpenStack需要强大的硬件支持。在进行搭建之前,需要检查您的硬件是否符合要求。 2. 安装环境:OpenStack需要在Linux操作系统上运行。在安装OpenStack之前,需要确保您的系统已经安装了必要的软件和服务。 3. 网络配置:OpenStack是网络密集型应用程序,因此正确的网络配置是至关重要的。在搭建OpenStack之前,需要规划好网络拓扑,并配置好网络设备。 4. 软件依赖:OpenStack依赖于许多不同的软件和服务。在搭建OpenStack之前,需要确保这些软件和服务已经正确安装,并且能够正常运行。 5. 安全问题OpenStack是一个非常复杂的软件平台,因此安全问题也是一个重要的考虑因素。在搭建OpenStack之前,需要确保所有的安全漏洞都已经得到了修复。 OpenStack的搭建过程可以分为以下几个步骤: 1. 安装操作系统:安装Linux操作系统,可以选择Ubuntu、CentOS等。 2. 安装OpenStack软件包:安装OpenStack软件包,可以选择使用二进制软件包、源码编译等方式。 3. 配置网络:配置网络拓扑,并设置网络设备。 4. 初始化OpenStack:使用指定的命令进行初始化操作,包括创建数据库、设置管理员账号等。 5. 配置OpenStack:根据需要进行设置和配置,包括创建虚拟机、配置存储、配置网络等。 6. 启动OpenStack:启动OpenStack服务,并检查服务是否正常运行。 在搭建过程,可能会遇到各种各样的问题,需要根据实际情况进行解决。建议在搭建之前,先了解OpenStack的基本原理和架构,以便更好地理解和解决问题。同时,可以参考OpenStack官方文档和社区论坛,获取更多的帮助和支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值