Public bug reported:
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-9cff-4754-9bbd-5d0de5f76852 | With_HTTPS
| qcow2 | bare | | saving |
| 8f16ce54-f20f-434a-af7d-bb11be4c5b3d | Test_JUNK_URL
| qcow2 | bare | | saving |
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-5334-41b0-996b-10d429562178] status changing from processing to
processing
2018-07-17 12:00:58.031 36721 ERROR glance.async.flows.base_import [-] Bad task
configuration: Task was not configured properly
2018-07-17 12:00:58.155 36721 INFO glance.common.scripts.image_import.main [-]
Task 83f30963-5334-41b0-996b-10d429562178: Got image data uri
https://10.43.33.103/nfvo_local_repo/ to be imported
2018-07-17 12:00:58.167 36721 WARNING glance.common.scripts.image_import.main
[-] Task 83f30963-5334-41b0-996b-10d429562178 failed with exception <urlopen
error [Errno 111] ECONNREFUSED>
2018-07-17 12:00:58.167 36721 INFO glance.common.scripts.image_import.main [-]
Task 83f30963-5334-41b0-996b-10d429562178: Could not import image file
https://10.43.33.103/nfvo_local_repo/
2018-07-17 12:00:58.217 36721 WARNING glance.async.taskflow_executor [-] Task
'import-ImportToStore-83f30963-5334-41b0-996b-10d429562178'
(2dd9f3f9-c22c-41b5-a826-602af0c79baa) transitioned into state 'FAILURE' from
state 'RUNNING'
3 predecessors (most recent first):
Atom 'import-CreateImage-83f30963-5334-41b0-996b-10d429562178' {'intention':
'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides':
'79b600bc-9cff-4754-9bbd-5d0de5f76852'}
|__Atom 'import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS',
'requires': {}, 'provides': [(None, {})]}
|__Flow 'import'
** Affects: glance
Importance: Undecided
Status: New
** Tags: in saving stuck
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1782075
Title:
Image Create using the Task API, leaves Image in saving state when
Task fails
Status in Glance:
New
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-9cff-4754-9bbd-5d0de5f76852 | With_HTTPS
| qcow2 | bare | | saving |
| 8f16ce54-f20f-434a-af7d-bb11be4c5b3d | Test_JUNK_URL
| qcow2 | bare | | saving |
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-5334-41b0-996b-10d429562178] status changing from processing to
processing
2018-07-17 12:00:58.031 36721 ERROR glance.async.flows.base_import [-] Bad
task configuration: Task was not configured properly
2018-07-17 12:00:58.155 36721 INFO glance.common.scripts.image_import.main
[-] Task 83f30963-5334-41b0-996b-10d429562178: Got image data uri
https://10.43.33.103/nfvo_local_repo/ to be imported
2018-07-17 12:00:58.167 36721 WARNING glance.common.scripts.image_import.main
[-] Task 83f30963-5334-41b0-996b-10d429562178 failed with exception <urlopen
error [Errno 111] ECONNREFUSED>
2018-07-17 12:00:58.167 36721 INFO glance.common.scripts.image_import.main
[-] Task 83f30963-5334-41b0-996b-10d429562178: Could not import image file
https://10.43.33.103/nfvo_local_repo/
2018-07-17 12:00:58.217 36721 WARNING glance.async.taskflow_executor [-] Task
'import-ImportToStore-83f30963-5334-41b0-996b-10d429562178'
(2dd9f3f9-c22c-41b5-a826-602af0c79baa) transitioned into state 'FAILURE' from
state 'RUNNING'
3 predecessors (most recent first):
Atom 'import-CreateImage-83f30963-5334-41b0-996b-10d429562178'
{'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides':
'79b600bc-9cff-4754-9bbd-5d0de5f76852'}
|__Atom 'import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS',
'requires': {}, 'provides': [(None, {})]}
|__Flow 'import'
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1782075/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp