← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2012856] [NEW] glance-download over api return NoneType Catalog

 

Public bug reported:

W're hitting the following 1 error in Zed Ubuntu packages when import
image with glance-download over api

Step 1: Create image with

```
API: http://glannce:9292/v2/images

Body: 
{
    "container_format": "bare",
    "disk_format": "raw",
    "name": "test-ubuntu-glance-zed-local"
}
```

Step 2: Import image 
```
API: http://glance:9292/v2/images/93778c4b-2e71-4f0a-94ef-d6954b5818f5/import
```
Body:
{
  "method": {
    "name": "glance-download",
    "glance_image_id": "8d475963-79ee-46d1-a734-031eff4262fe",
    "glance_region": "RegionOne",
    "glance_service_interface": "public"
  }
}

and glance-api log return error:

```
2023-03-27 03:02:11.807 26367 ERROR glance.async_.flows.api_image_import [-] Task 287d0521-a93c-4ae0-bca1-dfb28553c82f failed with exception 'NoneType' object is not iterable
2023-03-27 03:02:11.829 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'FAILURE' from state 'RUNNING'
3 predecessors (most recent first):
  Atom 'api_image_import-ImageLock-287d0521-a93c-4ae0-bca1-dfb28553c82f' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': None}
  |__Atom 'api_image_import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
     |__Flow 'api_image_import': TypeError: 'NoneType' object is not iterable
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor Traceback (most recent call last):
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     result = task.execute(**arguments)
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 858, in execute
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     with excutils.save_and_reraise_exception():
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     self.force_reraise()
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     raise self.value
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 810, in execute
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     glance_endpoint = utils.get_glance_endpoint(
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/utils.py", line 91, in get_glance_endpoint
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     for service in catalog:
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor TypeError: 'NoneType' object is not iterable
2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor
2023-03-27 03:02:11.857 26367 DEBUG glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTING' from state 'FAILURE' _task_receiver /usr/lib/python3/dist-packages/taskflow/listeners/logging.py:190
2023-03-27 03:02:11.897 26367 DEBUG glance.async_.flows.api_image_import [-] Image 93778c4b-2e71-4f0a-94ef-d6954b5818f5 status changing from importing to queued __exit__ /usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py:167
2023-03-27 03:02:11.953 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTED' from state 'REVERTING' with result 'None'

```

** Affects: glance
     Importance: Undecided
         Status: New

** Description changed:

  W're hitting the following 1 error in Zed Ubuntu packages when import
  image with glance-download over api
+ 
+ Step 1: Create image with
+ 
+ ```
+ API: http://glannce:9292/v2/images
+ 
+ Body: 
+ {
+     "container_format": "bare",
+     "disk_format": "raw",
+     "name": "test-ubuntu-glance-zed-local"
+ }
+ ```
+ 
+ Step 2: Import image 
+ ```
+ API: http://glance:9292/v2/images/93778c4b-2e71-4f0a-94ef-d6954b5818f5/import
+ ```
+ Body:
+ {
+   "method": {
+     "name": "glance-download",
+     "glance_image_id": "8d475963-79ee-46d1-a734-031eff4262fe",
+     "glance_region": "RegionOne",
+     "glance_service_interface": "public"
+   }
+ }
+ 
+ and glance-api log return error:
  
  ```
  2023-03-27 03:02:11.807 26367 ERROR glance.async_.flows.api_image_import [-] Task 287d0521-a93c-4ae0-bca1-dfb28553c82f failed with exception 'NoneType' object is not iterable
  2023-03-27 03:02:11.829 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'FAILURE' from state 'RUNNING'
  3 predecessors (most recent first):
-   Atom 'api_image_import-ImageLock-287d0521-a93c-4ae0-bca1-dfb28553c82f' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': None}
-   |__Atom 'api_image_import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
-      |__Flow 'api_image_import': TypeError: 'NoneType' object is not iterable
+   Atom 'api_image_import-ImageLock-287d0521-a93c-4ae0-bca1-dfb28553c82f' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': None}
+   |__Atom 'api_image_import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
+      |__Flow 'api_image_import': TypeError: 'NoneType' object is not iterable
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor Traceback (most recent call last):
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     result = task.execute(**arguments)
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 858, in execute
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     with excutils.save_and_reraise_exception():
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     self.force_reraise()
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     raise self.value
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 810, in execute
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     glance_endpoint = utils.get_glance_endpoint(
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/utils.py", line 91, in get_glance_endpoint
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     for service in catalog:
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor TypeError: 'NoneType' object is not iterable
- 2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor 
+ 2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor
  2023-03-27 03:02:11.857 26367 DEBUG glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTING' from state 'FAILURE' _task_receiver /usr/lib/python3/dist-packages/taskflow/listeners/logging.py:190
  2023-03-27 03:02:11.897 26367 DEBUG glance.async_.flows.api_image_import [-] Image 93778c4b-2e71-4f0a-94ef-d6954b5818f5 status changing from importing to queued __exit__ /usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py:167
  2023-03-27 03:02:11.953 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTED' from state 'REVERTING' with result 'None'
  
  ```

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/2012856

