Bug 1277248

Summary: ceph.conf properties override qemu's command-line properties
Product: Red Hat Enterprise Linux 7 Reporter: Ken Dreyer (Red Hat) <kdreyer>
Component: qemu-kvmAssignee: Stefan Hajnoczi <stefanha>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.1CC: areis, huding, jdillama, jdurgin, jinzhao, jkurik, juzhang, knoel, michen, mrezanin, rbalakri, virt-maint, xfu, yama
Target Milestone: rcKeywords: ZStream
Target Release: 7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-106.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1278447 1279389 (view as bug list) Environment:
Last Closed: 2016-11-03 20:07:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1278447, 1279389, 1288337    

Description Ken Dreyer (Red Hat) 2015-11-02 19:38:51 UTC
Description of problem:
There is a bug in qemu which caused ceph.conf config properties to overwrite qemu command-line properties.

If you have "rbd cache = true" in ceph.conf, it will override "cache=none" in your qemu command-line.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-105.el7

Steps to Reproduce:
1. Set "rbd cache = true" in ceph.conf
2. Run qemu with RBD and "cache=none"

Actual results:
RBD admin socket will show caching is disabled

Expected results:
RBD admin socket should show caching is enabled

Additional info:
The qemu patches which fix this have been merged upstream. See https://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg03078.html

Comment 8 Miroslav Rezanina 2016-01-13 11:17:46 UTC
Fix included in qemu-kvm-1.5.3-106.el7

Comment 10 jingzhao 2016-05-19 06:36:53 UTC
1.Reproduced with qemu-kvm-1.5.3-105.el7.x86_64

[root@intel-3323-24-2 qemu2]# /usr/libexec/qemu-kvm -M pc -S -monitor stdio -vnc none -smp 1 -m 4096 -vga none -drive file=rbd:libvirt-pool/rhel72.raw:mon_host=10.66.144.75,id='rbd',format=raw,cache=none
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) info block
rbd: removable=0 io-status=ok file=rbd:libvirt-pool/rhel72.raw:mon_host=10.66.144.75 ro=0 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]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

[root@intel-3323-24-2 ceph]# ceph --admin-daemon /var/run/ceph/ceph-client.admin.5734.140180343873536.asok config show |grep rbd_cache
    "rbd_cache": "true",

2. Verified with qemu-kvm-1.5.3-112.el7.x86_64

[root@localhost qemu]# /usr/libexec/qemu-kvm -M pc -S -monitor stdio -vnc none -smp 1 -m 4096 -vga none -drive file=rbd:libvirt-pool/rhel7.raw:mon_host=10.66.144.75,id='rbd',format=raw,cache=none
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) info block
rbd: removable=0 io-status=ok file=rbd:libvirt-pool/rhel7.raw:mon_host=10.66.144.75 ro=0 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]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

[root@localhost ceph]# ceph --admin-daemon /var/run/ceph/ceph-client.admin.18290.140539423318016.asok config show |grep rbd_cache
    "rbd_cache": "false",

Comment 11 Stefan Hajnoczi 2016-06-08 09:38:13 UTC
What is the status of this bug?  Should it be set to VERIFIED?

Comment 12 jingzhao 2016-06-08 09:40:08 UTC
(In reply to Stefan Hajnoczi from comment #11)
> What is the status of this bug?  Should it be set to VERIFIED?

According to comment10, I think you can set to VERIFIED.

Thanks
Jing Zhao

Comment 14 errata-xmlrpc 2016-11-03 20:07:10 UTC
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://rhn.redhat.com/errata/RHSA-2016-2585.html