kolla(Ocata)部署場景下,lvm的雲硬碟掛載不上
報錯日誌/var/lib/docker/volumes/kolla_logs/_data/nova/nova-compute.log:
2017-05-29 17:54:34.543 6 WARNING os_brick.initiator.connectors.iscsi [req-54078aea-1d60-4cf7-a725-90544ddc3792 71171b238f074421a933ce60aa6bf22d d21ec75080474958928e5168973d68d7 - - -] Failed to connect to iSCSI portal 127.0.0.1:3260.
2017-05-29 17:54:34.543 6 ERROR os_brick.initiator.connectors.iscsi [req-54078aea-1d60-4cf7-a725-90544ddc3792 71171b238f074421a933ce60aa6bf22d d21ec75080474958928e5168973d68d7 - - -] Could not login to any iSCSI portal.
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [req-54078aea-1d60-4cf7-a725-90544ddc3792 71171b238f074421a933ce60aa6bf22d d21ec75080474958928e5168973d68d7 - - -] [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] Driver failed to attach volume 10ba032a-80a3-4dc7-aba5-0869123ed97a at /dev/vdb
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] Traceback (most recent call last):
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/block_device.py", line 273, in attach
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] device_type=self['device_type'], encryption=encryption)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1217, in attach_volume
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] self._connect_volume(connection_info, disk_info)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1158, in _connect_volume
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] vol_driver.connect_volume(connection_info, disk_info)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/volume/iscsi.py", line 64, in connect_volume
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] device_info = self.connector.connect_volume(connection_info['data'])
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/os_brick/utils.py", line 137, in trace_logging_wrapper
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] return f(*args, **kwargs)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] return f(*args, **kwargs)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/os_brick/utils.py", line 61, in _wrapper
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] return r.call(f, *args, **kwargs)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/retrying.py", line 206, in call
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] return attempt.get(self._wrap_exception)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/retrying.py", line 247, in get
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] six.reraise(self.value[0], self.value[1], self.value[2])
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/retrying.py", line 200, in call
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/os_brick/initiator/connectors/iscsi.py", line 405, in connect_volume
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] connection_properties)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] File "/var/lib/kolla/venv/lib/python2.7/site-packages/os_brick/initiator/connectors/iscsi.py", line 236, in _get_potential_volume_paths
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] raise exception.FailedISCSITargetPortalLogin(message=msg)
2017-05-29 17:54:34.544 6 ERROR nova.virt.block_device [instance: ae5c1c52-32be-4d3b-a60b-f5db5d6c6701] FailedISCSITargetPortalLogin: Could not login to any iSCSI portal.
在nova-compute去執行虛擬機器掛在的時候,會去獲取本地機器的ip,組成iscsid portal。
然而獲取ip的函式有問題,特別是針對多網路卡的ip配置場景,不能獲取預先在tgtd容器中配置好的管理ip地址。
D:\code\nova\nova\conf\netconf.py程式碼如下:
import socket
from oslo_config import cfg
from oslo_utils import netutils
# netutils.get_my_ipv4()這個函式有問題。獲取到的ip地址是127.0.0.1
netconf_opts = [
cfg.StrOpt("my_ip",
default=netutils.get_my_ipv4(),
help="""
The IP address which the host is using to connect to the management network.
Possible values:
* String with valid IP address. Default is IPv4 address of this host.
Related options:
* metadata_host
* my_block_storage_ip
* routing_source_ip
* vpn_ip
"""),
cfg.StrOpt("my_block_storage_ip",
default="$my_ip",
help="""
而tgtd的容器配置是配置了本地的管理ip地址192.168.102.21。見/etc/kolla/tgtd/config.josn配置
{
"command": "tgtd -d 1 -f --iscsi portal=192.168.102.21:3260",
"config_files": []
}
應改成為:
{
"command": "tgtd -d 1 -f --iscsi portal=0.0.0.0:3260",
"config_files": []
}
改完之後重啟tgtd容器。
或者修改ansible 端,修改配置檔案C:\code\kolla-ansible\ansible\roles\iscsi\templates\tgtd.json.j2,重新執行playbook。
ps:最好的辦法是修改D:\code\nova\nova\conf\netconf.py程式碼,獲取真正的管理段ip地址。
相關文章
- LVM方式掛載硬碟及擴容LVM硬碟
- 【ubuntu】解決行動硬碟掛載不上的問題Ubuntu硬碟
- 騰訊雲伺服器掛載雲硬碟伺服器硬碟
- Linux 下掛載硬碟的 方法Linux硬碟
- 雲伺服器掛載硬碟命令伺服器硬碟
- kolla-ansible 原始碼下載原始碼
- ubuntu下無法掛載硬碟以及行動硬碟Ubuntu硬碟
- ubuntu環境下掛載新硬碟(轉載)Ubuntu硬碟
- 雲伺服器硬碟分割槽及掛載伺服器硬碟
- vmware下linux掛載行動硬碟Linux硬碟
- Kolla-ansible部署openStack
- 掛載已有資料的LVM磁碟LVM
- linux下掛載行動硬碟(ntfs格式)Linux硬碟
- linux掛載硬碟Linux硬碟
- ubuntu 掛載新硬碟Ubuntu硬碟
- 機械硬碟與固態硬碟的適用場景硬碟
- linux下玩轉磁碟管理與掛載硬碟Linux硬碟
- Linux下新增新硬碟,分割槽及掛載Linux硬碟
- linux下掛載新硬碟和分割槽的步驟Linux硬碟
- Linux 掛載硬碟方法Linux硬碟
- solaris新增硬碟並掛載硬碟
- 區域網硬碟掛載硬碟
- 掛載Linux雲主機硬碟到本地計算機Linux硬碟計算機
- Linux下掛載隨身碟和行動硬碟Linux硬碟
- CCE雲原生混部場景下的測試案例
- linux掛載新硬碟,開機自動掛載Linux硬碟
- Linux系統下掛載NTFS行動硬碟的一個例子Linux硬碟
- Redhat Linux 硬碟掛載方法RedhatLinux硬碟
- fstab 與行動硬碟掛載硬碟
- Linux LVM磁碟管理與FS掛載LinuxLVM
- oracle-linux下掛載"行動硬碟" NTFS型別OracleLinux硬碟型別
- TiDB 在咪咕雲原生場景下的實踐TiDB
- VM下LINUX完美增加硬碟空間(LVM)薦Linux硬碟LVM
- 5G時代下的AI應用場景展望(附下載)AI
- 在linux主機間搬硬碟,裝載LVM.Linux硬碟LVM
- 雲上創新,阿里雲視訊雲分享全場景音視訊服務背後的場景探索與技術實踐阿里
- API 管理在雲原生場景下的機遇與挑戰API
- 虛擬機器Ubuntu 掛載硬碟虛擬機Ubuntu硬碟