Bug 1373181

Summary: Error while executing action Attach Storage Domain: Internal Engine Error when importing iscsi storage domain
Product: [oVirt] ovirt-engine Reporter: Natalie Gavrielov <ngavrilo>
Component: Frontend.WebAdminAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Natalie Gavrielov <ngavrilo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.4CC: acanan, amureini, bugs, mlipchuk, ngavrilo, ratamir, tnisan, ylavi
Target Milestone: ovirt-4.1.0-betaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
ratamir: testing_ack+
Target Release: 4.1.0.2   
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: 2017-02-15 14:47:39 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
engine.log, snapshot none

Description Natalie Gavrielov 2016-09-05 12:35:51 UTC
Created attachment 1197940 [details]
engine.log, snapshot

Description of problem:

Trying to import an iscsi storage domain, there is a SanlockException (which is ok.. it happens) but additionally webadmin displays an error:
Error while executing action Attach Storage Domain: Internal Engine Error

Version-Release number of selected component:
rhevm-4.0.4-0.1.el7ev.noarch
vdsm-4.18.12-1.el7ev.x86_64

How reproducible:
100% (tested 2 iscsi storage domains)

Steps to Reproduce:
Import an iscsi storage domain (that is locked). 

Actual results:
Getting: Error while executing action Attach Storage Domain: Internal Engine Error 

Expected results:
Just the regular SanlockException.

Comment 1 Allon Mureinik 2016-09-05 13:01:45 UTC
So does attaching eventually succeed (which this ugly error), or does it fail completely?

Comment 2 Red Hat Bugzilla Rules Engine 2016-09-05 13:01:52 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 3 Natalie Gavrielov 2016-09-05 13:19:00 UTC
(In reply to Allon Mureinik from comment #1)
> So does attaching eventually succeed (which this ugly error), or does it
> fail completely?

Only when I kill the processes that were attached to ids..(solving the Sanlock lockspace)

Comment 4 Maor 2016-12-24 23:42:17 UTC
Natalie,
I got a question regarding the reproduce steps:
Were you trying to import a block storage domain while the domain was already imported and was in lock status?

Comment 5 Natalie Gavrielov 2016-12-25 09:53:40 UTC
(In reply to Maor from comment #4)
> Natalie,
> I got a question regarding the reproduce steps:
> Were you trying to import a block storage domain while the domain was
> already imported and was in lock status?

I think that if this was the case I would supply this information in the steps to reproduce.  
If I recall correctly, I probably tried to import this domain after installing a new engine and vdsm (without removing the SD from the old configuration, that's why it was locked).

Comment 6 Maor 2017-01-08 14:03:09 UTC
The proposed fix will present the following message on a sanlock exception:
  "Error while executing action Attach Storage Domain: AquireHostIdFailure"

Comment 7 Natalie Gavrielov 2017-02-05 13:51:45 UTC
Maor,

Any easy way to induce this error (SanlockException)?
(without performing the complete test that includes an engine installation..)
I tried to use flock.. but this didn't work

Comment 8 Maor 2017-02-05 22:34:49 UTC
Maybe you can try to import a storage domain that some one else is using in his setup.

Comment 9 Natalie Gavrielov 2017-02-06 13:42:42 UTC
Ran scenario described in comment 8 

Verified, 
Using builds:
ovirt-engine-4.1.0.3-0.1.el7.noarch
vdsm-4.19.4-15.git5b39b63.el7.centos.x86_64

Message displayed:
Error while executing action Attach Storage Domain: AcquireHostIdFailure