Bug 1939198

Summary: Refresh LUN operation via Admin Portal fails with "No host was found to perform the operation"
Product: Red Hat Enterprise Virtualization Manager Reporter: Gordon Watson <gwatson>
Component: ovirt-engineAssignee: shani <sleviim>
Status: CLOSED ERRATA QA Contact: sshmulev
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.4CC: dfodor, eshenitz, sleviim
Target Milestone: ovirt-4.4.7Keywords: ZStream
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: 2021-07-22 15:12:33 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:

Description Gordon Watson 2021-03-15 17:50:18 UTC
Description of problem:

The Admin Portal 'Refresh LUN' operation fails and reports an ERROR;

2021-03-15 13:43:21,771-04 ERROR [org.ovirt.engine.core.bll.storage.pool.SyncDirectLunsCommand] (default task-30) [c7497c1a-8cf9-4d1d-b8eb-d913b31af2d9] Failed to update LUNs, VDS connectivity error for LUNs IDs: [360000000000000000e000000000f0001] on host: null, error details EngineException: No host was found to perform the operation (Failed with error RESOURCE_MANAGER_VDS_NOT_FOUND and code 5004)


It works ok using the REST-API.


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

RHV 4.4.4


How reproducible:

100%


Steps to Reproduce:

1. Create a direct lun
2. 'Refresh LUN' in Admin Portal


Actual results:


Expected results:


Additional info:

Comment 2 Eyal Shenitzky 2021-03-22 15:09:58 UTC
Shani, can you please have a look and see if your changes fix it in 4.4.5?

Comment 3 shani 2021-03-22 15:20:09 UTC
Hi Gordon,
This area of code had some fixes as part of bug https://bugzilla.redhat.com/1155275 and its patch https://gerrit.ovirt.org/#/c/ovirt-engine/+/112783/.
Tried to refresh the LUN once again from the UI and it worked fine.
I think the issue might be related with your env.

Can you please give it a try on 4.4.5 env and share your results (and engine+vdsm logs)?

Comment 4 Gordon Watson 2021-03-22 17:36:36 UTC
Ok, I figured out what the issue is. Long story, I tried a different RHV 4.4.4 environment and different lun. Same versions of RHVM and RHVH on the host, and iscsi lun in both cases. It worked. I retried the environment in which I encountered the problem before and I still did. However, the difference was that the lun in my environment was unattached to a VM. So, I attached it to a VM and now it works ok.

So, to clarify;

- 4.4.4, direct lun attached to a VM, it works ok.

- 4.4.4, unattached direct lun, fails with "No host was found ....".


I don't have a 4.4.5 environment, so I can't try that.

Regards, GFW,

Comment 5 shani 2021-03-22 18:00:30 UTC
Thanks for the update, Gordon.
When there's no VM attached to the LUN, the getParameters.getVdsId() is null, which causes the error.
Although, the code doesn't throw the exception and its full trace, but logs it on the engine log [1].

This behavior derives from this fix: https://gerrit.ovirt.org/#/c/ovirt-engine/+/109704/33/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/pool/SyncDirectLunsCommand.java@211
The exception is being caught.

[1]
2021-03-22 19:45:59,467+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-3) [1294124d-8cb2-4a09-9d9f-53c2404a38c7] EVENT_ID: SYNC_DIRECT_LUNS_STARTED(1,054), Direct LUN synchronization started.                                                   
2021-03-22 19:45:59,469+02 ERROR [org.ovirt.engine.core.bll.storage.pool.SyncDirectLunsCommand] (default task-3) [1294124d-8cb2-4a09-9d9f-53c2404a38c7] Failed to update LUNs, VDS connectivity error for LUNs IDs: [3600140590d860f65aad4c9a8e591a89b] on host: null, 
error details EngineException: No host was found to perform the operation (Failed with error RESOURCE_MANAGER_VDS_NOT_FOUND and code 5004)                                 
2021-03-22 19:45:59,469+02 INFO  [org.ovirt.engine.core.bll.storage.pool.SyncDirectLunsCommand] (default task-3) [1294124d-8cb2-4a09-9d9f-53c2404a38c7] Could not find any LUNs to update.                                                                                                      
2021-03-22 19:45:59,471+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-3) [1294124d-8cb2-4a09-9d9f-53c2404a38c7] EVENT_ID: SYNC_DIRECT_LUNS_FINISHED(1,055), Direct LUN synchronization finished.                                                 
2021-03-22 19:45:59,471+02 INFO  [org.ovirt.engine.core.bll.storage.pool.SyncDirectLunsCommand] (default task-3) [1294124d-8cb2-4a09-9d9f-53c2404a38c7] Lock freed to object 'EngineLock:{exclusiveLocks='[e32185a7-e84e-46f8-8ca7-115478626950=DISK]', sharedLocks=''}'                         
2021-03-22 19:46:14,547+02 INFO  [org.ovirt.engine.core.bll.gluster.tasks.GlusterTasksService] (EE-ManagedScheduledExecutorService-engineSchedul
edThreadPool-Thread-6) [] No up server in cluster 

Eyal, what do you think?

Comment 6 Eyal Shenitzky 2021-03-22 18:04:54 UTC
If we supported an unattached LUN update before the changes we made, we should fix it.

Comment 8 sshmulev 2021-06-28 13:27:13 UTC
verified successfully.

Versions:
ovirt-engine-4.4.7.5-0.9.el8ev.noarch

Steps to reproduce:
1) Create direct Lun and not attach it to any vm.
2) On the disk's view, select the lun --> refresh lun.
3) Check in the Ovirt-Engine for ERROR logs like: "Failed to update LUNs"

results:
No Error logs regarding this operation and pass with success.

Comment 13 errata-xmlrpc 2021-07-22 15:12:33 UTC
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 (Moderate: RHV Manager (ovirt-engine) security update [ovirt-4.4.7]), 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/RHSA-2021:2865