Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1707365

Summary: Upload Disk Snapshots problems with iSCSI storage and python SDK
Product: [oVirt] ovirt-engine-sdk-python Reporter: francisco.garcia
Component: CoreAssignee: Ondra Machacek <omachace>
Status: CLOSED DUPLICATE QA Contact: Lukas Svaty <lsvaty>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, juan.hernandez
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-07 11:55:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
host-imageio.log
none
host-path.txt
none
download_disk_snaps.py
none
restore_disk.py
none
python-NFS.log
none
python-iSCSI.log none

Description francisco.garcia 2019-05-07 11:37:26 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 francisco.garcia 2019-05-07 11:38:56 UTC
Description of the problem:
I am not able to restore (upload) a VM from a backup made using this code: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/download_disk_snapshots.py. VM disks are allocated in an iSCSI storage, and snapshots are used. 

I use the python code downloaded from (https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk_snapshots.py). I modified some values to restore in iSCSI Storage (DiskFormat and Sparse) and values for my own environment as: Storage, Cluster, disk_id and connection's parameters. 

This is not a problem with my specific Virtual Machine, this is happening for any VM with the same characteristics (iSCSI storage + snapshots). This is happening with thin provisioned disks, but also with thick provisioned disks.

The attached files are: 
The log of the restore: python-iSCSI.log
In the host, an error is showed in log: host-imageio.log, obtained from /var/log/ovirt-imageio-daemon/daemon.log
The path of host is showed in log: host-path.txt
The code employed to restore vm (with commented modifications) is: restore_disk.py
The code employed to backup vm is: download_disk_snaps.py

On the other hand, the same operation (backup and restore of a vm with snapshots), where disks are allocated in NFS storage, and using the same code (except for corresponding changes of ids and names), have a successfull result. I'm attaching the log of an example succesful restore under these conditions too: python-NFS.log

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.2.3.8-0.1.el7

How reproducible:
Backup and restore VM with snapshots in an iSCSI storage, using python SDK.

Steps to Reproduce:
1.- Execute "download_disk_snaps.py" with a vm with disks in iSCSI Storage.
2.- Execute "restore_disk.py" with dependents ids of result previous step.
3.- Notice an error in local console: "socket.error: [Errno 32] Broken pipe" (see attachment: python-iSCSI.log)
4.- Notice an error in /var/log/ovirt-imageio/daemon.log (see attachment: host-imageio.log)
5.- Access to path showed in error of "host-imageio.log"

Actual results:
Errors, vm is not able to restore

Expected results:
Restored vm

Comment 2 francisco.garcia 2019-05-07 11:40:23 UTC
Created attachment 1565129 [details]
host-imageio.log

Log of host obtained in /var/log/ovirt-imageio-daemon/daemon.log

Comment 3 francisco.garcia 2019-05-07 11:40:59 UTC
Created attachment 1565130 [details]
host-path.txt

Comment 4 francisco.garcia 2019-05-07 11:42:02 UTC
Created attachment 1565135 [details]
download_disk_snaps.py

Code employed to backup

Comment 5 francisco.garcia 2019-05-07 11:42:35 UTC
Created attachment 1565145 [details]
restore_disk.py

Code employed to restore

Comment 6 francisco.garcia 2019-05-07 11:44:28 UTC
Created attachment 1565146 [details]
python-NFS.log

Log with a success restore with the attached code. The virtual machine's disks are allocated in NFS Storage

Comment 7 francisco.garcia 2019-05-07 11:44:59 UTC
Created attachment 1565147 [details]
python-iSCSI.log

Log with a failed restore with the attached code. The virtual machine's disks are allocated in iSCSI Storage

Comment 8 francisco.garcia 2019-05-07 11:55:57 UTC

*** This bug has been marked as a duplicate of bug 1707372 ***