Eu passei bastante tempo tentando configurar o Puppet para que ele configure o Cinder para usar o GlusterFS como backend, em vez do backend do LVMISCSI, mas não tive sorte.
Versões:
- Puppet 3.7.3
- Cinder 1.0.8
- Gluster 3.4.2
- Ubuntu 14.10 Server
- puppetlabs-openstack 4.2.0
Configurações:
Além das configurações do Puppet Openstack, que funcionam bem, tenho o seguinte para o manifesto do meu nó de armazenamento:
class { 'cinder::backends':
enabled_backends => ['glusterfs']
}
class { 'cinder::volume::glusterfs':
glusterfs_shares => ['192.168.2.5:/cinder-volumes'],
glusterfs_mount_point_base => '/var/lib/cinder/mnt'
}
resultando em um cinder.conf no meu nó de armazenamento que se parece com isso:
[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 = no
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rabbit_host=192.168.2.1
use_syslog=False
api_paste_config=/etc/cinder/api-paste.ini
glance_num_retries=0
volume_driver=cinder.volume.drivers.glusterfs.GlusterfsDriver
enabled_backends=glusterfs
debug=no
glance_api_ssl_compression=False
glance_api_insecure=False
rabbit_userid=openstack
rabbit_use_ssl=False
log_dir=/var/log/cinder
glance_api_servers=192.168.1.5:9292
volume_backend_name=DEFAULT
rabbit_virtual_host=/
rabbit_hosts=192.168.2.1:5672
glusterfs_shares_config=/etc/cinder/shares.conf
control_exchange=openstack
rabbit_ha_queues=False
glance_api_version=2
amqp_durable_queues=False
rabbit_password=**redacted**
rabbit_port=5672
rpc_backend=cinder.openstack.common.rpc.impl_kombu
No entanto, apesar da configuração do Gluster, ainda recebo erros relacionados ao LVMISCSI:
2015-01-02 10:22:49.488 1005 WARNING cinder.volume.manager [-] Unable to update stats, LVMISCSIDriver -2.0.0 (config name glusterfs) driver is uninitialized. (ad infinitum)
bem como um stacktrace:
WARNING cinder.context [-] Arguments dropped when creating context: {'user': u'203e3f206c5445beac797c1bcaecea8e', 'tenant': u'd588bf47f01349f39fd609440ca1d97a', 'user_identity': u'203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -'}
ERROR cinder.utils [req-6bcc2064-aa07-47ac-809e-cbb46c53b245 203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -] Volume driver LVMISCSIDriver not initialized
ERROR oslo.messaging.rpc.dispatcher [req-6bcc2064-aa07-47ac-809e-cbb46c53b245 203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -] Exception during message handling: Volume driver not ready.
TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
TRACE oslo.messaging.rpc.dispatcher incoming.message))
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 144, in lvo_inner1
TRACE oslo.messaging.rpc.dispatcher return lvo_inner2(inst, context, volume_id, **kwargs)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/lockutils.py", line 233, in inner
TRACE oslo.messaging.rpc.dispatcher retval = f(*args, **kwargs)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 143, in lvo_inner2
TRACE oslo.messaging.rpc.dispatcher return f(*_args, **_kwargs)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 416, in delete_volume
TRACE oslo.messaging.rpc.dispatcher {'status': 'error_deleting'})
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/excutils.py", line 68, in __exit__
TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 397, in delete_volume
TRACE oslo.messaging.rpc.dispatcher utils.require_driver_initialized(self.driver)
TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/utils.py", line 761, in require_driver_initialized
TRACE oslo.messaging.rpc.dispatcher raise exception.DriverNotInitialized()
TRACE oslo.messaging.rpc.dispatcher DriverNotInitialized: Volume driver not ready.
TRACE oslo.messaging.rpc.dispatcher
ERROR oslo.messaging._drivers.common [req-6bcc2064-aa07-47ac-809e-cbb46c53b245 203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -] Returning exception Volume driver not ready. to caller
Eu não quero bagunçar a pergunta, mas se você precisar de outras informações, avise-me e obrigado antecipadamente!
Editar
Alterei o manifesto do nó de armazenamento para que ele contenha:
class { 'cinder::backends':
enabled_backends => ['gluster']
}
# class { '::cinder::volume::glusterfs':
# glusterfs_shares => ['192.168.2.5:/cinder-volumes'],
# glusterfs_mount_point_base => '/var/lib/cinder/mnt'
# }
cinder::backend::glusterfs { 'gluster':
glusterfs_shares => ['192.168.2.5:/cinder-volumes'],
glusterfs_mount_point_base => '/var/lib/cinder/mnt'
}
Agora, Cinder / Gluster, na verdade, funciona, mas não perfeitamente. Você notará que eu removi a definição de volume e fui diretamente para a definição de back-end. Isso parece ter feito o truque para fazer Gluster e Cinder jogarem bem, mas ainda estou recebendo o seguinte em cinder-scheduler.log
WARNING cinder.context [-] Arguments dropped when creating context: {'user': u'203e3f206c5445beac797c1bcaecea8e', 'tenant': u'd588bf47f01349f39fd609440ca1d97a', 'user_identity': u'203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -'}
WARNING cinder.scheduler.host_manager [req-15855071-6eaa-41a2-87a9-70be47767f28 203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -] volume service is down or disabled. (host: media)
WARNING cinder.scheduler.host_manager [req-15855071-6eaa-41a2-87a9-70be47767f28 203e3f206c5445beac797c1bcaecea8e d588bf47f01349f39fd609440ca1d97a - - -] volume service is down or disabled. (host: media@glusterfs)