Bug 1802538 - When trying to attach backup API disk to backup VM, the disk_attachment href contains "null" instead of "disk_attachment"
Summary: When trying to attach backup API disk to backup VM, the disk_attachment href ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.4.0
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.2
: 4.4.2.1
Assignee: Ori Liel
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 11:27 UTC by Shir Fishbain
Modified: 2020-09-18 07:13 UTC (History)
5 users (show)

Fixed In Version: rhv-4.4.2-2 ovirt-engine-4.4.2.1
Clone Of:
Environment:
Last Closed: 2020-09-18 07:13:15 UTC
oVirt Team: Infra
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)
Logs - backup_restore_api(nfs) (499.47 KB, application/zip)
2020-02-13 11:29 UTC, Shir Fishbain
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 110300 0 master MERGED restapi: fix null in diskattachment herf 2021-01-27 08:17:37 UTC

Description Shir Fishbain 2020-02-13 11:27:26 UTC
Description of problem:
When attaching a snapshot disk of source VM to backup VM the path in the response of creating including 'null' instead 'disk_attachment'. 

1) <disk_attachment href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c/null/6efc14c3-730d-4d69-84cd-01883656da82"
2)<disk_attachment href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c/null/6efc14c3-730d-4d69-84cd-01883656da82" 

2020-02-04 18:11:55,717 - MainThread - diskattachments - DEBUG - Response body for CREATE request is: 
<disk_attachment href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c/null/c5a54422-f107-4889-989f-f5cf6b73bdaa" id="c5a54422-f107-4889-989f-f5cf6b73bdaa">
    <active>true</active>
    <bootable>false</bootable>
    <interface>virtio</interface>
    <pass_discard>false</pass_discard>
    <read_only>false</read_only>
    <uses_scsi_reservation>false</uses_scsi_reservation>
    <disk href="/ovirt-engine/api/disks/c5a54422-f107-4889-989f-f5cf6b73bdaa" id="c5a54422-f107-4889-989f-f5cf6b73bdaa"/>
    <vm href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c" id="27339a95-03f9-4490-9db8-fb427e4ba49c"/>
</disk_attachment>

2020-02-04 18:11:56,438 - MainThread - diskattachments - DEBUG - Response body for CREATE request is: 
<disk_attachment href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c/null/6efc14c3-730d-4d69-84cd-01883656da82" id="6efc14c3-730d-4d69-84cd-01883656da82">
    <active>true</active>
    <bootable>false</bootable>
    <interface>virtio</interface>
    <pass_discard>false</pass_discard>
    <read_only>false</read_only>
    <uses_scsi_reservation>false</uses_scsi_reservation>
    <disk href="/ovirt-engine/api/disks/6efc14c3-730d-4d69-84cd-01883656da82" id="6efc14c3-730d-4d69-84cd-01883656da82"/>
    <vm href="/ovirt-engine/api/vms/27339a95-03f9-4490-9db8-fb427e4ba49c" id="27339a95-03f9-4490-9db8-fb427e4ba49c"/>
</disk_attachment>
Version-Release number of selected component (if applicable):

How reproducible:
Happens during automation execution  just on nfs storage domain
(backup restore API test plan)
Didn't manage to reproduce it manually again via REST API.

Steps to Reproduce:
1. Create source VM from a template with disk (nfs sd)
2. Create backup VM from a template with disk (nfs sd)
3. Start source and backup VMs
4. Create a snapshot with memory on source VM
5. Attach backup disk from source VM to backup VM 

Actual results:
from engine.log:
2020-02-04 18:22:26,293+02 ERROR [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-79) [] BaseAsyncTask::logEndTaskFailure: Task '19a217f4-6f79-4069-ae32-02e8be62b70a' (Parent Command 'AddImageFromScratch', Parameters Type 'org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters') ended with failure:
-- Result: 'cleanSuccess'
-- Message: 'VDSGenericException: VDSTaskResultNotSuccessException: TaskState contained successful return code, but a non-success result ('cleanSuccess').',

2020-02-04 18:22:31,914+02 ERROR [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-93) [diskattachments_create_3e3e6f94-992c] Ending command 'org.ovirt.engine.core.bll.storage.disk.AddDiskCommand' with failure.

2020-02-04 18:22:31,918+02 ERROR [org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-93) [diskattachments_create_3e3e6f94-992c] Ending command 'org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand' with failure.

2020-02-04 18:22:32,184+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-93) [] EVENT_ID: USER_ADD_DISK_FINISHED_FAILURE(2,022), Add-Disk operation failed to complete.

020-02-04 18:22:36,319+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetAllTasksStatusesVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-47) [] Failed in 'HSMGetAllTasksStatusesVDS' method

2020-02-04 18:22:36,324+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-47) [] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM host_mixed_1 command HSMGetAllTasksStatusesVDS failed: value=Invalid parameter: 'imgUUID=00000000-0000-0000-0000-000000000000' abortedcode=100

2020-02-04 18:22:36,324+02 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-47) [] SPMAsyncTask::PollTask: Polling task '5c67927a-3570-48b8-84de-aeb76b02b16c' (Parent Command 'Unknown', Parameters Type 'org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters') returned status 'finished', result 'cleanSuccess'.

2020-02-04 18:22:36,324+02 ERROR [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-47) [] BaseAsyncTask::logEndTaskFailure: Task '5c67927a-3570-48b8-84de-aeb76b02b16c' (Parent Command 'Unknown', Parameters Type 'org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters') ended with failure:
-- Result: 'cleanSuccess'
-- Message: 'VDSGenericException: VDSErrorException: Failed to HSMGetAllTasksStatusesVDS, error = value=Invalid parameter: 'imgUUID=00000000-0000-0000-0000-000000000000' abortedcode=100, code = 100',
-- Exception: 'VDSGenericException: VDSErrorException: Failed to HSMGetAllTasksStatusesVDS, error = value=Invalid parameter: 'imgUUID=00000000-0000-0000-0000-000000000000' abortedcode=100, code = 100'

2020-02-04 18:22:39,356+02 WARN  [org.ovirt.engine.api.restapi.util.LinkHelper] (default task-70) [] Can't find relative path for class "org.ovirt.engine.api.resource.StorageDomainVmDiskAttachmentsResource", will return null

Expected results:
When attaching a snapshot disk of source VM to backup VM the path in the response of creating should include 'disk_attachment' instead of 'null'

Additional info:
Logs attached

Comment 1 Shir Fishbain 2020-02-13 11:29:28 UTC
Created attachment 1662929 [details]
Logs - backup_restore_api(nfs)

Comment 2 Tal Nisan 2020-02-17 15:31:56 UTC
Ondra, any idea?

Comment 3 Martin Perina 2020-06-18 13:49:06 UTC
(In reply to Tal Nisan from comment #2)
> Ondra, any idea?

Ori?

Comment 4 Evelina Shames 2020-08-11 13:53:44 UTC
Verified on ovirt-engine-4.4.2.1

Comment 5 Sandro Bonazzola 2020-09-18 07:13:15 UTC
This bugzilla is included in oVirt 4.4.2 release, published on September 17th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.2 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.


Note You need to log in before you can comment on or make changes to this bug.