Image Create using the Task API, leaves Image in saving state when Task fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Image Create using the Task API, leaves Image in saving state when Task API fails.
Steps To reproduce :
- Provide Invalid URL / Provide unsupported URL [Apart from HTTP] to the task API.
- Task API fails with error message : "Task failed due to Internal Error"
- Neither Image ID is returned nor the Image is cleaned up from Glance when the Task API fails.
Output from the glance image-list :
+------
| ID | Name | Disk Format | Container Format | Size | Status |
+------
| 79b600bc-
| 8f16ce54-
Expected :
- Either Image should be cleaned up when the Task API fails (OR) Image ID must be returned back to the user with right error message /status.
- Appropriate Error Message must be returned stating "HTTPS is NOT Supported / Image URL is not reachable" instead of Generic error message : "Task failed due to Internal Error"
Currently we do see some error in the Glance API logs ONLY when Unsupported URL is provided, but no error logs when the URL is not reachable.
018-07-17 12:00:58.002 36721 INFO glance.domain [-] Task [83f30963-
2018-07-17 12:00:58.031 36721 ERROR glance.
2018-07-17 12:00:58.155 36721 INFO glance.
2018-07-17 12:00:58.167 36721 WARNING glance.
2018-07-17 12:00:58.167 36721 INFO glance.
2018-07-17 12:00:58.217 36721 WARNING glance.
3 predecessors (most recent first):
Atom 'import-
|__Atom 'import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
|__Flow 'import'
Could you please add exact steps, commands to reproduce this issue.
Thank you.