Bug 1628373
| Summary: | blockdev-backup does not accept bitmap parameter | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Snow <jsnow> | |
| Component: | qemu-kvm-rhev | Assignee: | John Snow <jsnow> | |
| Status: | CLOSED ERRATA | QA Contact: | Gu Nini <ngu> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 7.6 | CC: | chayang, coli, eblake, juzhang, michen, mtessun, ngu, virt-maint | |
| Target Milestone: | rc | Keywords: | FutureFeature, TestBlocker | |
| Target Release: | 7.6 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | qemu-kvm-rhev-2.12.0-16.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1632948 (view as bug list) | Environment: | ||
| Last Closed: | 2018-11-01 11:13:32 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: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1632948 | |||
Patch upstream at: https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg06341.html Fix included in qemu-kvm-rhev-2.12.0-16.el7 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'"}}
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
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 |
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.