import image with glance-download return 400

Bug #2012442 reported by Hung, Nguyen Trong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Confirmed
Undecided
Cyril Roelandt

Bug Description

When use image-create-via-import with glance-download method via glance , glance client return 400

Steps to reproduce:

1.Create image in RegionOne

openstack image create --container-format bare --disk-format qcow2 --file jammy-server-cloudimg-amd64.img Ubuntu-22.04

2. Go to RegionTwo, import image with glance download

glance image-create-via-import --owner admin --import-method glance-download --remote-region RegionOne --remote-image-id da01c16a-32fa-4a8b-8154-f1b41db5f117 --store file --name Ubuntu-22.04 --disk-format qcow2 --container-format bare

3. Glance client return output

+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | bare |
| created_at | 2023-03-22T01:34:18Z |
| disk_format | qcow2 |
| id | 7f783ee0-d66b-4580-b932-50df3ae6754a |
| min_disk | 0 |
| min_ram | 0 |
| name | Ubuntu-22.04 |
| os_hash_algo | None |
| os_hash_value | None |
| os_hidden | False |
| owner | admin |
| protected | False |
| size | None |
| status | queued |
| tags | [] |
| updated_at | 2023-03-22T01:34:18Z |
| virtual_size | Not available |
| visibility | shared |
+------------------+--------------------------------------+
HTTP 400 Bad Request: 'glance_region' needs to be set for glance-download import method

4. Glance image show status image is queue and no longer update

openstack image show 7f783ee0-d66b-4580-b932-50df3ae6754a
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| container_format | bare |
| created_at | 2023-03-22T01:34:18Z |
| disk_format | qcow2 |
| file | /v2/images/7f783ee0-d66b-4580-b932-50df3ae6754a/file |
| id | 7f783ee0-d66b-4580-b932-50df3ae6754a |
| min_disk | 0 |
| min_ram | 0 |
| name | Ubuntu-22.04 |
| owner | admin |
| properties | os_hidden='False' |
| protected | False |
| schema | /v2/schemas/image |
| status | queued |
| tags | |
| updated_at | 2023-03-22T01:34:18Z |
| visibility | shared |
+------------------+------------------------------------------------------+

Env information:

Release: Zed
Glance client : 4.1.0
Glance API: 25.0.0

Tags: zed
description: updated
Changed in glance:
status: New → Confirmed
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

Thanks for your bug report!

Could you confirm this problem is solved by applying the following two patches?

https://review.opendev.org/c/openstack/python-glanceclient/+/880696
https://review.opendev.org/c/openstack/python-glanceclient/+/880697

Revision history for this message
Hung, Nguyen Trong (hungnt1) wrote :

Yeah.I will patch it and reply soon

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.