目录
一、KeyStone服务
二、Placement服务
三、Nova部署完毕后启动系统
四、检查单元和放置API是否成功工作发现未找到主机名
五、Placement列出可用的资源类和特征报错
六、进入dashboard显示无法加载实例
七、dashboard controller拒绝了我们的连接请求
记录一些自己搭建OpenStack时遇到的报错以及解决方法。
Linux 版本 | OpenStack版本 |
CentOS7 | Train |
一、KeyStone服务
遇到安装KeyStone组件报错
[root@controller ~]# yum -y install openstack-keystone httpd mod_wsgi
Error: Package: python2-qpid-proton-0.22.0-1.el7.x86_64 (centos-openstack-queens)
Requires: qpid-proton-c(x86-64) = 0.22.0-1.el7
Available: qpid-proton-c-0.14.0-2.el7.x86_64 (extras)
qpid-proton-c(x86-64) = 0.14.0-2.el7
Available: qpid-proton-c-0.17.0-4.el7.x86_64 (centos-openstack-queens)
qpid-proton-c(x86-64) = 0.17.0-4.el7
Available: qpid-proton-c-0.22.0-1.el7.x86_64 (centos-openstack-queens)
qpid-proton-c(x86-64) = 0.22.0-1.el7
Installing: qpid-proton-c-0.37.0-1.el7.x86_64 (epel)
qpid-proton-c(x86-64) = 0.37.0-1.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决方案:
[root@controller ~]# yum install -y python2-qpid-proton-0.22.0-1.el7.x86_64
二、Placement服务
安装OpenStack-placement-api时遇到没有这个软件包
解决方法:
在阿里云官网上进入CentOS源地址:
centos-7-cloud-x86_64安装包下载_开源镜像站-阿里云 (aliyun.com)
重新配置一个yum源
[root@controller ~]# yum install openstack-placement-api
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
No package openstack-placement-api available.
Error: Nothing to do
[root@controller ~]# vim /etc/yum.repos.d/openstack.repo
[openstack-train]
name=openstack-train
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-train/
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
gpgcheck=1
[root@controller ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: openstack-train
Cleaning up list of fastest mirrors
Other repos take up 186 M of disk space (use --verbose for details)
[root@controller ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
openstack-train | 3.0 kB 00:00:00
openstack-train/primary_db | 1.2 MB 00:00:05
repo id repo name status
openstack-train openstack-train 3,168
repolist: 3,168
三、Nova部署完毕后启动系统
net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)
PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)
net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)
PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory
PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)
[root@controller ~]#
解决方法:
执行 yum install -y libibverbs
[root@controller ~]# yum install -y libibverbs
四、检查单元和放置API是否成功工作发现未找到主机名
[root@controller ~]# nova-status upgrade check
+------------------------------------------------------------------+
| Upgrade Check Results |
+------------------------------------------------------------------+
| Check: Cells v2 |
| Result: Failure |
| Details: No host mappings found but there are compute nodes. Run |
| command 'nova-manage cell_v2 simple_cell_setup' and then |
| retry. |
+------------------------------------------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
| Check: Cinder API |
| Result: Success |
| Details: None |
+------------------------------------------------------------------+
解决方案:
这种多半是因为计算节点服务没有启动而导致的,检查计算节点nova组件服务是否正常后,在控制节点执行 nova-manage cell_v2 simple_cell_setup 命令即可恢复
[root@controller ~]# nova-manage cell_v2 simple_cell_setup
Cell0 is already setup
[root@controller ~]# nova-status upgrade check
+--------------------------------+
| Upgrade Check Results |
+--------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Cinder API |
| Result: Success |
| Details: None |
+--------------------------------+
五、Placement列出可用的资源类和特征报错
[root@controller ~]# openstack --os-placement-api-version 1.2 resource class list --sort-column name
Expecting value: line 1 column 1 (char 0)
解决方案:
①.给Apache授权(修改配置文件)
②.重启httpd服务
[root@controller ~]# vim /etc/httpd/conf.d/00-placement-api.conf
Listen 8778
<VirtualHost *:8778>
WSGIProcessGroup placement-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess placement-api processes=3 threads=1 user=placement group=placement
WSGIScriptAlias / /usr/bin/placement-api
<IfVersion >= 2.4>
ErrorLogFormat "%M"
</IfVersion>
ErrorLog /var/log/placement/placement-api.log
#SSLEngine On
#SSLCertificateFile ...
#SSLCertificateKeyFile ...
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
Alias /placement-api /usr/bin/placement-api
<Location /placement-api>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup placement-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
[root@controller ~]# systemctl restart httpd.service
再次尝试:
[root@controller ~]# openstack --os-placement-api-version 1.2 resource class list --sort-column name
+----------------------------+
| name |
+----------------------------+
| DISK_GB |
| FPGA |
| IPV4_ADDRESS |
| MEMORY_MB |
| MEM_ENCRYPTION_CONTEXT |
| NET_BW_EGR_KILOBIT_PER_SEC |
| NET_BW_IGR_KILOBIT_PER_SEC |
| NUMA_CORE |
| NUMA_MEMORY_MB |
| NUMA_SOCKET |
| NUMA_THREAD |
| PCI_DEVICE |
| PCPU |
| PGPU |
| SRIOV_NET_VF |
| VCPU |
| VGPU |
| VGPU_DISPLAY_HEAD |
+----------------------------+
[root@controller ~]# openstack --os-placement-api-version 1.6 trait list --sort-column name
+---------------------------------------+
| name |
+---------------------------------------+
| COMPUTE_DEVICE_TAGGING |
| COMPUTE_GRAPHICS_MODEL_CIRRUS |
| COMPUTE_GRAPHICS_MODEL_GOP |
| COMPUTE_GRAPHICS_MODEL_NONE |
| COMPUTE_GRAPHICS_MODEL_QXL |
| COMPUTE_GRAPHICS_MODEL_VGA |
| COMPUTE_GRAPHICS_MODEL_VIRTIO |
| COMPUTE_GRAPHICS_MODEL_VMVGA |
| COMPUTE_GRAPHICS_MODEL_XEN |
| COMPUTE_IMAGE_TYPE_AKI |
| COMPUTE_IMAGE_TYPE_AMI |
| COMPUTE_IMAGE_TYPE_ARI |
... ...
六、进入dashboard显示无法加载实例
1.解决方案:
①.进入MySQL:手动设定最大连接次数,最大连接次数设置为500
②.我们可以看到默认的最大连接次数是214,我们手动修改到500
mysql -u root -p
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 214 |
+-----------------------+-------+
3 rows in set (0.01 sec)
MariaDB [(none)]> set global max_connections=500
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 594 |
+-----------------------+-------+
3 rows in set (0.002 sec)
2.解决方法(二):
①.手动修改配置文件,设置最大连接数
[root@controller ~]# vim /usr/lib/systemd/system/mariadb.service
[Service]
Type=notify
User=mysql
Group=mysql
LimitNOFILE=10000 ==>添加上
LimitNPROC=10000 ==>添加上
[root@controller ~]# systemctl --system daemon-reload
[root@controller ~]# systemctl restart mariadb.service
[root@controller ~]# mysql -u root -p
MariaDB [(none)]> show global variables like '%max_conn%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| extra_max_connections | 1 |
| max_connect_errors | 100 |
| max_connections | 4096 |
+-----------------------+-------+
3 rows in set (0.012 sec)
七、dashboard controller拒绝了我们的连接请求
文章来源地址https://www.toymoban.com/news/detail-768599.html
1.解决方案:
①.在C:\Windows\System32\drivers\etc\目录下,修改hosts文件
②.添加上"控制节点IP地址 和控制节点的主机名",作为主机名和IP地址之间的映射文件
这个时候我们就发现可以从dashboard访问实例控制台
文章来源:https://www.toymoban.com/news/detail-768599.html
到了这里,关于OpenStack报错解决文档的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!