Bug 1298857 - [rhevm-shell] problem list storagedomains on hosted-engine storage env
Summary: [rhevm-shell] problem list storagedomains on hosted-engine storage env
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 3.6.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-3.6.3
: ---
Assignee: Roy Golan
QA Contact: Aharon Canan
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-15 09:37 UTC by Jiri Belka
Modified: 2016-02-02 17:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-27 15:25:13 UTC
oVirt Team: SLA
dfediuck: ovirt-3.6.z?
mgoldboi: exception+
mgoldboi: planning_ack+
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Jiri Belka 2016-01-15 09:37:54 UTC
Description of problem:

This seems to be only hosted-engine env issue as I can 'list storagedomains' without problem on _non_hosted-engine_env.

[RHEVM shell (connected)]# list storagedomains 
  ====================================================================================================== ERROR ===================================================================================================
  status: 404
  reason: Not Found
  detail: Entity not found: Storage server connection: id=bdc1e34c-792f-4626-bdae-3d655002b3ac
  ================================================================================================================================================================================================================

2016-01-15 10:18:09,070 DEBUG [org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall] (ajp-/127.0.0.1:8702-2) [] Compiled stored procedure. Call string is [{call getstorage_server_conn
ectionsbyid(?)}]
2016-01-15 10:18:09,070 DEBUG [org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall] (ajp-/127.0.0.1:8702-2) [] SqlCall for procedure [Getstorage_server_connectionsByid] compiled
2016-01-15 10:18:09,088 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-2) [] Operation Failed: Entity not found: Storage server connection: id=bdc1e34c-792f-4626-bdae-3
d655002b3ac

engine=# select id,storage,storage_name,storage_type from storage_domains;
                  id                  |                storage                 |     storage_name     | storage_type 
--------------------------------------+----------------------------------------+----------------------+--------------
 e806bffe-918b-4f92-8ef4-1dca0ff7b66a | 894fd64f-3f9a-4520-99b9-519d689e32ff   | str02-30-export      |            1
 d894f2d2-18fd-4a51-a650-31d065d49095 | c8809a1c-12f8-4f75-8e27-b2f7b5e1abc5   | str02-ps-export      |            1
 133441b4-548c-42f1-bb8f-3dce49d8e73a | 971540a2-0f92-4e3e-94ab-90569eb872f3   | str03-master-export  |            1
 131d564c-52d1-4bba-8d60-39e889a8bc08 | c079af00-920a-4f4d-a536-9602c53425ee   | str02-nfs-export     |            1
 26dee41f-237c-46d9-97ce-98a1489f3baf | 247e657c-b103-4ee8-ac12-6f7d17283bd8   | muj-export           |            1
 6f468d3f-8856-4f3a-9366-7e8e574b998b | b13b7015-4378-4f5d-92f0-5b074f66c806   | export_domain        |            1
 ca414eb9-98ab-422f-8c4e-c2c513231058 | a4785463-7559-4646-9425-067901171839   | str-01-jbelka-export |            1
 11958807-b912-4363-8f3e-6d087608764f | CjEh7I-PiNx-D2qy-bOxd-9Jhb-dqnZ-wlORku | str02-brqsetup02     |            3
 219bc71f-c5ec-4ace-80f5-f07b2f892163 | 9pPBKf-FdgL-gtor-GZrg-eCDr-lxO5-OgWo89 | str03-brqsetup03     |            3
 e469d56b-af8f-4a4a-b0dd-9fe2e8f84e69 | 0TT4eQ-2Old-WW8S-v4oH-nZzb-43sD-Bcv4rz | str01-brqsetup01     |            3
 23c03bb6-9889-4cbf-b7ad-55b9a2c70653 | bdc1e34c-792f-4626-bdae-3d655002b3ac   | hosted_storage       |            1
(11 rows)

'hosted_storage' is nfs storage which hosts (floating) hosted engine:

[root@slot-2 ~]# grep hosted_storage /etc/ovirt-hosted-engine/answers.conf 
OVEHOSTED_STORAGE/storageDomainName=str:hosted_storage
# grep storageDomainConnection /etc/ovirt-hosted-engine/answers.conf 
OVEHOSTED_STORAGE/storageDomainConnection=str:10.34.63.202:/mnt/export/nfs/lv2/_brq-setup

engine=# select * from storage_server_connections where connection like '%_brq-setup%';
 id | connection | user_name | password | iqn | port | portal | storage_type | mount_options | vfs_type | nfs_version | nfs_timeo | nfs_retrans 
----+------------+-----------+----------+-----+------+--------+--------------+---------------+----------+-------------+-----------+-------------
(0 rows)


Version-Release number of selected component (if applicable):
rhevm-3.6-beta / rhevm-3.6.1.3-0.1.el6.noarch

How reproducible:
our (only) 3.6-beta hosted-engine env

Steps to Reproduce:
1. have 3.6-beta hosted-engine env, nfs storage for hosted-engine env
2. rhevm-shell and do list storagedomains
3.

Actual results:
error, output broken

Expected results:
should list storagedomains

Additional info:
works ok on rhevm-3.6.2.5-0.1.el6.noarch on non-hosted-engine env

Comment 2 Oved Ourfali 2016-01-15 14:12:09 UTC
Roy, perhaps something isn't inserted correctly?

Comment 3 Roy Golan 2016-01-27 15:25:13 UTC
Like you said on additional into this works on 3.6.2.5. 
For me it works as well 3.6 install I have. Seems like this is garbage from old failed auto imports prior to Bug 1293829.

Comment 4 Jiri Belka 2016-01-27 15:54:51 UTC
Could you provide a fix steps to this issue? It's our everyday used "production" setup. Thx.

Comment 5 Roy Golan 2016-01-28 22:28:18 UTC
(In reply to Jiri Belka from comment #4)
> Could you provide a fix steps to this issue? It's our everyday used
> "production" setup. Thx.

a reproduction would be to install a 3.6.1 hosted engine. If the import of the hosted engine fails most chances you will see this error.

Comment 6 Jiri Belka 2016-02-02 17:44:28 UTC
DIY:

by some miracle, the storage where hosted engine itself was located appeared in the DB:

-[ RECORD 10 ]----------------+---------------------------------------
id                            | 23c03bb6-9889-4cbf-b7ad-55b9a2c70653
storage                       | bdc1e34c-792f-4626-bdae-3d655002b3ac
storage_name                  | hosted_storage
storage_domain_type           | 1
storage_type                  | 1
storage_domain_format_type    | 3
_create_date                  | 2015-12-22 19:27:17.608237+01
_update_date                  |
recoverable                   | t
last_time_used_as_master      | 0
storage_description           |
storage_comment               |
wipe_after_delete             | f
warning_low_space_indicator   | 10
critical_space_action_blocker | 5

clean hosted-engine env did not have its own storage inside DB.

after deleting '23c03bb6-9889-4cbf-b7ad-55b9a2c70653' from storage_domain_dynamic/static and restart of engine, then rhevm-shell's "list storagedomains" returned expected list.

[RHEVM shell (connected)]# list storagedomains  | grep name
name       : export_domain
name       : muj-export
name       : str01-brqsetup01
name       : str01-iso-shared
name       : str-01-jbelka-export
name       : str02-30-export
name       : str02-brqsetup02
name       : str02-nfs-export
name       : str02-ps-export
name       : str03-brqsetup03
name       : str03-master-export


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