Bug 1136930 - Import storage domain doesn't clear ,"storage_server_connections", sql tab entry upon unsuccessful completion
Summary: Import storage domain doesn't clear ,"storage_server_connections", sql tab en...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.1
Assignee: Maor
QA Contact: Elad
URL:
Whiteboard: storage
: 1210808 (view as bug list)
Depends On:
Blocks: 1193058 1193195 1196662 1197441
TreeView+ depends on / blocked
 
Reported: 2014-09-03 15:33 UTC by Ori Gofen
Modified: 2016-05-26 01:50 UTC (History)
14 users (show)

Fixed In Version: ovirt-3.5.1_rc1
Clone Of:
Environment:
Last Closed: 2015-03-23 12:26:05 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)
images+logs (1.03 MB, application/octet-stream)
2014-09-03 15:33 UTC, Ori Gofen
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 35941 0 master MERGED webadmin: Remove Storage connection on import domain failure Never
oVirt gerrit 35968 0 ovirt-engine-3.5 MERGED webadmin: Remove Storage connection on import domain failure Never

Description Ori Gofen 2014-09-03 15:33:32 UTC
Created attachment 934137 [details]
images+logs

Description of problem:
The bug discovered after an attempt to import an NFS storage domain that holds a name which already exist on DC.

from engine's log:

2014-09-03 17:40:26,441 INFO  [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp--127.0.0.1-8702-11) [3231a363] Lock Acquired to object EngineLock [exclusiveLocks= key: 10.35.160.108:/RHEV/ogofen/10 value: STORAGE_CONNECTION
, sharedLocks= ]

we see an entry to ,"storage_server_connections", tab.

engine=# SELECT id,connection, storage_type from storage_server_connections ;
                  id                  |          connection           | storage_type 
--------------------------------------+-------------------------------+--------------
 8fef4646-d9a9-4c4e-aea4-c2f46db6bd72 | 10.35.160.104                 |            3
 e433d1a4-cb9b-42b0-bd50-bc30760f0d13 | 10.35.160.105                 |            3
 9b2f7bdc-822a-446d-9d0a-8f37b8131347 | 10.35.160.106                 |            3
 b3149995-3838-4827-ac3e-1b6bfdd3b40d | 10.35.160.107                 |            3
 dcc98879-e0f3-4091-b11b-3d1d06c1686b | 10.35.160.108:/RHEV/ogofen/4  |            1
 1bb0c00b-9153-4264-bb8c-07e112fcfe28 | 10.35.160.108:/RHEV/ogofen/10 |            1
(6 rows)

Because of name duplicity(see image_1) this operation fails,nonetheless,the psql tab is not cleared with the last entry,so if I pressed  ok button again,a different error message (see image_2) appears explaining that the connection already exist (should a user be interested in this kind of message???)

2014-09-03 17:40:31,197 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.SetVolumeDescriptionVDSCommand] (org.ovirt.thread.pool-8-thread-17) [ba0cb18] Command SetVolumeDescriptionVDSCommand( storagePoolId = 00000002-0002-0002-0002-000000000389, ignoreFailoverLimit = false, storageDomainId = 3d131b82-add5-4f89-a156-7a7e7c753dcd, imageGroupId = eb785203-db63-4dc6-b9f7-b482128885e2, imageId = f5162afd-bf07-498d-8375-4ff67e2f5630) execution failed. Exception: IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Failed to SetVolumeDescriptionVDS, error = Image path does not exist or cannot be accessed/created: (u'/rhev/data-center/mnt/10.35.160.108:_RHEV_ogofen_4/3d131b82-add5-4f89-a156-7a7e7c753dcd/images/eb785203-db63-4dc6-b9f7-b482128885e2',), code = 254
2014-09-03 17:40:31,217 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.SetVolumeDescriptionVDSCommand] (org.ovirt.thread.pool-8-thread-17) [ba0cb18] FINISH, SetVolumeDescriptionVDSCommand, log id: 5ce7aadc

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

How reproducible:
100%

Steps to Reproduce:
Setup:have a dc with a storage domain name $NAME.
--also have a destroyed domain with name $NAME
1.import the destroyed domain
2.after the first error message,initiate a second attempt to import the domain

Actual results:
the domain cannot be recovered at all.

Expected results:
operation should be successful if we prevent name duplicity

Additional info:

Comment 1 Elad 2014-09-09 08:40:30 UTC
Encountered the problem when I tried to import a storage domain that was previously failed to be imported because I blocked communication between engine to the host during import.

Maor, is it the same issue or should I open separated bug?

Comment 2 Maor 2014-09-17 08:15:34 UTC
Elad, 
If after the failure you have leftovers in the storage_server_connections in the DB, then this is the same bug.

Comment 3 Maor 2014-09-17 08:28:57 UTC
I suspect this is actually a duplicate of https://bugzilla.redhat.com/956267.
It should not be relevant to ImportDomain.
Elad and Ori, does it also reproduces when you try to add a new Storage Domain

