kolla-ansible部署openstack常見錯誤匯總(stein)


錯誤1: 檢查環境時,no module named docker

pip install docker-compose

錯誤2:環境檢查時,nova任務時報錯TASK [nova : Ensuring config directories exist]

"The conditional check 'inventory_hostname in groups[item.value.group]' failed,The error appears to be in '/usr/share/kolla-ansible/ansible/roles/nova/tasks/config.yml': line 14

嘗試清除緩存,重新執行

kolla-ansible destroy ./all-in-one --yes-i-really-really-mean-it
錯誤依然,查看kolla-ansible/ansible/roles/nova/tasks/config.yml,第14行的作用:創建neutron各服務的配置文件目錄,查看/etc/kolla下自動啟動的組件有相應文件夾及配置文件,因此手動創建

mkdir /etc/kolla/nova touch /etc/kolla/nova/nova.conf
問題的根本原因是pip安裝的kolla-ansible與克隆的代碼的all-in-one不匹配

需要手動安裝kolla-ansible
python kolla-ansible/setup.py install

錯誤3:在dashboard上創建實例報錯,但是命令行可以創建

Error:Failed to perform requested operation on instance "test3", the instance has an error status: Please try again later [Error: Build of instance 5f875c14-2050-42c2-a749-09ec2162e68c aborted: Volume dfc5e50e-9034-4467-ab67-091362f18309 did not finish being created even after we waited 0 seconds or 1 attempts. And its status is error.].

查看nova日志
cat /var/log/kolla/nova/nova-compute.log ​ Instance failed block device setup: VolumeNotCreated

錯誤為存儲卷沒有創建,說明可能是cinder的問題

查看cinder日志

tail -f /var/log/kolla/cinder/cinder-volume.log
​
ERROR cinder.cmd.volume [-] Configuration for cinder-volume does not specify "enabled_backends". Using DEFAULT section to configure drivers is not supported since Ocata.

查看volume狀態

openstack volume service list ​ cinder-backup\cinder-volume:down
發現cinder-volume服務的狀態為:down,猜測問題的根本原因就在這里

解決方法:創建cinder-volumes卷組
1. dd if=/dev/zero of=./disk.img count=200 bs=512MB ​ 2. losetup -f ​ 3. losetup /dev/loop0 disk.img ​ 4. pvcreate /dev/loop0 ​ 5. vgcreate cinder-volumes /dev/loop0
創建好卷組,重新部署,查看cinder-volume的狀態為up

錯誤4:登錄權限問題

使用命令行操作時,初次登陸操作會顯示如下錯誤

Missing value auth-url required for auth plugin password

執行一下憑證文件

. /etc/kolla/admin-openrc.sh

 錯誤5:glance連接ceph后創建鏡像,狀態一直是:queued,查看glance日志

ERROR glance.common.wsgi ObjectNotFound: [errno 2] error calling conf_read_file

創建鏡像一直排隊,說明數據無法寫入,日志信息說明glance讀取配置文件時出錯了

修改配置文件后,日志中又出現其他錯誤,但是說明可以讀到配置文件了:

1. glance_store._drivers.rbd ObjectNotFound: [errno 2] error connecting to the cluster ​ 2. Failed to upload image data due to internal error: BackendException

錯誤顯示glance無法連接cluster,猜測是由於ceph認證失敗導致,

解決方法:

將/etc/ceph/ceph.client.admin.keyring拷入glance_api容器的/etc/ceph下

錯誤6:連接ceph,創建虛擬機之后,實例無法啟動,顯示:no bootable device

上傳鏡像的格式問題,需轉為raw格式

錯誤7:更改掛載盤之后的問題

更改docker掛載盤之后,某些容器一直重啟中,清除所有容器之后重新部署,某些容器還是一直重啟中,猜測與鏡像有關,執行下面命令,清除所有的鏡像文件

docker rmi $(docker images -q)

重新載入鏡像

docker load -i super.tar 

重新執行部署

錯誤8:mariadb等待VIP超時

檢查/etc/kolla/globals.yml文件,將kolla_internal_vip_address配置項注釋掉

錯誤9:no module named decorate

需要升級包

pip install -U decorate

錯誤10: 安裝openstack CLI客戶端時

ERROR: Cannot uninstall 'pyOpenSSL',執行下面的命令進行安裝

 pip install python-openstackclient --ignore-installed pyOpenSSl

錯誤11: 環境檢查時,gather facts卡頓很久

重啟機器自然解決

錯誤12: 刪除鏡像失敗,glance日志顯示權限錯誤

原因:鏡像中有一個snapshot,ceph對於snapshot是保護的,需要先刪除snapshot,才能刪除鏡

錯誤13:生成密碼時,報錯:'module' object has no attribute '_ssl write_string'

根據提示檢查cryptography是否安裝了兩個版本,徹底卸載重裝

錯誤14:檢查環境,check libvirt is not running

需要libvirt是關閉的狀態

systemctl libvirtd stop

錯誤15:創建實例等待超時,查看日志:Stashed volume connector host is localhost.: BuildAbortException

猜測是卷組空間不足

 

# 查看卷組空間 vgs ​ 1. dd if=/dev/zero of=./disk.img count=200 bs=512MB ​ 2. losetup -f ​ 3. losetup /dev/loop1 disk.img ​ 4. pvcreate /dev/loop1 ​ # 將新建pv擴展至已存在的卷組 5. vgextend cinder-volumes /dev/loop1 ​ # 重啟容器 docker ps -a | grep kolla | awk '{print $1}' | xargs docker restart

 

錯誤16:環境檢查時的錯誤

ERROR! An unhandled exception occurred while templating '{{ neutron_tenant_network_types.replace(' ', '').split(',') | reject('equalto', '') | list }}'. Error was a <class 'jinja2.exceptions.TemplateRuntimeError'>, original message: no test named 'equalto'
解決方法:
pip install jinja2

 

錯誤17:Error response from daemon: No such container: mariadb"

  某一個節點無法啟動mariadb容器

  銷毀之后,查看docker是否還有mariadb的volume

docker volume ls

docker volume rm [id]
錯誤18:ERROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
由於庫版本沖突,卸載時有其他庫依賴此庫,因此卸載失敗,直接刪除,重裝
rm -r /usr/lib/python2.7/site-packages/requests
​
pip install requests

錯誤19:環境檢查時,glance或者cinder出現與ceph相關的錯誤

檢查/etc/kolla/config是否有相應配置文件,以及multinode中是否加入ceph配置

錯誤20:鏈接ceph后,創建虛機出錯,nova-compute.log中出現secret相關錯誤

檢查/etc/kolla/nova-libvirt/中是否有secret.xml,及uuid是否相對應
<secret ephemeral='no' private='no'>
<uuid>6000a67b-0060-4b92-a6b1-4763fbeb04a7</uuid>
<usage type='ceph'>
<name>client.cinder secret</name>
</usage>
</secret>

創建完secret.xml文件,進入nova-libvirt設置secret的值
virsh secret-define --file secret.xml
virsh secret-set-value --secret 6000a67b-0060-4b92-a6b1-4763fbeb04a7 --base64 $(cat client.cinder.key)

錯誤21:rally創建環境時錯誤:there is no platform pulgin with name existing@openstack

檢查rally-openstack及依賴包版本

錯誤22:live_migration失敗

vi /etc/kolla/nova-libvirt/libvirtd.conf

listen_addr="0.0.0.0"
重啟容器
或許secret失效,重新執行上面的virsh secret-define ...


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM