常见故障处理排查及使用方法
如下提到的处理方法,适用于以上三个版本的PackStack方式安装。
1.常见错误:
Testing if puppet apply is finished :192.168.100.100_controller.pp
安装过程卡在此步骤没有任何反应。
分析:网络正常情况下此过程不超过30分钟。时间过长时,需要确认关闭NetworkManger、selinux、firewalld。还可检查硬件配置,建议4核CPU+8GB内存或更高配置。还无法解决后可添加至2个网卡、2个磁盘。
2.PackStack日志信息:
PackStack安装过程中的日志在 /var/tmp/packstack/ 目录中。无法解决问题时可查看该目录下相关日志信息。
3.常见认证文件:
执行packstack --allinone安装命令后,会在执行目录下生成
keystonerc_admin 、keystonerc_demo、packstack-answers-20230125-111102.txt三个文件。可查看keystonerc_admin文件内容获取登录Dashboard的用户名和密码。安装过程的相关配置信息记录在packstack-answers-20230125-111102.txt文件中。执行OpenStack操作命令前需要执行source keystonerc_admin命令h获取管理员认证。
[root@openstack ~]# sudo dnf update -y
CentOS Stream 8 - AppStream 573 kB/s | 29 MB 00:51
cat /etc/environmentCentOS Stream 8 - BaseOS 93% [======================= ] 506 kB/s | CentOS Stream 8 - BaseOS 255 kB/s | 28 MB 01:50
CentOS Stream 8 - Extras 11 kB/s | 18 kB 00:01
CentOS Stream 8 - Extras [ === ] --- B/s | 0 B --:-- ETA
CentOS Stream 8 - Extras [ === ] --- B/s | 0 B --:-- ETA
CentOS Stream 8 - Extras common packages 91 B/s | 5.3 kB 01:00
Dependencies resolved.
Nothing to do.
Complete!
[root@openstack ~]# cat /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
[root@openstack ~]#
[root@openstack ~]#
[root@openstack ~]# sudo dnf config-manager --enable powertools
[root@openstack ~]# sudo dnf install -y centos-release-openstack-yoga
CentOS Stream 8 - PowerTools 207 kB/s | 5.8 MB 00:28
Last metadata expiration check: 0:00:15 ago on Sat 25 Mar 2023 01:16:59 PM EDT.
Dependencies resolved.
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Installing:
centos-release-openstack-yoga noarch 1-1.el8s extras-common 8.9 k
Installing dependencies:
centos-release-advanced-virtualization noarch 1.0-4.el8 extras 16 k
centos-release-ceph-pacific noarch 1.0-2.el8 extras 8.9 k
centos-release-messaging noarch 1-3.el8 extras 9.5 k
centos-release-nfv-common noarch 1-3.el8 extras 9.3 k
centos-release-nfv-openvswitch noarch 1-3.el8 extras 8.6 k
centos-release-rabbitmq-38 noarch 1-3.el8 extras 8.4 k
centos-release-storage-common noarch 2-2.el8 extras 9.4 k
centos-release-virt-common noarch 1-2.el8 extras 8.9 k
Transaction Summary
==========================================================================================
Install 9 Packages
------------------
Installed:
centos-release-advanced-virtualization-1.0-4.el8.noarch
centos-release-ceph-pacific-1.0-2.el8.noarch
centos-release-messaging-1-3.el8.noarch
centos-release-nfv-common-1-3.el8.noarch
centos-release-nfv-openvswitch-1-3.el8.noarch
centos-release-openstack-yoga-1-1.el8s.noarch
centos-release-rabbitmq-38-1-3.el8.noarch
centos-release-storage-common-2-2.el8.noarch
centos-release-virt-common-1-2.el8.noarch
Complete!
[root@openstack ~]# sudo dnf update -y
CentOS-8 - Advanced Virtualization 126 kB/s | 207 kB 00:01
CentOS-8-stream - Ceph Pacific 37 kB/s | 478 kB 00:12
CentOS-8 - RabbitMQ 38 40 kB/s | 80 kB 00:01
CentOS-8 - NFV OpenvSwitch 12 kB/s | 225 kB 00:18
CentOS-8 - OpenStack yoga 128 kB/s | 2.5 MB 00:19
Dependencies resolved.
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Installing:
python3-setuptools noarch 50.3.2-1.el8s centos-ceph-pacific 870 k
replacing platform-python-setuptools.noarch 39.2.0-7.el8
Upgrading:
libzstd x86_64 1.4.5-6.el8 centos-openstack-yoga 335 k
python3-decorator noarch 4.4.0-5.el8 centos-openstack-yoga 32 k
python3-six noarch 1.15.0-2.el8 centos-openstack-yoga 39 k
Transaction Summary
==========================================================================================
Install 1 Package
Upgrade 3 Packages
Total download size: 1.2 M
------------------
Upgraded:
libzstd-1.4.5-6.el8.x86_64 python3-decorator-4.4.0-5.el8.noarch
python3-six-1.15.0-2.el8.noarch
Installed:
python3-setuptools-50.3.2-1.el8s.noarch
Complete!
[root@openstack ~]# sudo dnf update -y
Last metadata expiration check: 0:00:15 ago on Sat 25 Mar 2023 01:18:22 PM EDT.
Dependencies resolved.
Nothing to do.
Complete!
[root@openstack ~]# sudo dnf install -y openstack-packstack
Last metadata expiration check: 0:00:26 ago on Sat 25 Mar 2023 01:18:22 PM EDT.
Dependencies resolved.
==========================================================================================
Package Arch Version Repository Size
==========================================================================================
Installing:
openstack-packstack noarch 1:20.0.0-1.el8 centos-openstack-yoga 192 k
Installing dependencies:
------------------
Install 102 Packages
Total download size: 39 M
Installed size: 132 M
Downloading Packages:
Complete!
[root@openstack ~]# sudo dnf install network-scripts -y^C
[root@openstack ~]#
[root@openstack ~]# tail /var/log/dnf.log
[root@openstack ~]# cat /etc/redhat-release
CentOS Stream release 8
[root@openstack ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 99G 0 part
├─cs_openstack-root 253:0 0 62.6G 0 lvm /
├─cs_openstack-swap 253:1 0 5.8G 0 lvm [SWAP]
└─cs_openstack-home 253:2 0 30.6G 0 lvm /home
sr0 11:0 1 1024M 0 rom
[root@openstack ~]#
[root@openstack ~]# vi /etc/hosts
[root@openstack ~]# cat /etc/environment
[root@openstack ~]#
[root@openstack ~]# vi /etc/environment
[root@openstack ~]# bash
[root@openstack ~]#
[root@openstack ~]#
[root@openstack ~]#
[root@openstack ~]# sudo dnf install network-scripts -y
Last metadata expiration check: 0:01:35 ago on Sat 25 Mar 2023 01:18:22 PM EDT.
Dependencies resolved.
=================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================
Installing:
network-scripts x86_64 10.00.18-1.el8 baseos 197 k
Installing dependencies:
bc x86_64 1.07.1-5.el8 baseos 129 k
ipcalc x86_64 0.2.4-4.el8 baseos 38 k
Installing weak dependencies:
geolite2-city noarch 20180605-1.el8 appstream 19 M
geolite2-country noarch 20180605-1.el8 appstream 1.0 M
libmaxminddb x86_64 1.2.0-10.el8 appstream 33 k
network-scripts-team x86_64 1.31-4.el8 baseos 28 k
------------------
Complete!
[root@openstack ~]# sudo systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@openstack ~]# sudo systemctl stop firewalld
[root@openstack ~]# sudo systemctl disable NetworkManager
Removed /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
[root@openstack ~]# sudo systemctl stop NetworkManager
[root@openstack ~]# sudo systemctl enable network
network.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable network
[root@openstack ~]# sudo systemctl start network
[root@openstack ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:b1:ad:3c brd ff:ff:ff:ff:ff:ff
altname enp2s1
inet 192.168.100.100/24 brd 192.168.100.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb1:ad3c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:b1:ad:46 brd ff:ff:ff:ff:ff:ff
altname enp2s2
[root@openstack ~]# sudo setenforce 0
[root@openstack ~]# sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
[root@openstack ~]# getenforce
Permissive
[root@openstack ~]# sudo packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20230325-132135-5m1z19ah/openstack-setup.log
Packstack changed given value to required value /root/.ssh/id_rsa.pub
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Swift builder entries [ DONE ]
Preparing Swift proxy entries [ DONE ]
Preparing Swift storage entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.100.100_controller.pp
Testing if puppet apply is finished: 192.168.100.100_controller.pp [ | ]
192.168.100.100_controller.pp: [ ERROR ]
Applying Puppet manifests [ ERROR ]
ERROR : Error appeared during Puppet run: 192.168.100.100_controller.pp
Error: Could not set 'present' on ensure: Failed to open TCP connection to github.com:443 (Connection refused - connect(2) for "github.com" port 443) (file: /var/tmp/packstack/8b431dc93460481f873b71f94d69d316/modules/packstack/manifests/provision/glance.pp, line: 8)
You will find full trace in log /var/tmp/packstack/20230325-132135-5m1z19ah/manifests/192.168.100.100_controller.pp.log
Please check log file /var/tmp/packstack/20230325-132135-5m1z19ah/openstack-setup.log for more information
Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS plugin. Geneve will be used as the encapsulation method for tenant networks
* A new answerfile was created in: /root/packstack-answers-20230325-132136.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.100.100. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.100.100/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
[root@openstack ~]#
[root@openstack ~]#
[root@openstack ~]# sudo packstack --answer-file=packstack-answers-20230325-132136.txt
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20230325-135731-lz24iner/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Swift builder entries [ DONE ]
Preparing Swift proxy entries [ DONE ]
Preparing Swift storage entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.100.100_controller.pp
192.168.100.100_controller.pp: [ DONE ]
Applying 192.168.100.100_network.pp
192.168.100.100_network.pp: [ DONE ]
Applying 192.168.100.100_compute.pp
192.168.100.100_compute.pp: [ DONE ]
Applying 192.168.100.100_controller_post.pp
192.168.100.100_controller_post.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]
**** Installation completed successfully ******
Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS plugin. Geneve will be used as the encapsulation method for tenant networks
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.100.100. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.100.100/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20230325-135731-lz24iner/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20230325-135731-lz24iner/manifests