Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip-rbd-rm-watchers #1159

Merged
merged 4 commits into from
Jan 30, 2014
Merged

wip-rbd-rm-watchers #1159

merged 4 commits into from
Jan 30, 2014

Commits on Jan 30, 2014

  1. pybind: work around find_library() not searching LD_LIBRARY_PATH

    Commit b28b64a ("pybind: use find_library for libcephfs and
    librbd") switched us to find_library(), but this function doesn't seem
    to respect LD_LIBRARY_PATH.  There are numerous python tickets, dating
    back several years, but alas.  Work around it by using the soname as
    a fallback.  (rados.py has been fixed by commit e46d2ca ("fix the
    bug  ctypes.util.find_library to search for librados failed on
    Centos6.4.")
    
    Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
    idryomov committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    dcbe872 View commit details
    Browse the repository at this point in the history
  2. rbd: check for watchers before trimming an image on 'rbd rm'

    Check for watchers before trimming image data to try to avoid getting
    into the following situation:
    
      - user does 'rbd rm' on a mapped image with an fs mounted from it
      - 'rbd rm' trims (removes) all image data, only header is left
      - 'rbd rm' tries to remove a header and fails because krbd has a
        watcher registered on the header
      - at this point image cannot be unmapped because of the mounted fs
      - fs cannot be unmounted because all its data and metadata is gone
    
    Unfortunately, this fix doesn't make it impossible to happen (the
    required atomicity isn't there), but it's a big improvement over the
    status quo.
    
    Fixes: http://tracker.ceph.com/issues/7076
    
    Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
    idryomov committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    0a553cf View commit details
    Browse the repository at this point in the history
  3. rbd: don't forget to call close_image() if remove_child() fails

    close_image() among other things unregisters a watcher that's been
    registered by open_image().  Even though it'll timeout in 30 or so
    seconds, it's not nice now that we check for watchers before starting
    the removal process.
    
    Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
    idryomov committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    4ebc32f View commit details
    Browse the repository at this point in the history
  4. run-rbd-tests: run remove_with_watcher test

    Bug #2533 has been fixed for a while now, start running
    remove_with_watcher test.
    
    Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
    idryomov committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    e78f756 View commit details
    Browse the repository at this point in the history