Comment 4 Elad 2014-09-17 10:58:09 UTC
 (In reply to Maor from comment #3)
> I suspect this is actually a duplicate of https://bugzilla.redhat.com/956267.
> It should not be relevant to ImportDomain.
> Elad and Ori, does it also reproduces when you try to add a new Storage
> Domain

No. In case of destrioyng a domain and trying to recreate with the same storage connection details, the domain is created successfully.

Destroying the domain:

2014-09-17 13:52:14,179 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand] (org.ovirt.thread.pool-6-thread-35) [314147f8] START, DisconnectStorageServerVDSCommand(HostName = green-vdsa, HostId = 34b1b86d-c02c-4022-ae4b-99649a56c096, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: 80253c78-db73-4dc6-be31-879fa338675d, connection: lion.qa.lab.tlv.redhat.com:/export/elad/1, iqn: null, vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), log id: 588d8949


Adding a new domain with the same connection details:

2014-09-17 13:52:54,529 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp-/127.0.0.1:8702-4) [7bbba915] START, ConnectStorageServerVDSCommand(HostName = green-vdsa, HostId = 34b1b86d-c02c-4022-ae4b-99649a56c096, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: null, connection: lion.qa.lab.tlv.redhat.com:/export/elad/1, iqn: null, vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), log id: 5c007163
2014-09-17 13:52:54,669 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp-/127.0.0.1:8702-4) [7bbba915] FINISH, ConnectStorageServerVDSCommand, return: {00000000-0000-0000-0000-000000000000=0}, log id: 5c007163
2014-09-17 13:52:54,683 INFO  [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp-/127.0.0.1:8702-4) [7bbba915] Lock freed to object EngineLock [exclusiveLocks= key: lion.qa.lab.tlv.redhat.com:/export/elad/1 value: STORAGE_CONNECTION
, sharedLocks= ]
2014-09-17 13:52:54,775 INFO  [org.ovirt.engine.core.bll.storage.AddNFSStorageDomainCommand] (ajp-/127.0.0.1:8702-1) [32e39ba1] Running command: AddNFSStorageDomainCommand internal: false. Entities affected :  ID: aaa00000-0000-0000-0000-123456789aaa Type: SystemAction group CREATE_STORAGE_DOMAIN with role type ADMIN
2014-09-17 13:52:54,793 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp-/127.0.0.1:8702-1) [32e39ba1] START, ConnectStorageServerVDSCommand(HostName = green-vdsa, HostId = 34b1b86d-c02c-4022-ae4b-99649a56c096, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: 2ec2c99c-a26f-467f-9cef-e32464c10fd9, connection: lion.qa.lab.tlv.redhat.com:/export/elad/1, iqn: null, vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), log id: 792ee931

Comment 5 Maor 2014-09-17 13:09:49 UTC
I meant try to add a new Storage Domain and fail it the same as you do when you import one.
Then after it fails, try to add it again.

Comment 6 Ori Gofen 2014-09-17 13:23:43 UTC
(In reply to Maor from comment #5)
> I meant try to add a new Storage Domain and fail it the same as you do when
> you import one.
> Then after it fails, try to add it again.

no it doesn't get reproduced upon add new domain,only on Import

Comment 7 Maor 2014-09-23 11:54:10 UTC
After I talked with Ori and elad it seems that this is a scenario that also happens with new Storage Domain.
Ori scenario can be reproduced with REST when adding a new Storage Domain
and elad scenario can be reproduced when adding a new Storage Domain and have trouble with the network connection.

For these reasons, I'm changing the bug to be unrelated to Import Storage Domain, since this is a known issue, and might be a duplicate of  https://bugzilla.redhat.com/956267

Comment 8 Sandro Bonazzola 2015-01-15 14:14:40 UTC
This is an automated message: 
This bug should be fixed in oVirt 3.5.1 RC1, moving to QA

Comment 9 Elad 2015-01-19 09:19:46 UTC
RemoveStorageServerConnectionCommand is executed after a failure to import a storage domain.
Importing the same domain right after is allowed.

Tested with block and file storage domains.

Verified using rhev 3.5 vt13.7

Comment 10 Sandro Bonazzola 2015-01-21 16:05:26 UTC
oVirt 3.5.1 has been released. If problems still persist, please make note of it in this bug report.

Comment 11 Eyal Edri 2015-02-26 12:31:40 UTC
this ovirt bug was fixed during 3.5.1 cycle and is included in the build, and therefore should be verified.

Comment 12 Elad 2015-03-16 10:46:12 UTC
Moving back to VERIFIED based on comment #9

Comment 13 Allon Mureinik 2015-04-14 20:06:17 UTC
*** Bug 1210808 has been marked as a duplicate of this bug. ***


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