Bug 1025235 - the readonly permission of floppy will be changed after eject/change
the readonly permission of floppy will be changed after eject/change
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Max Reitz
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-31 05:53 EDT by Sibiao Luo
Modified: 2014-10-14 02:53 EDT (History)
12 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.420.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-14 02:53:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-10-31 05:53:21 EDT
Description of problem:
boot guest with a readonly permission floppy, then do eject/change the floppy, but the readonly permission will be changed.
BTW, also tried the ide/scsi-cd cdrom with the same testing that did not meet such issue, still readonly permission after eject/change the cdrom.

Version-Release number of selected component (if applicable):
# uname -r && rpm -q qemu-kvm
2.6.32-425.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64
host info:
2.6.32-425.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a readonly permission floppy.
e.g:...-drive file=/home/floopy1.vfd,if=none,id=drive-fdc0-0-0,readonly=on,format=raw -global isa-fdc.driveA=drive-fdc0-0-0
2.do eject/change the floppy.
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floopy1.vfd ro=1 drv=raw encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) eject drive-fdc0-0-0
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 [not inserted]
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) change drive-fdc0-0-0 /home/floopy2.vfd
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floopy2.vfd ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) 

OR:
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floopy1.vfd ro=1 drv=raw encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) change drive-fdc0-0-0 /home/floopy2.vfd
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floopy2.vfd ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

Actual results:
readonly permission will be changed after eject/change the floppy ( ro=1 -----> ro=0 ).

Expected results:
it should keep the readonly permission all the same.

Additional info:
Comment 1 Sibiao Luo 2013-10-31 05:59:44 EDT
Also tried the ide/scsi-cd cdrom that did not meet such issue, it still keep the readonly permission all the same.

- for scsi-cd:
e.g.1:...-drive file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,media=cdrom,format=raw,cache=none,aio=native,readonly=on -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=drive-disk1,id=disk1
(qemu) info block
...
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom1.iso ro=1 drv=raw encrypted=0
(qemu) change drive-disk1 /home/my-cdrom2.iso 
(qemu) info block
...
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom2.iso ro=1 drv=raw encrypted=0
(qemu)

- for ide:
e.g.2:...-drive file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,format=raw,cache=none,aio=native,media=cdrom,readonly=on -device ide-drive,bus=ide.0,unit=0,drive=drive-disk1,id=disk1
(qemu) info block
...
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom1.iso ro=1 drv=raw encrypted=0
(qemu) eject drive-disk1
(qemu) info block
...
drive-disk1: removable=1 locked=0 tray-open=1 io-status=ok [not inserted]
(qemu) change drive-disk1 /home/my-cdrom2.iso 
(qemu) info block
...
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom2.iso ro=1 drv=raw encrypted=0

Best Regards,
sluo
Comment 4 Sibiao Luo 2013-10-31 22:37:14 EDT
Yes, rhel7.0 host did not meet such issue.

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-37.el7.x86_64
qemu-kvm-1.5.3-10.el7.x86_64

e.g:# /usr/libexec/qemu-kvm -drive file=/home/floppy1.vfd,if=none,id=drive-fdc0-0-0,readonly=on,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -vnc :1 -monitor stdio
(qemu) info block
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floppy1.vfd ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]  
(qemu) change drive-fdc0-0-0 /home/floppy2.vfd 
(qemu) info block
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floppy2.vfd ro=1 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu)

Best Regards,
sluo
Comment 5 RHEL Product and Program Management 2013-11-03 21:55:36 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 6 Miroslav Rezanina 2014-01-27 02:51:30 EST
Fix included in qemu-kvm-0.12.1.2-2.420.el6
Comment 8 Shaolong Hu 2014-06-27 05:36:20 EDT
Verified on qemu-kvm-rhev-0.12.1.2-2.428.el6.x86_64

(qemu) info block
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=floppy ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
(qemu) change drive-fdc0-0-0 floppy2
(qemu) info block
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=floppy ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0


Reproduced by qemu-kvm-rhev-0.12.1.2-2.415.el6.x86_64:

(qemu) change drive-fdc0-0-0 floppy2
(qemu) info block
drive-virtio-disk0: removable=0 io-status=ok file=/root/nfs/RHEL-Server-7.0-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=floppy2 ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
Comment 9 errata-xmlrpc 2014-10-14 02:53:59 EDT
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.

http://rhn.redhat.com/errata/RHBA-2014-1490.html

Note You need to log in before you can comment on or make changes to this bug.