Re: [ovirt-users] ?==?utf-8?q? Error "Did not connect host to storage domain because connection for connectionId is null" in ovirt 4.1

2017-12-12 Thread Simone Tiraboschi
On Mon, Dec 11, 2017 at 11:32 PM, Claude Durocher <
claude.duroc...@cptaq.gouv.qc.ca> wrote:

> Replying to myself here: I fixed it by running this insert statement in
> the postgresql db to restore the missing connection:
>
> insert into storage_server_connections (id, connection, portal,
> storage_type) values ('b3011e5b-552e-4393-a758-ac1e35648ab1',
> '/var/ovirt-lun1', '1', '4');
>

OK, but the question is why you lost it.


>
>
>
> Le Lundi, Décembre 11, 2017 16:29 EST, "Claude Durocher" <
> claude.duroc...@cptaq.gouv.qc.ca> a écrit:
>
>
>
>
> I have a 4.1 ovirt environment. I cannot reactivate a storage domain
> (data-master) and I get an error message stating "connection for
> connectionId 'b3011e5b-552e-4393-a758-ac1e35648ab1' is null". I also
> cannot delete this storage domain as it's a master domain.
>
> 2017-12-11 15:25:10,971-05 INFO  [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] (default task-22)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Lock Acquired to object
> 'EngineLock:{exclusiveLocks='[5662588b-81d2-4da9-b942-8918004770fe=STORAGE]',
> sharedLocks=''}'
> 2017-12-11 15:25:10,999-05 INFO  [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Running command:
> ActivateStorageDomainCommand internal: false. Entities affected :  ID:
> 5662588b-81d2-4da9-b942-8918004770fe Type: StorageAction group
> MANIPULATE_STORAGE_DOMAIN with role type ADMIN
> 2017-12-11 15:25:11,002-05 INFO  [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Lock freed to object
> 'EngineLock:{exclusiveLocks='[5662588b-81d2-4da9-b942-8918004770fe=STORAGE]',
> sharedLocks=''}'
> 2017-12-11 15:25:11,002-05 INFO  [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] ActivateStorage Domain. Before
> Connect all hosts to pool. Time: Mon Dec 11 15:25:11 EST 2017
> 2017-12-11 15:25:11,015-05 WARN  [org.ovirt.engine.core.bll.
> storage.connection.BaseFsStorageHelper] (org.ovirt.thread.pool-6-thread-43)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Did not connect host
> 'e6dbdeb8-4e0e-4589-9121-6d3408c6d7b0' to storage domain
> 'ovirt-lg-1-lun1' because connection for connectionId
> 'b3011e5b-552e-4393-a758-ac1e35648ab1' is null.
> 2017-12-11 15:25:11,016-05 ERROR [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Cannot connect storage server,
> aborting Storage Domain activation.
> 2017-12-11 15:25:11,017-05 INFO  [org.ovirt.engine.core.bll.
> storage.domain.ActivateStorageDomainCommand] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Command
> [id=0fb1fa9d-4002-4fe0-9af2-d30470d5f146]: Compensating
> CHANGED_STATUS_ONLY of 
> org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap;
> snapshot: EntityStatusSnapshot:{id='StoragePoolIsoMapId:{
> storagePoolId='a0cc9e2c-6bff-4d5b-803c-0cd62292c269',
> storageId='5662588b-81d2-4da9-b942-8918004770fe'}', status='Maintenance'}.
> 2017-12-11 15:25:11,023-05 ERROR [org.ovirt.engine.core.dal.
> dbbroker.auditloghandling.AuditLogDirector] 
> (org.ovirt.thread.pool-6-thread-50)
> [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] EVENT_ID:
> USER_ACTIVATE_STORAGE_DOMAIN_FAILED(967), Correlation ID:
> 49dfce30-0e2c-43f8-942d-67a2b56b3ef8, Job ID: 
> 2d766e2a-4b35-4822-9580-4eb9df2d9c33,
> Call Stack: null, Custom ID: null, Custom Event ID: -1, Message: Failed to
> activate Storage Domain ovirt-lg-1-lun1 (Data Center ovirt-lg-1) by
> admin@internal-authz
>
>
> select id,storage,storage_name,_update_date from storage_domain_static;
>   id  |
> storage |  storage_name  |
> _update_date
> --+-
> ---++---
> 
>  072fbaa1-08f3-4a40-9f34-a5ca22dd1d74 | ceab03af-7220-4d42-8f5c-9b557f5d29af
> | ovirt-image-repository |
>  b66443f4-d949-4fca-9825-8cb98eae9e14 | e462883f-0be1-4b31-acf1-154dd7accbc1
> | export |
>  45807651-8f10-408f-891b-64f1cc577a64 | 452235ea-d8b1-43d1-920f-a16a032e000b
> | ovirt-lg-1-iso | 2017-01-20 20:01:00.284097+00
>  a1d803b9-fd0b-477f-a874-53d050d4347b | cd8939df-9cdd-49d3-8dc5-3c06d1836399
> | ovirt-lg-1-export  | 2017-01-20 20:01:14.70549+00
>  b67e7442-f032-4b5c-a4fe-10422650a90b | c6272852-3586-4584-8496-d97c4370c798
> | ovirt-5-iso| 2017-01-20 20:02:08.668034+00
>  a561589c-8eb8-4823-9615-92ac4a1ea94e | cacb8801-6826-42cb-9bab-5552175e0329
> | ovirt-lg-2-export  |
>  646b331a-b68e-4894-807f-bdc8adae15c9 | a592b780-7bd6-4599-ab7e-12c43cb9279d
> | ovirt-lg-2-iso |
>  

Re: [ovirt-users] ?==?utf-8?q? Error "Did not connect host to storage domain because connection for connectionId is null" in ovirt 4.1

2017-12-11 Thread Claude Durocher

Replying to myself here: I fixed it by running this insert statement in the 
postgresql db to restore the missing connection:

insert into storage_server_connections (id, connection, portal, storage_type) 
values ('b3011e5b-552e-4393-a758-ac1e35648ab1', '/var/ovirt-lun1', '1', '4');



Le Lundi, Décembre 11, 2017 16:29 EST, "Claude Durocher" 
 a écrit:
  I have a 4.1 ovirt environment. I cannot reactivate a storage domain 
(data-master) and I get an error message stating "connection for connectionId 
'b3011e5b-552e-4393-a758-ac1e35648ab1' is null". I also cannot delete this 
storage domain as it's a master domain.

2017-12-11 15:25:10,971-05 INFO  
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(default task-22) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Lock Acquired to 
object 
'EngineLock:{exclusiveLocks='[5662588b-81d2-4da9-b942-8918004770fe=STORAGE]', 
sharedLocks=''}'
2017-12-11 15:25:10,999-05 INFO  
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] 
Running command: ActivateStorageDomainCommand internal: false. Entities 
affected :  ID: 5662588b-81d2-4da9-b942-8918004770fe Type: StorageAction group 
MANIPULATE_STORAGE_DOMAIN with role type ADMIN
2017-12-11 15:25:11,002-05 INFO  
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Lock 
freed to object 
'EngineLock:{exclusiveLocks='[5662588b-81d2-4da9-b942-8918004770fe=STORAGE]', 
sharedLocks=''}'
2017-12-11 15:25:11,002-05 INFO  
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] 
ActivateStorage Domain. Before Connect all hosts to pool. Time: Mon Dec 11 
15:25:11 EST 2017
2017-12-11 15:25:11,015-05 WARN  
[org.ovirt.engine.core.bll.storage.connection.BaseFsStorageHelper] 
(org.ovirt.thread.pool-6-thread-43) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] Did 
not connect host 'e6dbdeb8-4e0e-4589-9121-6d3408c6d7b0' to storage domain 
'ovirt-lg-1-lun1' because connection for connectionId 
'b3011e5b-552e-4393-a758-ac1e35648ab1' is null.
2017-12-11 15:25:11,016-05 ERROR 
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] 
Cannot connect storage server, aborting Storage Domain activation.
2017-12-11 15:25:11,017-05 INFO  
[org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] 
Command [id=0fb1fa9d-4002-4fe0-9af2-d30470d5f146]: Compensating 
CHANGED_STATUS_ONLY of 
org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap; snapshot: 
EntityStatusSnapshot:{id='StoragePoolIsoMapId:{storagePoolId='a0cc9e2c-6bff-4d5b-803c-0cd62292c269',
 storageId='5662588b-81d2-4da9-b942-8918004770fe'}', status='Maintenance'}.
