kolla(Ocata) 배치 장면에서 lvm의 클라우드 하드디스크가 마운트되지 않습니다

7152 단어
오류 로그/var/lib/docker/volumes/kollalogs/_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:\codeovaova\confetconf.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, 플레이북을 다시 실행합니다.
ps: 가장 좋은 방법은 D:\codeovaova\confetconf를 수정하는 것입니다.py 코드, 진정한 관리 세그먼트 IP 주소를 가져옵니다.

좋은 웹페이지 즐겨찾기