glance image-upload uploads an image without passing --file or stdin
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-
$ glance image-show 1e6e18e8-
+------
| Property | Value |
+------
| checksum | d41d8cd98f00b20
| container_format | bare |
| created_at | 2024-02-
| disk_format | raw |
| id | 1e6e18e8-
| locations | [{"url": "rbd://
| | b816-7279252d56
| min_disk | 0 |
| min_ram | 0 |
| name | image_test |
| os_hash_algo | sha512 |
| os_hash_value | cf83e1357eefb8b
| | ff8318d2877eec2
| os_hidden | False |
| owner | cfcb85dead354da
| protected | False |
| size | 0 |
| status | active |
| stores | fast |
| tags | [] |
| updated_at | 2024-02-
| 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 `