Comment 0 for bug 2012442

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

When use image-create-via-import with glance-download method, 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

olance 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