Fail to rename ceph config file for cinder-backup

Bug #1810353 reported by Dai Dang Van
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Dai Dang Van

Bug Description

### When I try to rename ceph.conf to ceph.abc.conf and reconfigure the Cinder services following:

backup_driver = cinder.backup.drivers.ceph.CephBackupDriver
backup_ceph_conf = /etc/ceph/ceph.abc.conf
backup_ceph_user = cinder-backup
backup_ceph_chunk_size = 134217728
backup_ceph_pool = backups

### I got this bug:

2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall [-] Fixed interval looping call 'cinder.backup.manager.BackupManager._setup_backup_driver' failed: ObjectNotFound: [errno 2] error connecting to the cluster
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall Traceback (most recent call last):
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/oslo_service/loopingcall.py", line 193, in _run_loop
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall result = func(*self.args, **self.kw)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/cinder/backup/manager.py", line 152, in _setup_backup_driver
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall backup_service.check_for_setup_error()
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/cinder/backup/drivers/ceph.py", line 289, in check_for_setup_error
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall with rbd_driver.RADOSClient(self, self._ceph_backup_pool):
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 176, in __init__
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall self.cluster, self.ioctx = driver._connect_to_rados(pool)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/cinder/backup/drivers/ceph.py", line 298, in _connect_to_rados
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall client.connect()
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall result = proxy_call(self._autowrap, f, *args, **kwargs)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall rv = execute(f, *args, **kwargs)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall six.reraise(c, e, tb)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall rv = meth(*args, **kwargs)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall File "rados.pyx", line 875, in rados.Rados.connect (/builddir/build/BUILD/ceph-12.2.5/build/src/pybind/rados/pyrex/rados.c:9764)
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall ObjectNotFound: [errno 2] error connecting to the cluster
2019-01-02 18:14:13.059 8 ERROR oslo.service.loopingcall
2019-01-02 18:14:19.002 8 ERROR cinder.service [-] Manager for service cinder-backup compute16 is reporting problems, not sending heartbeat. Service will appear "down".
2019-01-02 18:14:29.003 8 ERROR cinder.service [-] Manager for service cinder-backup compute16 is reporting problems, not sending heartbeat. Service will appear "down".

### And the problem caused by missing clustername parameter for Rados object[1].

>>> cluster = rados.Rados(rados_id="cinder-backup", conffile='/etc/ceph/ceph.conf')
>>> cluster.connect()
>>> cluster.list_pools()
[u'volumes', u'images', u'backups', u'vms', u'journal_pool']
>>> cluster = rados.Rados(rados_id="cinder-backup", conffile='/etc/ceph/ceph.abc.conf')
>>> cluster.connect()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rados.pyx", line 875, in rados.Rados.connect (/builddir/build/BUILD/ceph-12.2.5/build/src/pybind/rados/pyrex/rados.c:9764)
rados.ObjectNotFound: [errno 2] error connecting to the cluster
>>> cluster = rados.Rados(rados_id="cinder-backup", conffile='/etc/ceph/ceph.abc.conf', clustername="ceph")
>>> cluster.connect()
>>> cluster.list_pools()
[u'volumes', u'images', u'backups', u'vms', u'journal_pool']

I think we should have ceph_backup_cluster_name option as rbd driver already done[2].

[1] https://github.com/openstack/cinder/blob/master/cinder/backup/drivers/ceph.py#L294-L296
[2] https://github.com/openstack/cinder/blob/master/cinder/volume/drivers/rbd.py#L58

Changed in cinder:
assignee: nobody → Dai Dang Van (daikk115)
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.