Comment 5 for bug 1641518

Revision history for this message
suntao (244914362-q) wrote :

i try to solve the problem like this, is it right?

def _delete_clone_parent_refs(self, client, parent_name, parent_snap)
    parent_image_found = True
    try:
        parent_rbd = self.rbd.Image(client.ioctx, parent_name)
    except self.rbd.ImageNotFound:
        parent_image_found = False
        LOG.info("parent volume %s no longer exists in backend", parent_name)

    if not parent_image_found:
        parent_name = parent_name + '.deleted'
        try:
            parent_rbd = self.rbd.Image(client.ioctx, parent_name)
        except self.rbd.ImageNotFound:
            LOG.info("parent volume %s no longer exists in backend", parent_name)
            return

    parent_has_snapts = False
    ... ...