Inserting location does not insert the new location at the right place
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Hello!
I am providing a reproducer: http://
1) Setup devstack
2) Install jq
3) Add these two lines in the DEFAULT section of glance-api.conf:
show_multiple_
show_image_
I know these options are deprecated, but I think using them allows us to see a potential bug.
$ bash reproducer.sh
[+] Creating an image with no locations
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2021-02-
| disk_format | qcow2 |
| id | eaeb5759-
| locations | [] |
| min_disk | 0 |
| min_ram | 0 |
| name | test-img |
| os_hash_algo | None |
| os_hash_value | None |
| os_hidden | False |
| owner | f6372bed278b4d0
| protected | False |
| size | None |
| status | queued |
| tags | [] |
| updated_at | 2021-02-
| virtual_size | Not available |
| visibility | shared |
+------
[+] Adding location at index 0 (https:/
[
{
"url": "https:/
"metadata": {}
}
]
[+] Adding location at index 0 (https:/
[
{
"url": "https:/
"metadata": {}
},
{
"url": "https:/
"metadata": {}
}
]
[+] Showing locations
[
{
"url": "https:/
"metadata": {}
},
{
"url": "https:/
"metadata": {}
}
]
Basically, the answers from the API look fine: first we add the .raw.xz image, and it's the only available location. Then we insert the .qcow2 image at position 0, and our 2 locations are in the right order. But then, when showing the image, it seems like the .raw.xz image comes first.
We decided this was not a valid use case.