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 1628373 - blockdev-backup does not accept bitmap parameter
Summary: blockdev-backup does not accept bitmap parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 7.6
Assignee: John Snow
QA Contact: Gu Nini
URL:
Whiteboard:
Depends On:
Blocks: 1632948
TreeView+ depends on / blocked
 
Reported: 2018-09-12 20:42 UTC by John Snow
Modified: 2018-11-01 11:14 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-16.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1632948 (view as bug list)
Environment:
Last Closed: 2018-11-01 11:13:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3443 0 None None None 2018-11-01 11:14:44 UTC

Description John Snow 2018-09-12 20:42:12 UTC
Description of problem:

the QMP command blockdev-backup does not accept a bitmap parameter.

Version-Release number of selected component (if applicable):

2.12.0; 3.0

How reproducible:

100%

Steps to Reproduce:
1. {"execute":"blockbdev-backup","arguments":{"sync":"incremental","bitmap":"bitmap0"}}


Actual results:

{"error": {"class": "GenericError", "desc": "Parameter 'bitmap' is unexpected"}}


Expected results:

The command should be successful; e.g.
{"return":{}}

Additional info:

the drive-backup QMP command accepts the bitmap parameter, but blockdev-backup does not. This renders us unable to make incremental push-style backups using the blockdev-backup command, though it leaves drive-backup unaffected.

Comment 2 John Snow 2018-09-12 20:43:24 UTC
Patch upstream at: https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg06341.html

Comment 6 Miroslav Rezanina 2018-09-17 09:00:11 UTC
Fix included in qemu-kvm-rhev-2.12.0-16.el7

Comment 7 Eric Blake 2018-09-18 17:06:20 UTC
More justification for including the patch:
Although drive-backup now takes device name OR node name of the top-most node for a given device, it still can ONLY create backups to a destination on the local file system or which uses legacy filename parse hacks (such as "nbd://..."); it doesn't recognize a node name for targetting a block that has been set up to point to something that can't be represented as a single filename.  Even the json:{...} pseudo-name string doesn't work to get around that limitation:

virsh qemu-monitor-command $dom '{"execute":"transaction",
 "arguments":{"actions":[
 {"type":"drive-backup", "data":{
  "device":"'$node'", "target":"json:{'\
'\"driver\":\"qcow2\", \"file\":{\"driver\":\"file\",'\
'\"filename\":\"'$PWD'/back5.img\"}}}",
  "sync":"incremental", "bitmap":"bitmap2"}}
]}}'
{"id":"libvirt-51","error":{"class":"GenericError","desc":"Unknown protocol 'json'"}}

Comment 9 Gu Nini 2018-09-21 05:47:53 UTC
Verify the bug on qemu-kvm-rhev-2.12.0-17.el7.x86_64 with following steps:

[root@hp-dl385g7-10 home]# nc -U /var/tmp/avocado1
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 12, "major": 2}, "package": "qemu-kvm-rhev-2.12.0-17.el7"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}

