glance image-upload uploads an image without passing --file or stdin

Bug #2053150 reported by Mridula Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
New
Undecided
Unassigned

Bug Description

Steps to reproduce :
1) create an image
$ glance image-create --name image_test --container-format bare --disk-format raw

2) upload an image without passing any data
$ glance image-upload 1e6e18e8-40d1-4a01-b816-7279252d5698

$ glance image-show 1e6e18e8-40d1-4a01-b816-7279252d5698
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| checksum | d41d8cd98f00b204e9800998ecf8427e |
| container_format | bare |
| created_at | 2024-02-14T15:31:15Z |
| disk_format | raw |
| id | 1e6e18e8-40d1-4a01-b816-7279252d5698 |
| locations | [{"url": "rbd://32a17987-217d-459d-920c-b1b902c74fa6/images/1e6e18e8-40d1-4a01- |
| | b816-7279252d5698/snap", "metadata": {"store": "fast"}}] |
| min_disk | 0 |
| min_ram | 0 |
| name | image_test |
| os_hash_algo | sha512 |
| os_hash_value | cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0 |
| | ff8318d2877eec2f63b931bd47417a81a538327af927da3e |
| os_hidden | False |
| owner | cfcb85dead354dac9bd0852150198df4 |
| protected | False |
| size | 0 |
| status | active |
| stores | fast |
| tags | [] |
| updated_at | 2024-02-14T15:32:15Z |
| virtual_size | Not available |
| visibility | shared |
+------------------+----------------------------------------------------------------------------------+

This will result in a 0 size image , without passing any data

Possible solution : the user must pass the data to upload image,
If user wants to create a zero size image it can be created by passing `--file zerobytefile `

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.