Title:
  glance-download over api return  NoneType Catalog

Status in Glance:
  New

Bug description:
  W're hitting the following 1 error in Zed Ubuntu packages when import
  image with glance-download over api

  Step 1: Create image with

  ```
  API: http://glannce:9292/v2/images

  Body: 
  {
      "container_format": "bare",
      "disk_format": "raw",
      "name": "test-ubuntu-glance-zed-local"
  }
  ```

  Step 2: Import image 
  ```
  API: http://glance:9292/v2/images/93778c4b-2e71-4f0a-94ef-d6954b5818f5/import
  ```
  Body:
  {
    "method": {
      "name": "glance-download",
      "glance_image_id": "8d475963-79ee-46d1-a734-031eff4262fe",
      "glance_region": "RegionOne",
      "glance_service_interface": "public"
    }
  }

  and glance-api log return error:

  ```
  2023-03-27 03:02:11.807 26367 ERROR glance.async_.flows.api_image_import [-] Task 287d0521-a93c-4ae0-bca1-dfb28553c82f failed with exception 'NoneType' object is not iterable
  2023-03-27 03:02:11.829 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'FAILURE' from state 'RUNNING'
  3 predecessors (most recent first):
    Atom 'api_image_import-ImageLock-287d0521-a93c-4ae0-bca1-dfb28553c82f' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': None}
    |__Atom 'api_image_import_retry' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {}, 'provides': [(None, {})]}
       |__Flow 'api_image_import': TypeError: 'NoneType' object is not iterable
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor Traceback (most recent call last):
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     result = task.execute(**arguments)
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 858, in execute
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     with excutils.save_and_reraise_exception():
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     self.force_reraise()
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     raise self.value
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py", line 810, in execute
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     glance_endpoint = utils.get_glance_endpoint(
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor   File "/usr/lib/python3/dist-packages/glance/async_/utils.py", line 91, in get_glance_endpoint
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor     for service in catalog:
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor TypeError: 'NoneType' object is not iterable
  2023-03-27 03:02:11.829 26367 ERROR glance.async_.taskflow_executor
  2023-03-27 03:02:11.857 26367 DEBUG glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTING' from state 'FAILURE' _task_receiver /usr/lib/python3/dist-packages/taskflow/listeners/logging.py:190
  2023-03-27 03:02:11.897 26367 DEBUG glance.async_.flows.api_image_import [-] Image 93778c4b-2e71-4f0a-94ef-d6954b5818f5 status changing from importing to queued __exit__ /usr/lib/python3/dist-packages/glance/async_/flows/api_image_import.py:167
  2023-03-27 03:02:11.953 26367 WARNING glance.async_.taskflow_executor [-] Task 'api_image_import-ImportMetdata-287d0521-a93c-4ae0-bca1-dfb28553c82f' (952330d6-7194-4edc-9bbe-be40e1a0e09f) transitioned into state 'REVERTED' from state 'REVERTING' with result 'None'

  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/2012856/+subscriptions