Bug 1578416

Summary: Register a partial Template with allow_partial flag throws an exception
Product: [oVirt] ovirt-engine Reporter: Maor <mlipchuk>
Component: BLL.StorageAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.2CC: bugs, ebenahar, mlipchuk
Target Milestone: ovirt-4.2.4Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-26 08:37:37 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:

Description Maor 2018-05-15 14:24:00 UTC
Description of problem:
Register a partial Template with allow_partial flag throws an exception

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


How reproducible:


Steps to Reproduce:
1. Create a Template with 2 disks on 2 different storage domains
2. Detach both storage domains from the setup
3. Import one of them back to the setup
4. Try to register the Template through the REST with allow_partial flag as True

Actual results:
Template fails to get registered with an exception

Expected results:
Template should be registered with one disk

Additional info:

Comment 4 Maor 2018-06-10 23:45:57 UTC
Thanks for the quick info Elad.
I've been trying to reproduce this several times on my environment but the registration seems to succeed for me every time (see [1])

after investigating it a bit more, I've noticed that your hosts still contain  active volumes (see [2]), and that is probably the reason your env pass the validation for existing volumes and fail later on.
I don't know why those LVs are still active on your host, could it be related to hosted engine maybe?
Can you please try to reproduce this with an NFS storage domain and let me know if that does reproduce?

