Giter Site home page Giter Site logo

Fix the copy failed issue of virtual_disks.ceph.hot_plug.with_auth.default.rbd_blockcopy.slices_reuse_external about tp-libvirt HOT 4 CLOSED

autotest avatar autotest commented on September 28, 2024
Fix the copy failed issue of virtual_disks.ceph.hot_plug.with_auth.default.rbd_blockcopy.slices_reuse_external

from tp-libvirt.

Comments (4)

chunfuwen avatar chunfuwen commented on September 28, 2024

@qiankehan , some scripts changed as below, unformately, it still fail
1)qemu-img create -f qcow2 /var/lib/avocado/data/avocado-vt/avocado-vt-vm1_test.img 400M
2)rbd -m libvirtauthceph.usersys.redhat.com --keyring /var/lib/avocado/data/avocado-vt/ceph.key create virtual-disk-ceph-pool/rbd.img --size 400M 2> /dev/null' finished with 0 after 0.1479048728942871
3)offset=12345,size=512

 <disk device="disk" type="network"><auth username="admin"><secret type="ceph" uuid="8126c8ef-440e-4489-94a8-6aa9b2a348a1" /></auth><source name="virtual-disk-ceph-pool/rbd.img" protocol="rbd"><host name="libvirtauthceph.usersys.redhat.com" port="6789" /><slices><slice offset="12345" size="512" type="storage" /></slices></source><driver cache="none" name="qemu" type="raw" /><target bus="virtio" dev="vdb" /></disk>
  1. Result show
Command '/bin/virsh blockcopy avocado-vt-vm1 vdb  --xml /var/tmp/xml_utils_temp_ifq54iir.xml   --wait --verbose --transient-job --pivot --reuse-external' finished with 1 after 0.26104021072387695s
status: 1
stdout: Copy failed
stderr: 
Destroying VM

from tp-libvirt.

chunfuwen avatar chunfuwen commented on September 28, 2024
(p3-ve) [root@hp-dl360g9-16 tp-libvirt]# git diff libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
diff --git a/libvirt/tests/src/virtual_disks/virtual_disks_ceph.py b/libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
index 40536373..7d5dc760 100755
--- a/libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
+++ b/libvirt/tests/src/virtual_disks/virtual_disks_ceph.py
@@ -754,7 +754,7 @@ def run(test, params, env):
         elif rbd_blockcopy:
             # Create one disk to attach to VM as second disk device
             second_disk_params = {}
-            disk_size = params.get("virt_disk_device_size", "50M")
+            disk_size = params.get("virt_disk_device_size", "400M")
             device_source = libvirt.create_local_disk(
                 "file", img_file, disk_size, disk_format="qcow2")
             second_disk_params.update({"source_file": device_source})
@@ -866,7 +866,8 @@ def run(test, params, env):
                 disk_cmd = ("rbd -m %s %s create %s --size 400M 2> /dev/null"
                             % (mon_host, key_opt, disk_src_name))
                 process.run(disk_cmd, ignore_status=False, shell=True)
-                slice_dict = {"slice_type": "storage", "slice_offset": "12345", "slice_size": "105185280"}
+                slice_dict = {"slice_type": "storage", "slice_offset": "12345",
+                              "slice_size": "512"}
                 params.update({"disk_slice": slice_dict})
                 logging.debug('create one volume on ceph backend storage for slice testing')
             # Create one file on VM before doing blockcopy

from tp-libvirt.

qiankehan avatar qiankehan commented on September 28, 2024

@chunfuwen The src disk size and the slice_size are still not equal in your patch:
src disk_size --> 400M --> 419430400B
So slice_size should be 419430400. And remember make sure the overall size of dest image you create on rbd should not be less than slice_offset+slice_size(419430400+12345 byte).

from tp-libvirt.

chunfuwen avatar chunfuwen commented on September 28, 2024

code change in PR: #3766
so close this issue

from tp-libvirt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.