####Create/add the fullbackup image:
{"execute":"blockdev-create","arguments":{"options": {"driver":"file","filename":"/home/fullbackup.qcow2","size":2147483648},"job-id":"job1"}}
{"timestamp": {"seconds": 1537508083, "microseconds": 909280}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job1"}}
{"timestamp": {"seconds": 1537508083, "microseconds": 909429}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job1"}}
{"return": {}}
{"timestamp": {"seconds": 1537508083, "microseconds": 910578}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job1"}}
{"timestamp": {"seconds": 1537508083, "microseconds": 910689}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job1"}}
{"timestamp": {"seconds": 1537508083, "microseconds": 910756}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job1"}}
{"execute":"blockdev-add","arguments":{"driver":"file","node-name":"fullbackup","filename":"/home/fullbackup.qcow2"}}
{"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job-id': 'job2', 'options': {'driver': 'qcow2', 'file': 'fullbackup', 'size': 2147483648}}}
{"timestamp": {"seconds": 1537508126, "microseconds": 150031}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job2"}}
{"timestamp": {"seconds": 1537508126, "microseconds": 150173}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job2"}}
{"return": {}}
{"timestamp": {"seconds": 1537508126, "microseconds": 163192}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job2"}}
{"timestamp": {"seconds": 1537508126, "microseconds": 163280}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job2"}}
{"timestamp": {"seconds": 1537508126, "microseconds": 163349}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job2"}}
{ 'execute':'blockdev-add','arguments':{'driver':'qcow2','node-name':'fbk','file':'fullbackup'}}
{"return": {}}
{"execute":"job-dismiss","arguments":{"id":"job1"}}
{"timestamp": {"seconds": 1537508146, "microseconds": 138537}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job1"}}
{"return": {}}
{"execute":"job-dismiss","arguments":{"id":"job2"}}
{"timestamp": {"seconds": 1537508149, "microseconds": 842593}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job2"}}
{"return": {}}

####Add bitmap and do the fullbackup in a transaction:
{"execute": "transaction", "arguments": { "actions": [ {"type": "block-dirty-bitmap-add", "data": {"node": "disk1", "name": "bitmap1"} }, {"type": "blockdev-backup", "data":{ "device": "disk1", "sync":"full","target":"fbk","auto-finalize":false,"auto-dismiss":false,"job-id":"j1"}}]}}
{"timestamp": {"seconds": 1537508229, "microseconds": 167383}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "j1"}}
{"timestamp": {"seconds": 1537508229, "microseconds": 167665}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "j1"}}
{"timestamp": {"seconds": 1537508229, "microseconds": 167758}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "j1"}}
{"timestamp": {"seconds": 1537508229, "microseconds": 167848}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "j1"}}
{"return": {}}
{"timestamp": {"seconds": 1537508230, "microseconds": 845197}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "j1"}}
{"timestamp": {"seconds": 1537508230, "microseconds": 845267}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "j1"}}
{"timestamp": {"seconds": 1537508230, "microseconds": 845299}, "event": "BLOCK_JOB_PENDING", "data": {"type": "backup", "id": "j1"}}
{ "execute" : "block-job-finalize","arguments":{"id":"j1"}}
{"timestamp": {"seconds": 1537508247, "microseconds": 805630}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "j1", "len": 2147483648, "offset": 2147483648, "speed": 0, "type": "backup"}}
{"timestamp": {"seconds": 1537508247, "microseconds": 805744}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "j1"}}
{"return": {}}
{ "execute" : "block-job-dismiss","arguments":{"id":"j1"}}
{"timestamp": {"seconds": 1537508260, "microseconds": 765776}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "j1"}}
{"return": {}}

####Create/add the image used for incremental backup:
{"execute":"blockdev-create","arguments":{"options": {"driver":"file","filename":"/home/inc.qcow2","size":2147483648},"job-id":"job1"}}
{"timestamp": {"seconds": 1537508308, "microseconds": 402058}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job1"}}
{"timestamp": {"seconds": 1537508308, "microseconds": 402221}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job1"}}
{"return": {}}
{"timestamp": {"seconds": 1537508308, "microseconds": 441578}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job1"}}
{"timestamp": {"seconds": 1537508308, "microseconds": 441697}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job1"}}
{"timestamp": {"seconds": 1537508308, "microseconds": 441787}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job1"}}
{"execute":"blockdev-add","arguments":{"driver":"file","node-name":"incremental","filename":"/home/inc.qcow2"}}
{"return": {}}
{'execute': 'blockdev-create', 'arguments': {'job-id': 'job2', 'options': {'driver': 'qcow2', 'file': 'incremental', 'size': 2147483648, 'backing-fmt':'qcow2','backing-file':'/home/fullbackup.qcow2'}}} 
{"timestamp": {"seconds": 1537508331, "microseconds": 686252}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job2"}}
{"timestamp": {"seconds": 1537508331, "microseconds": 686347}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job2"}}
{"return": {}}
{"timestamp": {"seconds": 1537508331, "microseconds": 694759}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job2"}}
{"timestamp": {"seconds": 1537508331, "microseconds": 694845}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job2"}}
{"timestamp": {"seconds": 1537508331, "microseconds": 694913}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job2"}}
{ 'execute': 'blockdev-add','arguments':{'driver':'qcow2','node-name':'inc','file':'incremental','backing':'disk1'}}
{"return": {}}
{"execute":"job-dismiss","arguments":{"id":"job1"}}
{"timestamp": {"seconds": 1537508363, "microseconds": 560485}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job1"}}
{"return": {}}
{"execute":"job-dismiss","arguments":{"id":"job2"}}
{"timestamp": {"seconds": 1537508369, "microseconds": 688704}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job2"}}
{"return": {}}

####Do the blockdev-backup with ******"sync":"incremental"****** mode:
{"execute": "blockdev-backup", "arguments":{ "device": "disk1", "bitmap":"bitmap1","sync":"incremental","target":"inc","auto-finalize":false,"auto-dismiss":false,"job-id":"j1"}}
{"timestamp": {"seconds": 1537508390, "microseconds": 126849}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "j1"}}
{"timestamp": {"seconds": 1537508390, "microseconds": 127205}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "j1"}}
{"return": {}}
{"timestamp": {"seconds": 1537508390, "microseconds": 486512}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "j1"}}
{"timestamp": {"seconds": 1537508390, "microseconds": 486624}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "j1"}}
{"timestamp": {"seconds": 1537508390, "microseconds": 486692}, "event": "BLOCK_JOB_PENDING", "data": {"type": "backup", "id": "j1"}}
{ "execute" : "block-job-finalize","arguments":{"id":"j1"}}
{"timestamp": {"seconds": 1537508426, "microseconds": 594593}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "j1", "len": 2147483648, "offset": 2147483648, "speed": 0, "type": "backup"}}
{"timestamp": {"seconds": 1537508426, "microseconds": 594710}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "j1"}}
{"return": {}}
{ "execute" : "block-job-dismiss","arguments":{"id":"j1"}}
{"timestamp": {"seconds": 1537508432, "microseconds": 266895}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "j1"}}
{"return": {}}
{"timestamp": {"seconds": 1537508459, "microseconds": 816555}, "event": "VSERPORT_CHANGE", "data": {"open": false, "id": "qemu-ga0"}}
{"timestamp": {"seconds": 1537508476, "microseconds": 462224}, "event": "RESET", "data": {"guest": true}}
{"timestamp": {"seconds": 1537508476, "microseconds": 488931}, "event": "RESET", "data": {"guest": true}}
{"timestamp": {"seconds": 1537508496, "microseconds": 674017}, "event": "VSERPORT_CHANGE", "data": {"open": true, "id": "qemu-ga0"}}
{"timestamp": {"seconds": 1537508551, "microseconds": 624860}, "event": "VSERPORT_CHANGE", "data": {"open": false, "id": "qemu-ga0"}}
{"timestamp": {"seconds": 1537508568, "microseconds": 277405}, "event": "SHUTDOWN", "data": {"guest": true}}

Ncat: Broken pipe.
[root@hp-dl385g7-10 home]# rpm -qa|grep qemu
qemu-kvm-common-rhev-2.12.0-17.el7.x86_64
qemu-kvm-tools-rhev-2.12.0-17.el7.x86_64
qemu-kvm-rhev-debuginfo-2.12.0-17.el7.x86_64
libvirt-daemon-driver-qemu-4.5.0-9.el7.x86_64
ipxe-roms-qemu-20170123-1.git4e85b27.el7_4.1.noarch
qemu-kvm-rhev-2.12.0-17.el7.x86_64
qemu-img-rhev-2.12.0-17.el7.x86_64

Comment 10 errata-xmlrpc 2018-11-01 11:13:32 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://access.redhat.com/errata/RHBA-2018:3443


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