[1]
2018-06-11 01:37:58,565+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-18) [4c61b9c1] EVENT_ID: USER_VDC_LOGOUT(31), User admin@internal-authz connected from '0:0:0:0:0:0:0:1' using session 'ob77qjgM9U9MYoJ0U5RGuAkotNzcUTwa1LcHN6rsMno7N6KCspWVEMS1bJDKlLnQ+ptaXwb1/3yVJz+C+FqR8Q==' logged out.
2018-06-11 01:38:29,022+03 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-29) [] User admin@internal successfully logged out
2018-06-11 01:38:29,028+03 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-31) [35064d5c] Running command: TerminateSessionsForTokenCommand internal: true.
2018-06-11 01:38:29,052+03 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-33) [] User admin@internal successfully logged out
2018-06-11 01:38:29,058+03 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-32) [5213b594] Running command: TerminateSessionsForTokenCommand internal: true.
2018-06-11 01:38:37,758+03 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-35) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=token:password-access
2018-06-11 01:38:37,810+03 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-22) [3c5163f8] Running command: CreateUserSessionCommand internal: false.
2018-06-11 01:38:37,847+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-22) [3c5163f8] EVENT_ID: USER_VDC_LOGIN(30), User admin@internal-authz connecting from '0:0:0:0:0:0:0:1' using session 'ZyYZbrXw3v3Cw2LKaHV9HPQW34HUI0HN9pwbiBTwa48c39lb5TPCfvbqzoyno1zCt42AuSvdynkFd1f7F6RcrA==' logged in.
2018-06-11 01:38:38,031+03 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.DrMappingHelper] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Mapping cluster 'cluster_prod' to 'Cluster [cluster_prod]' for vm 'b65dfeb6-c044-4689-a9ac-d1854d8ba4cd'.
2018-06-11 01:38:38,075+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] START, GetImageInfoVDSCommand( GetImageInfoVDSCommandParameters:{storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', ignoreFailoverLimit='false', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='dea0806b-0aec-488f-8585-9b4f7112f920', imageId='c1266a09-742a-48a7-b2a9-a0e4d12b69cb'}), log id: 4661c3ef
2018-06-11 01:38:38,076+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] START, GetVolumeInfoVDSCommand(HostName = green-vdsd.scl.lab.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='771e4f56-7768-4bb5-be1c-08c2cc2faebe', storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='dea0806b-0aec-488f-8585-9b4f7112f920', imageId='c1266a09-742a-48a7-b2a9-a0e4d12b69cb'}), log id: 6181ba8b
2018-06-11 01:38:38,246+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Failed in 'GetVolumeInfoVDS' method
2018-06-11 01:38:38,255+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM green-vdsd.scl.lab.tlv.redhat.com command GetVolumeInfoVDS failed: Storage domain does not exist: ('50abcf12-7cb0-40d7-afca-e9eb979ccdec',)
2018-06-11 01:38:38,255+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand' return value '
VolumeInfoReturn:{status='Status [code=358, message=Storage domain does not exist: ('50abcf12-7cb0-40d7-afca-e9eb979ccdec',)]'}
'
2018-06-11 01:38:38,255+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] HostName = green-vdsd.scl.lab.tlv.redhat.com
2018-06-11 01:38:38,255+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Command 'GetVolumeInfoVDSCommand(HostName = green-vdsd.scl.lab.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='771e4f56-7768-4bb5-be1c-08c2cc2faebe', storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='dea0806b-0aec-488f-8585-9b4f7112f920', imageId='c1266a09-742a-48a7-b2a9-a0e4d12b69cb'})' execution failed: VDSGenericException: VDSErrorException: Failed to GetVolumeInfoVDS, error = Storage domain does not exist: ('50abcf12-7cb0-40d7-afca-e9eb979ccdec',), code = 358
2018-06-11 01:38:38,255+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] FINISH, GetVolumeInfoVDSCommand, return: , log id: 6181ba8b
2018-06-11 01:38:38,255+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Failed to get the volume information, marking as FAILED
2018-06-11 01:38:38,255+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] FINISH, GetImageInfoVDSCommand, return: , log id: 4661c3ef
2018-06-11 01:38:38,255+03 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Disk image 'dea0806b-0aec-488f-8585-9b4f7112f920/c1266a09-742a-48a7-b2a9-a0e4d12b69cb' doesn't exist on storage domain '50abcf12-7cb0-40d7-afca-e9eb979ccdec'. Ignoring since force flag in on
2018-06-11 01:38:38,257+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] START, GetImageInfoVDSCommand( GetImageInfoVDSCommandParameters:{storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', ignoreFailoverLimit='false', storageDomainId='7fd6c761-12c0-45a0-bee3-740b06201339', imageGroupId='5b831ead-ae2b-4298-9171-590e92a4f25e', imageId='c1ef391c-7d3f-4507-98d4-d96ae306ba1a'}), log id: 16e017fe
2018-06-11 01:38:38,258+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] START, GetVolumeInfoVDSCommand(HostName = green-vdsd.scl.lab.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='771e4f56-7768-4bb5-be1c-08c2cc2faebe', storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', storageDomainId='7fd6c761-12c0-45a0-bee3-740b06201339', imageGroupId='5b831ead-ae2b-4298-9171-590e92a4f25e', imageId='c1ef391c-7d3f-4507-98d4-d96ae306ba1a'}), log id: 4928525e
2018-06-11 01:38:38,451+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] FINISH, GetVolumeInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@ff995739, log id: 4928525e
2018-06-11 01:38:38,451+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@ff995739, log id: 16e017fe
2018-06-11 01:38:38,455+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Checking for missing users
2018-06-11 01:38:38,460+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Checking for missing roles
2018-06-11 01:38:38,481+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] Running command: ImportVmTemplateFromConfigurationCommand internal: false. Entities affected :  ID: 7fd6c761-12c0-45a0-bee3-740b06201339 Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN
2018-06-11 01:38:38,485+03 INFO  [org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsHandlers$ReportResults] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] vNic ['nic1','ovirtmgmt']: mapping terminated with 'SUCCESS, ApplyProfileById'
2018-06-11 01:38:38,682+03 WARN  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] EVENT_ID: IMPORTEXPORT_PARTIAL_TEMPLATE_MISSING_ENTITIES(1,197), The following entities could not be verified and will not be part of the imported Template tempo2: 'Disks: ubuntu_Disk2 ' (User: admin@internal-authz).
2018-06-11 01:38:38,685+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] START, GetImagesListVDSCommand( GetImagesListVDSCommandParameters:{storagePoolId='cffeb739-2817-4ae1-86d5-e0b31914de60', ignoreFailoverLimit='false', sdUUID='7fd6c761-12c0-45a0-bee3-740b06201339'}), log id: 51c5fd40
2018-06-11 01:38:38,860+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] FINISH, GetImagesListVDSCommand, return: [212cda74-03f1-4580-aba6-50052e0e30b9, 89ecf581-9f6b-4d54-96aa-eb4dcbec143f, 85bbc8f3-0c5e-439b-8c4f-4efb8a14ff4c, 2d05dc37-afec-4f05-a65a-b2f0be64e2e8, 76da87c1-52f5-4e3b-b1ed-3ba19879f61c, 5b831ead-ae2b-4298-9171-590e92a4f25e, eeedd2ad-c1dd-401a-bd0e-69b3d1f725dd, 40a8f161-73ec-4bf7-ba4d-03edc114859b, 3d1fcdd5-5348-4cac-a319-4a0899e74713], log id: 51c5fd40
2018-06-11 01:38:38,889+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-22) [2d718244-e2de-43bc-bee2-989a1c1a31bc] EVENT_ID: TEMPLATE_IMPORT_FROM_CONFIGURATION_SUCCESS(180), Template tempo2 has been successfully imported from the given configuration.
2018-06-11 01:38:38,910+03 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-22) [7f46f923] Running command: LogoutSessionCommand internal: false.
2018-06-11 01:38:38,919+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-22) [7f46f923] EVENT_ID: USER_VDC_LOGOUT(31), User admin@internal-authz connected from '0:0:0:0:0:0:0:1' using session 'ZyYZbrXw3v3Cw2LKaHV9HPQW34HUI0HN9pwbiBTwa48c39lb5TPCfvbqzoyno1zCt42AuSvdynkFd1f7F6RcrA==' logged out.