2017-12-11 15:25:11,023-05 ERROR 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] 
(org.ovirt.thread.pool-6-thread-50) [49dfce30-0e2c-43f8-942d-67a2b56b3ef8] 
EVENT_ID: USER_ACTIVATE_STORAGE_DOMAIN_FAILED(967), Correlation ID: 
49dfce30-0e2c-43f8-942d-67a2b56b3ef8, Job ID: 
2d766e2a-4b35-4822-9580-4eb9df2d9c33, Call Stack: null, Custom ID: null, Custom 
Event ID: -1, Message: Failed to activate Storage Domain ovirt-lg-1-lun1 (Data 
Center ovirt-lg-1) by admin@internal-authz


select id,storage,storage_name,_update_date from storage_domain_static;
  id  |    storage 
|  storage_name  | _update_date  
--+++---
 072fbaa1-08f3-4a40-9f34-a5ca22dd1d74 | ceab03af-7220-4d42-8f5c-9b557f5d29af   
| ovirt-image-repository |
 b66443f4-d949-4fca-9825-8cb98eae9e14 | e462883f-0be1-4b31-acf1-154dd7accbc1   
| export |
 45807651-8f10-408f-891b-64f1cc577a64 | 452235ea-d8b1-43d1-920f-a16a032e000b   
| ovirt-lg-1-iso | 2017-01-20 20:01:00.284097+00
 a1d803b9-fd0b-477f-a874-53d050d4347b | cd8939df-9cdd-49d3-8dc5-3c06d1836399   
| ovirt-lg-1-export  | 2017-01-20 20:01:14.70549+00
 b67e7442-f032-4b5c-a4fe-10422650a90b | c6272852-3586-4584-8496-d97c4370c798   
| ovirt-5-iso    | 2017-01-20 20:02:08.668034+00
 a561589c-8eb8-4823-9615-92ac4a1ea94e | cacb8801-6826-42cb-9bab-5552175e0329   
| ovirt-lg-2-export  |
 646b331a-b68e-4894-807f-bdc8adae15c9 | a592b780-7bd6-4599-ab7e-12c43cb9279d   
| ovirt-lg-2-iso |
 3ba53a0b-30be-497c-b4df-880e6c6f7567 | 8e5236c9-cbc0-4256-abff-7e984abef65a   
| master | 2017-12-11 02:12:16.499288+00
 3efa5ed5-4e17-4daf-9cc0-6819a9cd7aae | 8d19b66d-1c1c-4976-91d2-8d2565db367a   
| hosted_storage | 2017-12-11