Bug 1411119
Summary: | [REST-API] Image import from Glance repository fails on 'IO exception' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Elad <ebenahar> | ||||||
Component: | RestAPI | Assignee: | Juan Hernández <juan.hernandez> | ||||||
Status: | CLOSED WONTFIX | QA Contact: | Pavel Stehlik <pstehlik> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 4.0.6.3 | CC: | bugs, ebenahar, mgoldboi, oourfali | ||||||
Target Milestone: | --- | Keywords: | Regression | ||||||
Target Release: | --- | Flags: | sbonazzo:
ovirt-4.2-
mgoldboi: blocker- |
||||||
Hardware: | x86_64 | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2017-09-12 09:39:55 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Elad - your server.log has many exceptions. Can you provide a reproduction on a clean environment? Does that happen with v3, v4 or both APIs? I miss an "<action>" at the beginning of the request body, and that seems to be what the server is complaining about. Please add that, and check again. Created attachment 1238814 [details]
logs-9.1.17
This doesn't reproduce all the time and seems to happen only with v4.
It seems to be reproduced while the hypervisors have connectivity issues with the storage.
Attaching new logs from second occurrence.
v4 attempt:
017-01-09 17:29:44,007 ERROR [org.ovirt.engine.api.v3.V3IOExceptionMapper] (default task-10) [] IO exception while processing "POST" request for path "/storagedomains/ebc4064d-bdbe-4c43-b79
0-1108656d6def/images/91721c23-b39e-4eee-bf67-c3c80cf0032e/import"
v3 attempt:
2017-01-09 17:31:28,690 INFO [org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand] (default task-6) [6384bef] Running command: ImportRepoImageCommand Task handler: ImportRepoImageCreateTaskHandler internal: false. Entities affected : ID: e89cda99-66b2-4f23-b0ee-8195c13c6ed9 Type: StorageAction group CREATE_DISK with role type USER, ID: ebc4064d-bdbe-4c43-b790-1108656d6def Type: StorageAction group ACCESS_IMAGE_STORAGE with role type USER
(In reply to Juan Hernández from comment #2) > I miss an "<action>" at the beginning of the request body, and that seems to > be what the server is complaining about. Please add that, and check again. You're right. With V4, if <action> is not passed, engine throws the exception. With v3 I get "Request syntactically incorrect. See the description below for the correct usage" OK, so this is about improving the error response. Thanks Elad. This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. Doesn't seem important enough to prioritize. Closing as wontfix. |
Created attachment 1238394 [details] engine.log, server.log Description of problem: Image import from Glance repository fails on 'IO exception' via REST API Version-Release number of selected component (if applicable): rhevm-4.0.6.3-0.1.el7ev.noarch How reproducible: Always Steps to Reproduce: 1. URL: https://<engine_addr>/ovirt-engine/api/storagedomains/%Glance_image_repository_ID%/images/%Image_ID%/import Request body: <async>false</async> <cluster> <name>CLUSTER_NAME</name> </cluster> <disk> <name>DISK_NAME</name> </disk> <grace_period> <expiry>10</expiry> </grace_period> <import_as_template>false</import_as_template> <storage_domain> <name>SD_NAME</name> </storage_domain> </action> 3. Actual results: Response body: " Internal Server Error " Engine.log: 2017-01-08 16:28:51,285 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-11) [] IO exception while processing "POST" request for path "/storagedomains /ebc4064d-bdbe-4c43-b790-1108656d6def/images/91721c23-b39e-4eee-bf67-c3c80cf0032e/import" 2017-01-08 16:28:51,285 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-11) [] Exception: java.io.IOException: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"async"). Expected elements are <{}action>,<{}affinity_group>,<{}affinity_groups>,<{}affinity_label>,<{}affinity_labels>,<{}agent>,<{}agent_configuration>,<{}agent_configurations>,<{}agents>,<{}api>,<{}api_summaries>,<{}api_summary>,<{}api_summary_item>,<{}api_summary_items>,<{}apis>,<{}application>,<{}applications>,<{}authorized_key>,<{}authorized_keys>,<{}balance>,<{}balances>,<{}bios>,<{}bioss>,<{}block_statistic>,<{}block_statistics>,<{}body>,<{}bonding>,<{}bondings>,<{}bookmark>,<{}bookmarks>,<{}boot>,<{}boot_menu>,<{}boot_menus>,<{}boots>,<{}brick>,<{}brick_memoryinfo>,<{}brick_profile_detail>,<{}brick_profile_details>,<{}bricks>,<{}cdrom>,<{}cdroms>,<{}certificate>,<{}certificates>,<{}cloud_init>,<{}cloud_inits>,<{}cluster>,<{}cluster_level>,<{}cluster_levels>,<{}clusters>,<{}configuration>,<{}configurations>,<{}console>,<{}consoles> . . . . at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:199) [restapi-jaxrs.jar:] at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:161) [restapi-jaxrs.jar:] at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:61) [resteasy-jaxrs.jar:3.0.18.Final-redhat-1] at org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:60) [resteasy-jaxrs.jar:3.0.18.Final-redhat-1] . . . at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:743) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:262) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:257) Expected results: Import from Glance via REST API should work Additional info: engine.log, server.log