[2]
  466dff16-7f2c-4b8b-99fb-450b69ae2e81 6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi------- 128.00m                                                    
  653dd8a3-a100-4900-ab2a-a76c22fbf100 6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-------   1.00g                                                    
  a6fc5944-fce7-449e-b284-0c551e797b62 6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-------   1.00g                                                    
  db4335f5-7383-4d5e-8af1-38c92261a100 6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi------- 128.00m                                                    
  ids                                  6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a----- 128.00m                                                    
  inbox                                6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a----- 128.00m                                                    
  leases                               6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a-----   2.00g                                                    
  master                               6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a-----   1.00g                                                    
  metadata                             6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a----- 512.00m                                                    
  outbox                               6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a----- 128.00m                                                    
  xleases                              6dba87a4-7f7d-4a16-803a-f6fac97957d9 -wi-a-----   1.00g

Comment 5 Elad 2018-06-11 08:37:15 UTC
The same with NFS:


https://storage-ge-he-02.scl.lab.tlv.redhat.com/ovirt-engine/api/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678/templates/95be03cd-eb4e-432c-9afa-265c16a5c9d3/register


<action>
    <allow_partial_import>true</allow_partial_import>
</action>



<action>
<allow_partial_import>true</allow_partial_import>
<fault>
<detail>[Cannot import Template. Storage Domain doesn't exist.]</detail>
<reason>Operation Failed</reason>
 </fault>
<status>failed</status>
 </action>




Domain status:



https://storage-ge-he-02.scl.lab.tlv.redhat.com/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678




<storage_domain href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678" id="75616fc7-80ad-4d68-813b-3ccfde1e6678">
<actions>
<link href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678/activate" rel="activate" />
<link href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678/deactivate" rel="deactivate" />
 </actions>
<name>elad1</name>
<link href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001/storagedomains/75616fc7-80ad-4d68-813b-3ccfde1e6678/disks" rel="disks" />
<available>937376612352</available>
<backup>false</backup>
<committed>0</committed>
<critical_space_action_blocker>5</critical_space_action_blocker>
<discard_after_delete>false</discard_after_delete>
<external_status>ok</external_status>
<master>false</master>
<status>active</status>
<storage>
<address>yellow-vdsb.qa.lab.tlv.redhat.com</address>
<nfs_version>auto</nfs_version>
<path>/Storage_NFS/storage_local_ge12_nfs_3</path>
<type>nfs</type>
 </storage>
<storage_format>v4</storage_format>
<supports_discard>false</supports_discard>
<supports_discard_zeroes_data>false</supports_discard_zeroes_data>
<type>data</type>
<used>1260572901376</used>
<warning_low_space_indicator>10</warning_low_space_indicator>
<wipe_after_delete>false</wipe_after_delete>
<data_center href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001" id="eb6c751c-6bfc-11e8-8385-00163e7bd001" />
<data_centers>
<data_center href="/ovirt-engine/api/datacenters/eb6c751c-6bfc-11e8-8385-00163e7bd001" id="eb6c751c-6bfc-11e8-8385-00163e7bd001" />
</data_centers>
 </storage_domain>

Comment 6 Maor 2018-06-11 14:25:41 UTC
I've used ovirt-engine 4.2.4.1 and still got the same result (see [1])

[1]
2018-06-11 17:16:24,079+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] HostName = venus-vdsa.tlv.redhat.com
2018-06-11 17:16:24,084+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] Command 'GetVolumeInfoVDSCommand(HostName = venus-vdsa.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='672accfe-69e3-4fe2-b0aa-216478ded9b1', storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='07d13abd-9a81-4295-9585-741d9c4c55e4', imageId='6fb86be6-4cb9-455b-b56c-ba988e0e8315'})' execution failed: VDSGenericException: VDSErrorException: Failed to GetVolumeInfoVDS, error = Storage domain does not exist: (u'50abcf12-7cb0-40d7-afca-e9eb979ccdec',), code = 358
2018-06-11 17:16:24,086+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] FINISH, GetVolumeInfoVDSCommand, log id: 6ef8d284
2018-06-11 17:16:24,087+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] Failed to get the volume information, marking as FAILED
2018-06-11 17:16:24,088+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] FINISH, GetImageInfoVDSCommand, log id: 21bcd8f5
2018-06-11 17:16:28,887+03 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-21) [e3bcad12-e49f-4500-b819-f10ee40afb83] Validation of action 'ImportVmTemplateFromConfiguration' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM_TEMPLATE,TEMPLATE_IMAGE_NOT_EXIST
2018-06-11 17:16:50,130+03 INFO  [org.ovirt.engine.core.utils.servlet.CORSSupportFilter] (default task-32) [] CORS support is disabled.
2018-06-11 17:16:54,243+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-25) [] EVENT_ID: USER_VDC_LOGIN_FAILED(114), User admin@internal connecting from '10.36.117.253' failed to log in : 'Unable to log in. Verify your login information or contact the system administrator.'.
2018-06-11 17:16:54,245+03 ERROR [org.ovirt.engine.core.sso.utils.SsoUtils] (default task-42) [] OAuthException access_denied: Cannot authenticate user 'admin@internal': Unable to log in. Verify your login information or contact the system administrator..
2018-06-11 17:16:54,247+03 ERROR [org.ovirt.engine.core.aaa.filters.SsoRestApiAuthFilter] (default task-28) [] Cannot authenticate using authentication Headers: access_denied: Cannot authenticate user 'admin@internal': Unable to log in. Verify your login information or contact the system administrator..
2018-06-11 17:16:57,636+03 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-44) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=token:password-access
2018-06-11 17:16:57,675+03 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-37) [17e30978] Running command: CreateUserSessionCommand internal: false.
2018-06-11 17:16:57,700+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-37) [17e30978] EVENT_ID: USER_VDC_LOGIN(30), User admin@internal-authz connecting from '0:0:0:0:0:0:0:1' using session 'F699Amq4+gxwo6HHl0AvlW8ku6kEb0w63bmAHad2UIYXM2LW7qsHUFBwlmlfukgt5CYU3bslCnOCo4AEwrk4EQ==' logged in.
2018-06-11 17:17:18,594+03 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-37) [6e79bb03] Running command: LogoutSessionCommand internal: false.
2018-06-11 17:17:18,610+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-37) [6e79bb03] EVENT_ID: USER_VDC_LOGOUT(31), User admin@internal-authz connected from '0:0:0:0:0:0:0:1' using session 'F699Amq4+gxwo6HHl0AvlW8ku6kEb0w63bmAHad2UIYXM2LW7qsHUFBwlmlfukgt5CYU3bslCnOCo4AEwrk4EQ==' logged out.
2018-06-11 17:17:27,973+03 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-30) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=token:password-access
2018-06-11 17:17:28,007+03 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-41) [44d7b4aa] Running command: CreateUserSessionCommand internal: false.
2018-06-11 17:17:28,034+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-41) [44d7b4aa] EVENT_ID: USER_VDC_LOGIN(30), User admin@internal-authz connecting from '0:0:0:0:0:0:0:1' using session 'Fdcy/G+cx14m7cxZk+LcXDztIbT8oikq5bzurAu4ppM1cEQryV9GTCGEdyPKslY1hs7CN8yN3Z94HjsWqEglHw==' logged in.
2018-06-11 17:17:28,115+03 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-41) [7d6731af] Running command: LogoutSessionCommand internal: false.
2018-06-11 17:17:28,163+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-41) [7d6731af] EVENT_ID: USER_VDC_LOGOUT(31), User admin@internal-authz connected from '0:0:0:0:0:0:0:1' using session 'Fdcy/G+cx14m7cxZk+LcXDztIbT8oikq5bzurAu4ppM1cEQryV9GTCGEdyPKslY1hs7CN8yN3Z94HjsWqEglHw==' logged out.
2018-06-11 17:17:31,141+03 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-47) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=token:password-access
2018-06-11 17:17:31,169+03 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-49) [11e23662] Running command: CreateUserSessionCommand internal: false.
2018-06-11 17:17:31,481+03 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-49) [6d17e269] Running command: LogoutSessionCommand internal: false.
2018-06-11 17:17:31,504+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-49) [6d17e269] EVENT_ID: USER_VDC_LOGOUT(31), User admin@internal-authz connected from '0:0:0:0:0:0:0:1' using session 'FJP42LsuWoofglCFhxG0j8OiJEeuYlUdMrG00uqFE0zpXd5UZQBLkaRIWlo+Hm+zaB5iAOEE4TwXb52hUoQ/oA==' logged out.
2018-06-11 17:17:55,120+03 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-56) [] User admin@internal successfully logged out
2018-06-11 17:17:55,318+03 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-57) [50b2db38] Running command: TerminateSessionsForTokenCommand internal: true.
2018-06-11 17:17:55,354+03 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-58) [] User admin@internal successfully logged out
2018-06-11 17:17:55,367+03 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-63) [521c558] Running command: TerminateSessionsForTokenCommand internal: true.
2018-06-11 17:17:55,399+03 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-59) [] User admin@internal successfully logged out
2018-06-11 17:17:55,406+03 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-61) [744aa358] Running command: TerminateSessionsForTokenCommand internal: true.
2018-06-11 17:17:56,016+03 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-52) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate ovirt-ext=token:password-access
2018-06-11 17:17:56,048+03 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-64) [308813fa] Running command: CreateUserSessionCommand internal: false.
2018-06-11 17:17:56,069+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-64) [308813fa] EVENT_ID: USER_VDC_LOGIN(30), User admin@internal-authz connecting from '0:0:0:0:0:0:0:1' using session 'MJwizOWtlwOTWewLsou0Cnt/dkH9h3r4kyW6oyBYcJSwHbb92TRxXADDGZPtKlaTkyn4qxf8KYjFxgPCpFpBrg==' logged in.
2018-06-11 17:17:56,259+03 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.DrMappingHelper] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Mapping cluster 'Default' to 'Cluster [Default]' for vm '294c748d-7a52-411e-853c-47a3d4571e32'.
2018-06-11 17:18:02,319+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] START, GetImageInfoVDSCommand( GetImageInfoVDSCommandParameters:{storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', ignoreFailoverLimit='false', storageDomainId='7fd6c761-12c0-45a0-bee3-740b06201339', imageGroupId='34ca1261-85c9-4a97-8770-2f5db23f7276', imageId='4547e6c2-e85b-4433-a659-641a034ae55f'}), log id: 9aa8d4c
2018-06-11 17:18:02,590+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] START, GetVolumeInfoVDSCommand(HostName = venus-vdsa.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='672accfe-69e3-4fe2-b0aa-216478ded9b1', storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', storageDomainId='7fd6c761-12c0-45a0-bee3-740b06201339', imageGroupId='34ca1261-85c9-4a97-8770-2f5db23f7276', imageId='4547e6c2-e85b-4433-a659-641a034ae55f'}), log id: 26ab2467
2018-06-11 17:18:02,854+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] FINISH, GetVolumeInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@99776c1, log id: 26ab2467
2018-06-11 17:18:02,855+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.storage.DiskImage@99776c1, log id: 9aa8d4c
2018-06-11 17:18:09,724+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] START, GetImageInfoVDSCommand( GetImageInfoVDSCommandParameters:{storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', ignoreFailoverLimit='false', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='07d13abd-9a81-4295-9585-741d9c4c55e4', imageId='6fb86be6-4cb9-455b-b56c-ba988e0e8315'}), log id: 4070f4d0
2018-06-11 17:18:09,828+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] START, GetVolumeInfoVDSCommand(HostName = venus-vdsa.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='672accfe-69e3-4fe2-b0aa-216478ded9b1', storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='07d13abd-9a81-4295-9585-741d9c4c55e4', imageId='6fb86be6-4cb9-455b-b56c-ba988e0e8315'}), log id: 37cae3cc
2018-06-11 17:18:10,026+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Failed in 'GetVolumeInfoVDS' method
2018-06-11 17:18:10,091+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM venus-vdsa.tlv.redhat.com command GetVolumeInfoVDS failed: Storage domain does not exist: (u'50abcf12-7cb0-40d7-afca-e9eb979ccdec',)
2018-06-11 17:18:10,093+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand' return value '
VolumeInfoReturn:{status='Status [code=358, message=Storage domain does not exist: (u'50abcf12-7cb0-40d7-afca-e9eb979ccdec',)]'}
'
2018-06-11 17:18:10,094+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] HostName = venus-vdsa.tlv.redhat.com
2018-06-11 17:18:10,095+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Command 'GetVolumeInfoVDSCommand(HostName = venus-vdsa.tlv.redhat.com, GetVolumeInfoVDSCommandParameters:{hostId='672accfe-69e3-4fe2-b0aa-216478ded9b1', storagePoolId='661a0bee-6d7e-11e8-a17f-28d244694617', storageDomainId='50abcf12-7cb0-40d7-afca-e9eb979ccdec', imageGroupId='07d13abd-9a81-4295-9585-741d9c4c55e4', imageId='6fb86be6-4cb9-455b-b56c-ba988e0e8315'})' execution failed: VDSGenericException: VDSErrorException: Failed to GetVolumeInfoVDS, error = Storage domain does not exist: (u'50abcf12-7cb0-40d7-afca-e9eb979ccdec',), code = 358
2018-06-11 17:18:10,096+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVolumeInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] FINISH, GetVolumeInfoVDSCommand, log id: 37cae3cc
2018-06-11 17:18:10,097+03 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Failed to get the volume information, marking as FAILED
2018-06-11 17:18:10,097+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] FINISH, GetImageInfoVDSCommand, log id: 4070f4d0
2018-06-11 17:18:16,275+03 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Disk image '07d13abd-9a81-4295-9585-741d9c4c55e4/6fb86be6-4cb9-455b-b56c-ba988e0e8315' doesn't exist on storage domain '50abcf12-7cb0-40d7-afca-e9eb979ccdec'. Ignoring since force flag in on
2018-06-11 17:18:17,404+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Checking for missing users
2018-06-11 17:18:17,419+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Checking for missing roles
2018-06-11 17:18:17,473+03 INFO  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] Running command: ImportVmTemplateFromConfigurationCommand internal: false. Entities affected :  ID: 7fd6c761-12c0-45a0-bee3-740b06201339 Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN
2018-06-11 17:18:17,698+03 WARN  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-64) [5ddfb198-2f29-44f0-99c2-7dbbc8527538] EVENT_ID: IMPORTEXPORT_PARTIAL_TEMPLATE_MISSING_ENTITIES(1,197), The following entities could not be verified and will not be part of the imported Template template_elad: 'Disks: VMElad_Disk2 ' (User: admin@internal-authz).

Comment 7 Elad 2018-06-13 16:29:42 UTC
After further investigation, the issue was that on block storage, after removing a domain from the setup with destroy and there are other block domains seen from the same target, the VG is still seen by the host and its LVs are visible. This means that the disks that are attached to the template that we try to import with allow_partial are seen from the domain which is not attached to the DC.

This is the reason for <detail>[Cannot import Template. Storage Domain doesn't exist.]</detail> error we get upon partial import.


In case the unattached domain is not seen by the host, partial import succeeds.

Used:
rhvm-4.2.4.2-0.1.el7_3.noarch
vdsm-4.20.30-1.el7ev.x86_64

Comment 8 Sandro Bonazzola 2018-06-26 08:37:37 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

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