To POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2020-June/msg01047.html
Reproduced in libvirt version and get the same results: libvirt-6.0.0-25.module+el8.2.1+7154+47ffd890.x86_64 Step: Scenario1: Edit the qemu.conf namespace as namespaces = [ "mount" ] 1.Prepare scsi device and start qemu-pr-helper: # multipath -ll mpathb (36001405cd0c22e55a414b35a89d9b955) dm-3 LIO-ORG,device.logical- size=100M features='0' hwhandler='1 alua' wp=rw `-+- policy='service-time 0' prio=50 status=active `- 15:0:0:0 sdb 8:16 active ready running #systemctl start qemu-pr-helper # ps -ef |grep qemu-pr root 327871 1 0 04:08 ? 00:00:00 /usr/bin/qemu-pr-helper root 329690 1 0 04:42 ? 00:00:00 /usr/bin/qemu-pr-helper -k /var/lib/libvirt/qemu/domain-2-avocado-vt-vm1/pr-helper0.sock -f /var/lib/libvirt/qemu/domain-2-avocado-vt-vm1/pr-helper0.pid 2.Prepare a guest and attach xml: # cat attach.xml <disk type='block' device='lun'> <driver name='qemu' type='raw'/> <source dev='/dev/mapper/mpathb'/> <reservations managed='yes'> </reservations> <target dev='sdb' bus='scsi'/> </disk> 3.Hot-plug the device with 'reservations' # virsh attach-device avocado-vt-vm1 attach.xml Device attached successfully 4.Login the guest and run script as: # cat test.sh #! /bin/sh sg_persist --no-inquiry -v --out --register-ignore --param-sark 123aaa "$@" sg_persist --no-inquiry --in -k "$@" sg_persist --no-inquiry -v --out --reserve --param-rk 123aaa --prout-type 5 "$@" sg_persist --no-inquiry --in -r "$@" sg_persist --no-inquiry -v --out --release --param-rk 123aaa --prout-type 5 "$@" sg_persist --no-inquiry --in -r "$@" sg_persist --no-inquiry -v --out --register --param-rk 123aaa --prout-type 5 "$@" sg_persist --no-inquiry --in -k "$@" # sh test.sh /dev/sda Persistent reservation out cdb: 5f 06 00 00 00 00 00 00 18 00 PR out: command (Register and ignore existing key) successful PR generation=0x1, 1 registered reservation key follows: 0x123aaa Persistent reservation out cdb: 5f 01 05 00 00 00 00 00 18 00 PR out: command (Reserve) successful PR generation=0x1, Reservation follows: Key=0x123aaa scope: LU_SCOPE, type: Write Exclusive, registrants only Persistent reservation out cdb: 5f 02 05 00 00 00 00 00 18 00 PR out: command (Release) successful PR generation=0x1, there is NO reservation held Persistent reservation out cdb: 5f 00 05 00 00 00 00 00 18 00 PR out: command (Register) successful PR generation=0x1, there are NO registered reservation keys Scenario 2: Edit the qemu.conf namespace as namespaces = [ ] Also works well So verified as expected
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, 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-2020:3172