Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1518423

Summary: inactive Data Center fail to delete a VM without images only with external LUN disks
Product: [oVirt] ovirt-engine Reporter: Maor <mlipchuk>
Component: Backend.CoreAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Lilach Zitnitski <lzitnits>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: amureini, bugs, mlipchuk, ratamir
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 10:10:18 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:

Description Maor 2017-11-28 21:29:06 UTC
Description of problem:
Try to remove a VM with external LUN disks in a non responsive Data Center

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

How reproducible:

Steps to Reproduce:
1. Add a Data Center with storage domains
2. Add a VM with external LUN disk
3. Move the Host to maintenance
4. Try to remove the VM

Actual results:
Fail to delete the VM because it contains disks

Expected results:
externsl LUN disks should not need a Host to be removed

Additional info:

Comment 1 Maor 2017-11-28 21:31:02 UTC
Engine log:

2017-11-28 23:12:43,058+02 INFO  [] (default task-13) [2fb24392] Running command: CreateUserSessionCommand internal: false.
2017-11-28 23:12:43,135+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-13) [2fb24392] EVENT_ID: USER_VDC_LOGIN(30), User admin@internal-authz c
onnecting from '0:0:0:0:0:0:0:1' using session 'iU/TLLvIcUSQZlEW+IxMwpqqHCYcPz86yoVuJ3OIDC/ary3YpMyJt28OLRl1PDsqBCVDMw7k22IP8yPeTfqEfg==' logged in.
2017-11-28 23:12:56,022+02 INFO  [org.ovirt.engine.core.bll.quota.QuotaManager] (EE-ManagedThreadFactory-engineScheduled-Thread-14) [] Quota Cache updated. (26 msec)
2017-11-28 23:13:29,711+02 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-60) [fa819179-e97d-46ce-b51c-2b58dd5523ef] Lock Acquired to object 'E
ngineLock:{exclusiveLocks='[Fedora=VM_NAME, fe30632e-92f5-4853-a603-c5992e525160=VM]', sharedLocks='[fe30632e-92f5-4853-a603-c5992e525160=REMOTE_VM]'}'
2017-11-28 23:13:29,804+02 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-60) [fa819179-e97d-46ce-b51c-2b58dd5523ef] Validation of action 'Impo
rtVmFromConfiguration' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM,VM_CANNOT_IMPORT_VM_EXISTS,$VmName Fedora
2017-11-28 23:13:29,806+02 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-60) [fa819179-e97d-46ce-b51c-2b58dd5523ef] Lock freed to object 'Engi
neLock:{exclusiveLocks='[Fedora=VM_NAME, fe30632e-92f5-4853-a603-c5992e525160=VM]', sharedLocks='[fe30632e-92f5-4853-a603-c5992e525160=REMOTE_VM]'}'

Comment 2 Yaniv Kaul 2017-11-29 13:21:28 UTC

Comment 3 Lilach Zitnitski 2018-01-15 13:30:18 UTC
Tested with the following code:

Tested with the following scenario:

Steps to Reproduce:
1. Add a Data Center with storage domains
2. Add a VM with external LUN disk
3. Move the Host to maintenance
4. Try to remove the VM

Actual results:
VM and external disks are removed

Expected results:

Moving to VERIFIED!

Comment 4 Sandro Bonazzola 2018-02-12 10:10:18 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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