Description of problem: [incremental_backup][pull_mode] nbd exprotname and exportbitmap should be able to be set respectively Version-Release number of selected component (if applicable): libvirt-6.0.0-17.module+el8.2.0+6257+0d066c28.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare backup xml and checkpoint xml. Pls note, the disk tag for vdb in the backup.xml having the optional "exportname" set as "vdb_custom_exp" (.libvirt-ci-venv-ci-runtest-l95mHu) [root@dell-per740xd-11 inc_bkup]# cat backup.xml <domainbackup mode="pull"> <server name="localhost" port="10809"/> <disks> <disk backup="no" name="vda"/> <disk backup="yes" exportname="vdb_custom_exp" name="vdb" type="file"> <scratch file="/var/tmp/scratch_file_0" /> </disk> </disks> </domainbackup> (.libvirt-ci-venv-ci-runtest-l95mHu) [root@dell-per740xd-11 inc_bkup]# cat checkpoint.xml <domaincheckpoint> <name>check_full</name> <disks> <disk name='vda' checkpoint='no'/> <disk name='vdb' checkpoint='bitmap'/> </disks> </domaincheckpoint> 2. start the backup, backup.xml hits rng validation failure (.libvirt-ci-venv-ci-runtest-l95mHu) [root@dell-per740xd-11 inc_bkup]# virsh backup-begin backup-test backup.xml checkpoint.xml error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domainbackup.rng Extra element server in interleave Element domainbackup failed to validate content 3. let's have a check about the domainbackup.rng (.libvirt-ci-venv-ci-runtest-l95mHu) [root@dell-per740xd-11 inc_bkup]# cat /usr/share/libvirt/schemas/domainbackup.rng | egrep "exportname|exportbitmap" -a4 ... <optional> <attribute name='exportname'> <text/> </attribute> <attribute name='exportbitmap'> <text/> </attribute> </optional> ... <==== in above xml, we can see the exportname and exportbitmap are put together in a pair of <optional/>. So they have to show up together, or a failure will happen. This is not reasonable, user should be able to customize nbd export name or bitmap name respectively. Actual results: As above Expected results: The rng file should be something like: <optional> <attribute name='exportname'> <text/> </attribute> +++ </optional> +++ <optional> <attribute name='exportbitmap'> <text/> </attribute> </optional>
Fixed upstream: commit c3ace7e234ccd43d5a008d93e122e6d47cd58e17 Author: Peter Krempa <pkrempa> Date: Fri Apr 24 10:37:54 2020 +0200 schema: backup: Make 'exportname' and 'exportbitmap' independent Both are optional but don't have to be specified together. Fix the schema. https://bugzilla.redhat.com/show_bug.cgi?id=1826746 Suggested-by: Yi Sun <yisun> Signed-off-by: Peter Krempa <pkrempa>
PASSed with: libvirt-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64 test result: https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/libvirt/view/RHEL-8.3%20x86_64/job/libvirt-RHEL-8.3-runtest-x86_64-function-incremental_backup/4/testReport/rhel/incremental_backup/pull_mode_original_disk_gluster_coldplug_disk_nbd_tcp_scratch_to_block_positive_test_custom_exportbitmap_default_exportname/
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 (virt:8.3 bug fix and enhancement update), 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-2020:5137