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

Bug 1685025

Summary: Handle NoSuchLease vdsm exception while creating new VM lease
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aefrat, bugs, tnisan
Target Milestone: ovirt-4.3.3Flags: pm-rhel: ovirt-4.3+
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-04-16 13:58:21 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:
Bug Depends On: 1684267    
Bug Blocks:    

Description Eyal Shenitzky 2019-03-04 08:07:25 UTC
Description of problem:

Before creating a new VM lease the engine checks if there is an existing lease for the VM, in case that the lease is missing the engine will create a new one.

But, if the lease is missing an exception is raised by the vdsm that cause an ugly traceback in the engine log.

When patch https://gerrit.ovirt.org/#/c/98191/ will merge, the engine will be able to handle this expected error nicely and avoid this ugly traceback. 


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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM
2. Add a lease to the VM

Actual results:
An error message appears in the engine log

Expected results:
The error is expected and the error message should not be shown

Additional info:

Comment 1 Eyal Shenitzky 2019-03-04 08:09:06 UTC
Severity set to medium because this error misleading the error analysis on OST, QE, users, and customers.

Comment 2 Eyal Shenitzky 2019-03-10 10:11:36 UTC
Steps to Reproduce:
1. Create a VM
2. Add a lease to the VM

Actual results:
An error message appears in the engine log:

2019-03-06 15:01:47,534+02 WARN  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] Unexpected return value: Status [code=936, message=No such lease: 'lease=e3a5fbdd-8e74-4375-89a5-0227b7f67e5c']

2019-03-06 15:01:47,535+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] Failed in 'GetVmLeaseInfoVDS' method

2019-03-06 15:01:47,535+02 WARN  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] Unexpected return value: Status [code=936, message=No such lease: 'lease=e3a5fbdd-8e74-4375-89a5-0227b7f67e5c']

2019-03-06 15:01:47,544+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] EVENT_ID: IRS_BROKER_COMMAND_FAILURE(10,803), VDSM command GetVmLeaseInfoVDS failed: No such lease: 'lease=e3a5fbdd-8e74-4375-89a5-0227b7f67e5c'

2019-03-06 15:01:47,545+02 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] IrsBroker::Failed::GetVmLeaseInfoVDS: IRSGenericException: IRSErrorException: Failed to GetVmLeaseInfoVDS, error = No such lease: 'lease=e3a5fbdd-8e74-4375-89a5-0227b7f67e5c', code = 936

2019-03-06 15:01:47,551+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] FINISH, GetVmLeaseInfoVDSCommand, return: , log id: 42ada522

2019-03-06 15:01:47,552+02 ERROR [org.ovirt.engine.core.bll.storage.lease.GetVmLeaseInfoCommand] (default task-4) [895a4037-18ab-4120-af52-a9f36ef7a3f1] Failure in getting lease info for VM 'e3a5fbdd-8e74-4375-89a5-0227b7f67e5c' from storage domains '55bfdb8b-ce1a-4110-bb72-449a2628e3c2', message: EngineException: org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException: IRSGenericException: IRSErrorException: Failed to GetVmLeaseInfoVDS, error = No such lease: 'lease=e3a5fbdd-8e74-4375-89a5-0227b7f67e5c', code = 936 (Failed with error unexpected and code 16)


Expected results:
The error is expected and the error message should be shown as:

2019-03-10 12:11:02,835+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-1) [e3e30160-2e6f-49eb-b15e-f877c8020bb8] Command 'GetVmLeaseInfoVDSCommand( VmLeaseVDSParameters:{expectedEngineErrors='[NoSuchVmLeaseOnDomain]', storagePoolId='d9e454c6-1791-43b5-bf10-45b181d7c555', ignoreFailoverLimit='false', leaseId='9e3ad570-cc9c-48f1-b356-4125e8f50b92', storageDomainId='55bfdb8b-ce1a-4110-bb72-449a2628e3c2'})' execution failed: IRSGenericException: IRSErrorException: No such lease: 'lease=9e3ad570-cc9c-48f1-b356-4125e8f50b92'

Comment 3 Yosi Ben Shimon 2019-04-02 07:16:05 UTC
Tested according to the steps above using:
ovirt-engine-4.3.3.1-0.1.el7.noarch

Actual result:

2019-04-02 10:14:02,112+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmLeaseInfoVDSCommand] (default task-11) [fc4a0a21-c1bc-4e84-a0e9-147cb9ae2fd9] Command 'GetVmLeaseInfoVDSCommand( VmLeaseVDSParameters:{expectedEngineErrors='[NoSuchVmLeaseOnDomain]', storagePoolId='55180bfc-2628-4609-aa28-b0854d7f2e61', ignoreFailoverLimit='false', leaseId='01ef2ad1-714c-4a69-843e-d100769e2907', storageDomainId='81b5ee70-ace2-4da2-a87e-1add49ecf585'})' execution failed: IRSGenericException: IRSErrorException: No such lease: 'lease=01ef2ad1-714c-4a69-843e-d100769e2907'

No traceBack and/or nasty exception found.

Moving to VERIFIED

Comment 4 Sandro Bonazzola 2019-04-16 13:58:21 UTC
This bugzilla is included in oVirt 4.3.3 release, published on April 16th 2019.

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