我正在尝试在 4 节点堆栈上安装和配置 OpenStack Mitaka。1 个控制器、1 个计算、1 个块存储和 1 个对象存储。尝试创建块存储节点时,我无法通过仪表板创建卷。基本操作系统 os Ubuntu 14.04,就像我之前所说的 OpenStack 的 Mitaka 版本。
这是控制器节点上的 cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.11
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
iscsi_protocol = iscsi
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = *********
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = **********
[database]
connection = mysql+pymysql://cinder:********@controller/cinder
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
这是 Cinder(块存储)节点上的 cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.41
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = **********
enabled_backends = lvm
glance_api_servers = http://controller:9292
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = ********
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
[database]
#connection = mysql+pymysql://cinder:*******@controller/cinder
connection = mysql+pymysql://cinder:*******@controller/cinder
#connection = mysql://cinder:******@controller/cinder
[api_database]
connection = mysql+pymysql://cinder:*******@controller/cinder_api
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
我创建卷后的状态是“错误”。这是我在控制器节点上的cinder-scheduler.log文件中得到的错误行
2016-09-07 17:14:22.291 10607 ERROR cinder.scheduler.flows.create_volume [req-272c5387-a2e3-4371-8a14-8330831910d0 a43909277cbb418fa12fab4d22e0586c 64d180e39e2345ac9bbcd0c389b0a7c4 - - -] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available
这是我认为错误消息中最重要的部分:
卷:创建:没有找到有效的主机。没有可用的称重主机
当我从控制器节点运行命令“cinder service-list”时,我得到以下输出:
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | controller | nova | enabled | up | 2016-09-07T22:13:11.000000 | - |
| cinder-volume | cinder | nova | enabled | up | 2016-09-07T22:13:30.000000 | - |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
有趣的是,主机名是cinder。在 Mitaka 安装指南中,主机名是 block1@lvm。不知道为什么我的不同,或者这是否相关。发现它很有趣,也许是我的问题的线索。
这让我相信 Cinder 节点和控制器节点能够“看到”或相互通信。我相信我已经在 Cinder 节点内正确配置了 lvm。以防万一这是 lvm.conf 文件中的过滤器部分:
filter = [ "a/sda/", "a ...
说了这么多。我认为这是分区/硬盘驱动器格式问题。或者,rabbitmq(消息服务)问题。我确实在Cinder 节点上安装了 rabbitmq-server ,我知道这不是指南设置的方式,这意味着它可能是错误的。我现在尝试做的是从Cinder Node中删除 rabbitmq-server 。我相信我会遇到的问题是Cinder 节点和控制器节点不会“看到”对方。如果是这种情况,那么我现在正在运行的 3 个节点中的任何一个节点上的 cons 文件可能有问题?现在运行的 3 个节点是 Controller、Compute 和 Cinder。
让我知道你们的想法。如果您发现我的 cons 文件有问题,请告诉我。最后一段是为了解释我的想法,以及项目的当前状态。如果您在我的逻辑中发现错误,或者认为可能有更好的方法来解决问题,我会全力以赴!
感谢大家!