Description of problem: The librbd API has been extended to provide callback hooks to alert librbd clients that a snapshot creation is in-progress. librbd clients can register for the hook in order to quiesce / freeze the block device and/or file system prior to the snapshot being created. The first librbd client to utilize this new hook is the "rbd-nbd" daemon which will invoke "fsfreeze" to freeze and thaw mounted file systems on NBD-backed RBD images. Version-Release number of selected component (if applicable): 5.0
Please specify the severity of this bug. Severity is defined here: https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.
Jason, is this all complete in pacific upstream now? Any information for QE to verify this feature?
It's been merged and documented upstream for a while now.
I'm setting Fixed In Version to the current RH Ceph Storage 5 build.
Working as expected. Hence moving this bug to verified state. [root@magna081 ~]# rbd device --device-type nbd map --quiesce --quiesce-hook /home/gpatta/hook/rbd-nbd_quiesce rbd-nbd_pool/rbd-nbd-image /dev/nbd0 [root@magna081 ~]# rbd-nbd list-mapped id pool namespace image snap device 1147676 rbd-nbd_pool rbd-nbd-image - /dev/nbd0 [root@magna081 ~]# [root@magna081 ~]# rbd snap create rbd-nbd_pool/rbd-nbd-image@quiesce1 Creating snap: 100% complete...done. After inject some error to script: [root@magna081 ~]# cat /home/gpatta/hook/rbd-nbd_quiesce #!/bin/sh echo "$0 $@" >&2 if [ $# -lt 2 ]; then echo "usage: $0 <dev> <cmd>" >&2 exit 1 fi exit 123 dev=$1 cmd=$2 export PATH=/usr/sbin:/usr/bin:/sbin:/bin findmnt -S "${dev}" -fno TARGET | while read mnt; do case "${cmd}" in quiesce) echo "freezing ${mnt}" >&2 fsfreeze -f "${mnt}" ;; unquiesce) echo "unfreezing ${mnt}" >&2 fsfreeze -u "${mnt}" ;; *) echo "unknown command ${cmd}" >&2 exit 1 ;; esac done [root@magna081 ~]# rbd snap create rbd-nbd_pool/rbd-nbd-image@quiesce1 Creating snap: 10% complete...2021-08-09T15:24:14.831+0000 7fb8d5172700 -1 librbd::ImageWatcher: 0x7fb8b80079e0 failed to notify quiesce: (123) No medium found 2021-08-09T15:24:14.831+0000 7fb8d5172700 -1 librbd::SnapshotCreateRequest: failed to notify quiesce: (123) No medium found Creating snap: 10% complete...failed. rbd: failed to create snapshot: (123) No medium found
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat Ceph Storage 5.0 bug fix and enhancement), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3294