RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1181648 - [RFE] Add an event to report if a block device usage exceeds a threshold.
Summary: [RFE] Add an event to report if a block device usage exceeds a threshold.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1154205 1181659 1181665
TreeView+ depends on / blocked
 
Reported: 2015-01-13 14:27 UTC by Francesco Romani
Modified: 2018-01-12 10:25 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-04 16:25:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2546 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2015-12-04 21:11:56 UTC

Description Francesco Romani 2015-01-13 14:27:29 UTC
Description of problem:
Add an event to report if a block device usage exceeds a threshold. The threshold should be configurable with a monitor command. The event should report the affected block device. Additional useful information could be the offset of the highest sector , like in the query-blockstats output.

Rationale for the RFE:
RHEV makes extensive use of thin-provisioned disk images.
In order to let the guest run flawlessly and be not unnecessarily paused, RHEV sets a watermark and automatically resized the image once the watermark is reached or exceeded.

In order to detect the mark crossing, the managing application has no choice than aggressively polling using libvirt, which in turn enters the qemu monitor. This lead to unnecessary system load, and is made even worse under scale: scenarios with hunderds of VM are becoming not unusual.


Additional info:
This is the -rhev counterpart of the upstream bug: 
https://bugs.launchpad.net/qemu/+bug/1338957?comments=all

A patch implementing the feature was patch posted on qemu-devel, reviewd, acked and merged into this branch:
https://github.com/stefanha/qemu/commit/f050ea639522e9dd7e501ef285a2a12709b8726a

RHEV would like to make use of this feature in the new release, to improve scalability.

Comment 2 Michal Skrivanek 2015-01-13 15:53:19 UTC
7.2 should be ok for our needs

Comment 8 Jun Li 2015-06-25 05:17:51 UTC
Verify:

Version of components:
qemu-kvm-rhev-2.3.0-4.el7.x86_64

Steps:
1, boot guest with a data-disk.
Such as:
# qemu-img info /home/juli/test.raw 
image: /home/juli/test.raw
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 211M

# /usr/libexec/qemu-kvm -m 2G -drive file=/home/juli/RHEL-Server-7.2-64-virtio.raw,if=none,id=sys,snapshot=on -device virtio-blk-pci,drive=sys,id=sys-sys  -drive file=/home/juli/test.raw,if=none,id=img,node-name=juli -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -vnc :1 -qmp tcp::8888,server,nowait

2, using block-set-write-threshold to set data-disk with 1k.
e.g:
{"execute":"qmp_capabilities"}
{ "execute": "query-named-block-nodes" }
{ "execute": "block-set-write-threshold",
  "arguments": { "node-name": "juli",
                 "write-threshold": 1000 } }

3, login guest and do some write operations for this data-disk.
e.g:
# mkfs.ext4 /dev/vdb

4, during step3, check the output of qmp.
{"timestamp": {"seconds": 1435209056, "microseconds": 499179}, "event": "BLOCK_WRITE_THRESHOLD", "data": {"node-name": "juli", "write-threshold": 1000, "amount-exceeded": 2632728}}

As above show, this bz has been verified.

Comment 9 Jun Li 2015-06-25 05:24:10 UTC
According to comment 8, set this bz as verified. Any issue, free to correct me. Thx.

Comment 11 errata-xmlrpc 2015-12-04 16:25:24 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/RHBA-2015-2546.html


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