From: Yin Congmin Date: Wed, 10 Jun 2020 06:52:08 +0000 (+0800) Subject: librbd/image: fix immutable object cache read failed bug when daemon down X-Git-Tag: v16.1.0~1866^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1af4ed0a76c898c971f47274fb0dd224a4c7b1cc;p=ceph.git librbd/image: fix immutable object cache read failed bug when daemon down Fix bug: read child image failed when enabling immutable object cache and daemon down Signed-off-by: Yin Congmin --- diff --git a/qa/suites/rbd/immutable-object-cache/pool/ceph_and_immutable_object_cache.yaml b/qa/suites/rbd/immutable-object-cache/pool/ceph_and_immutable_object_cache.yaml index 540e33d06472..e977c1ba6f25 100644 --- a/qa/suites/rbd/immutable-object-cache/pool/ceph_and_immutable_object_cache.yaml +++ b/qa/suites/rbd/immutable-object-cache/pool/ceph_and_immutable_object_cache.yaml @@ -4,8 +4,9 @@ tasks: - ceph: conf: client: - rbd_parent_cache_enabled: true - immutable object cache path: /tmp/ceph-immutable-object-cache - immutable object cache max size: 10G + rbd parent cache enabled: true + rbd plugins: parent_cache + immutable_object_cache_path: /tmp/ceph-immutable-object-cache + immutable_object_cache_max_size: 10G - immutable_object_cache: client.0: diff --git a/qa/suites/rbd/immutable-object-cache/workloads/qemu_on_immutable_object_cache_and_thrash.yaml b/qa/suites/rbd/immutable-object-cache/workloads/qemu_on_immutable_object_cache_and_thrash.yaml index 30cb9f0a16a0..33a5cf0b1755 100644 --- a/qa/suites/rbd/immutable-object-cache/workloads/qemu_on_immutable_object_cache_and_thrash.yaml +++ b/qa/suites/rbd/immutable-object-cache/workloads/qemu_on_immutable_object_cache_and_thrash.yaml @@ -1,11 +1,11 @@ +tasks: - qemu: client.0: clone: true test: qa/run_xfstests_qemu.sh - image_url: http://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img + type: block cpus: 4 memory: 4096 disks: 3 -tasks: - immutable_object_cache_thrash: client.0: diff --git a/qa/tasks/immutable_object_cache.py b/qa/tasks/immutable_object_cache.py index 9bbb5659d442..0635c9702902 100644 --- a/qa/tasks/immutable_object_cache.py +++ b/qa/tasks/immutable_object_cache.py @@ -1,19 +1,12 @@ """ immutable object cache task """ -from io import StringIO - import contextlib import logging -import os -import yaml -import time from teuthology import misc as teuthology from teuthology import contextutil -from tasks import rbd from teuthology.orchestra import run -from teuthology.config import config as teuth_config log = logging.getLogger(__name__) diff --git a/qa/tasks/immutable_object_cache_thrash.py b/qa/tasks/immutable_object_cache_thrash.py index 46d2ca6ea09b..0bf3ad3a0406 100644 --- a/qa/tasks/immutable_object_cache_thrash.py +++ b/qa/tasks/immutable_object_cache_thrash.py @@ -1,19 +1,12 @@ """ immutable object cache thrash task """ -from io import StringIO - import contextlib import logging -import os -import yaml -import time from teuthology import misc as teuthology from teuthology import contextutil -from tasks import rbd from teuthology.orchestra import run -from teuthology.config import config as teuth_config DEFAULT_KILL_DAEMON_TIME = 2 DEFAULT_DEAD_TIME = 30 diff --git a/src/librbd/image/OpenRequest.cc b/src/librbd/image/OpenRequest.cc index 9f03857770fc..ccca85ff476c 100644 --- a/src/librbd/image/OpenRequest.cc +++ b/src/librbd/image/OpenRequest.cc @@ -544,8 +544,6 @@ Context* OpenRequest::handle_init_plugin_registry(int *result) { if (*result < 0) { lderr(cct) << "failed to initialize plugin registry: " << cpp_strerror(*result) << dendl; - send_close_image(*result); - return nullptr; } return send_init_cache(result);