Bug 1828892

Summary: Add qemu-img compare task to verify disk copy
Product: [oVirt] ovirt-ansible-collection Reporter: Sandro Bonazzola <sbonazzo>
Component: hosted-engine-setupAssignee: Asaf Rachmani <arachman>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arachman, bugs, rdlugyhe
Target Milestone: ovirt-4.4.1Keywords: Improvement, Patch, Triaged
Target Release: 1.1.5Flags: sbonazzo: ovirt-4.4?
sbonazzo: devel_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-hosted-engine-setup-1.1.5 Doc Type: Enhancement
Doc Text:
The current release adds a compare task to debug mode. The compare task verifies that an image was copied successfully to the storage domain.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-05 06:25:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sandro Bonazzola 2020-04-28 14:26:11 UTC
Nir Soffer from storage team reviewed the storage related tasks in hosted engine deployment and suggests to add a verification step:

Added compare task after the disk copy task:
"/usr/share/ansible/roles/ovirt.hosted-engine-setup/tasks/create_target_vm/03_hosted_engine_final_tasks.yml"

  - name: Verify copy of VM disk
    command: qemu-img compare {{ local_vm_disk_path }} {{ he_virtio_disk_path }}
    environment: "{{ he_cmd_lang }}"
    become: true
    become_user: vdsm
    become_method: sudo
    changed_when: true

Comment 3 Nikolai Sednev 2020-07-13 11:00:06 UTC
Forth to https://bugzilla.redhat.com/show_bug.cgi?id=1828888#c14, moving to verified.

/usr/share/ansible/roles/ovirt.hosted-engine-setup/tasks/create_target_vm/03_hosted_engine_final_tasks.yml 
- name: Verify copy of VM disk
    command: qemu-img compare {{ local_vm_disk_path }} {{ he_virtio_disk_path }}
    environment: "{{ he_cmd_lang }}"
    become: true
    become_user: vdsm
    become_method: sudo
    changed_when: true
    when: he_debug_mode|bool

Works for me on these components:
Software Version:4.4.1.8-0.7.el8ev
ovirt-ansible-hosted-engine-setup-1.1.5-1.el8ev.noarch
rhvm-appliance-4.4-20200604.0.el8ev.x86_64
ovirt-hosted-engine-setup-2.4.5-1.el8ev.noarch
ovirt-hosted-engine-ha-2.4.4-1.el8ev.noarch
Red Hat Enterprise Linux release 8.2 (Ootpa)
Linux 4.18.0-193.13.1.el8_2.x86_64 #1 SMP Tue Jul 7 14:03:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


Deployed on NFS and iSCSI successfully.

Comment 4 Sandro Bonazzola 2020-08-05 06:25:03 UTC
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.