ceph.py at 859 line:
do_full_backup = False
if self._file_is_rbd(volume_file):
# If volume an RBD, attempt incremental backup.
try: self._backup_rbd(backup_id, volume_id, volume_file, volume_name, length)
except exception.BackupRBDOperationFailed: LOG.debug("Forcing full backup of volume %s.", volume_id) do_full_backup = True
else: do_full_backup = True
if do_full_backup: self._full_backup(backup_id, volume_id, volume_file, volume_name, length)
but something goes wrong and function _file_is_rbd did return FALSE.
let's see to '_file_is_rbd' function in ceph.py at 683 line:
def _file_is_rbd(self, volume_file):
"""Returns True if the volume_file is actually an RBD image."""
return hasattr(volume_file, 'rbd_image')
It mean that attribute 'rbd_image' did not assigned.
'rbd_image' attribute belong to class 'RBDImageIOWrapper' at cinder/volume/drivers/rbd.py.
I try to debug those error.
ceph.py at 859 line: is_rbd( volume_ file):
self. _backup_ rbd(backup_ id, volume_id, volume_file,
volume_ name, length) BackupRBDOperat ionFailed:
LOG.debug( "Forcing full backup of volume %s.", volume_id)
do_full_ backup = True
do_ full_backup = True
do_full_backup = False
if self._file_
# If volume an RBD, attempt incremental backup.
try:
except exception.
else:
if do_full_backup:
self. _full_backup( backup_ id, volume_id, volume_file,
volume_ name, length)
but something goes wrong and function _file_is_rbd did return FALSE.
let's see to '_file_is_rbd' function in ceph.py at 683 line: volume_ file, 'rbd_image')
def _file_is_rbd(self, volume_file):
"""Returns True if the volume_file is actually an RBD image."""
return hasattr(
It mean that attribute 'rbd_image' did not assigned.
'rbd_image' attribute belong to class 'RBDImageIOWrapper' at cinder/ volume/ drivers/ rbd.py.
I try print out contents 'volume_file' array: cache', '_abc_negative_ cache_version' , '_abc_registry', '_checkClosed', '_checkReadable', '_checkSe
['__abs
tractmethods__', '__class__', '__delattr__', '__doc__', '__enter__', '__exit__', '__format__', '__getattribute__', '__hash__', '__init__', '__iter__', '__metaclass__', '__module__', '__new__', '__reduce__', '__re
duce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_abc_cache', '_abc_negative_
ekable', '_checkWritable', '_inc_offset', 'close', 'closed', 'fileno', 'flush', 'isatty', 'next', 'read', 'readable', 'readall', 'readline', 'readlines', 'seek', 'seekable', 'tell', 'truncate', 'writable', 'write
', 'writelines']'
those cells of array is in class RBDVolumeIOWrapper at os_brick/ initiator/ linuxrbd. py
In sum cinder-backup didn't identify image as rbd.
my cinder.conf at block node: rootwrap. conf api-paste. ini name_template = volume-%s cinder/ volumes backup. drivers. ceph ceph_chunk_ size = 134217728 ceph_stripe_ unit = 0 ceph_stripe_ count = 0 discard_ excess_ bytes = true /cinder: XXXXXXX@ controller/ cinder _rabbit] authtoken] controller: 5000/v2. 0 controller: 35357 volume. drivers. lvm.LVMVolumeDr iver volume. drivers. rbd.RBDDriver volume_ from_snapshot = false chunk_size = 4 timeout = -1
[DEFAULT]
debug = true
rootwrap_config = /etc/cinder/
api_paste_confg = /etc/cinder/
iscsi_helper = tgtadm
volume_
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.30.17.21
enabled_backends = lvm,rbd
glance_host = controller
control_exchange = cinder
notification_driver = messagingv2
backup_driver = cinder.
backup_ceph_conf = /etc/ceph/bak.conf
backup_ceph_user = cinder-backup
backup_
backup_ceph_pool = backups
backup_
backup_
restore_
[database]
connection = mysql:/
[oslo_messaging
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = XXXXXXXXX
[keystone_
auth_uri = http://
identity_uri = http://
admin_tenant_name = service
admin_user = cinder
admin_password = XXXXXXX
[lvm]
volume_driver = cinder.
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
[rbd]
volume_driver = cinder.
rbd_pool = os-volumes
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_
rbd_max_clone_depth = 5
rbd_store_
rados_connect_
glance_api_version = 2
rbd_user = cinder
rbd_secret_uuid = XXXXXXX
volume_backend_name = volume_ceph
[oslo_concurrency]
lock_path = /var/lock/cinder
and my volumes: :/var/log# cinder list ------- ------- ------- ------- ----+-- ------- --+---- ---+--- ---+--- ------- ---+--- ------- +------ ------- + ------- ------- ------- ------- ----+-- ------- --+---- ---+--- ---+--- ------- ---+--- ------- +------ ------- + a49b-45c4- 9f83-a40a45f0c5 44 | available | test2 | 1 | rbd | false | | 4625-40fc- ab8f-d147b2d224 b2 | available | test3 | 1 | rbd | false | | ------- ------- ------- ------- ----+-- ------- --+---- ---+--- ---+--- ------- ---+--- ------- +------ ------- + :/var/log# cinder type-list ------- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+ ------- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+ f612-4253- 9763-d7154987fe 66 | rbd | | True | fbad-4082- 9635-e48788a2f4 e1 | lvm | - | True | ------- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+ :/var/log# cinder type-show 903bc236- f612-4253- 9763-d7154987fe 66 ------- ------- ------- ------+ ------- ------- ------- ------- ------- ---+ ------- ------- ------- ------+ ------- ------- ------- ------- ------- ---+ f612-4253- 9763-d7154987fe 66 | type-access: is_public | True | ------- ------- ------- ------+ ------- ------- ------- ------- ------- ---+ ------- -----+- ------- -----+- -----+- ------- -+----- --+---- ------- ------- ------- ---+--- ------- ------- + ------- -----+- ------- -----+- -----+- ------- -+----- --+---- ------- ------- ------- ---+--- ------- ------- + 19T06:52: 27.000000 | - | 19T06:52: 44.000000 | - | 19T05:36: 40.000000 | - | 19T06:52: 24.000000 | - | 19T06:52: 23.000000 | - | ------- -----+- ------- -----+- -----+- ------- -+----- --+---- ------- ------- ------- ---+--- ------- ------- +
root@controller
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 8a554a85-
| dea5342c-
+------
root@controller
+------
| ID | Name | Description | Is_Public |
+------
| 903bc236-
| cae9eee2-
+------
root@controller
+------
| Property | Value |
+------
| description | |
| extra_specs | {} |
| id | 903bc236-
| is_public | True |
| name | rbd |
| os-volume-
| qos_specs_id | None |
+------
cinder service-list
+------
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------
| cinder-backup | block1 | nova | enabled | up | 2016-05-
| cinder-scheduler | controller | nova | enabled | up | 2016-05-
| cinder-volume | block1@ceph | nova | enabled | down | 2016-05-
| cinder-volume | block1@lvm | nova | enabled | up | 2016-05-
| cinder-volume | block1@rbd | nova | enabled | up | 2016-05-
+------