ceph backend reporting meaningless error when no space left
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Invalid
|
Undecided
|
Unassigned | ||
glance_store |
Fix Released
|
Low
|
Unassigned |
Bug Description
When uploading image, but there's no space left in ceph(rbd) backend, client(such as glanceclient) will receive a meaningless error:
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
steps to reproduce:
-------
1.Prepare ceph backend for glance, make the free space small enough, e.g. 10MB.
To be simple, you also can modify ceph's code(function resize), to let it raise errno.ENOSPC. I did this way.
2.uploading image: glance image-create --name img2-ceph --visibility public --disk-format raw --container-format bare --progress --backend rbd --file /opt/stack/
logs
-------
stack@ubuntu16v
> /usr/local/
-> backend = None
(Pdb) c
[======
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2018-12-
| disk_format | raw |
| id | 8c2e48f0-
| min_disk | 0 |
| min_ram | 0 |
| name | img2-ceph |
| os_hash_algo | None |
| os_hash_value | None |
| os_hidden | False |
| owner | 3242a198f7044fc
| protected | False |
| size | None |
| status | queued |
| tags | [] |
| updated_at | 2018-12-
| virtual_size | Not available |
| visibility | public |
+------
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
expected
-------
The correct message should be something related "Storage Full", rbd.py should raise glance_
Some code snippet in notifier.py:
except glance_
msg = (_("Image storage media is full: %s") %
raise webob.exc.
After doing this, the expected behavior will be:
stack@ubuntu16v
> /usr/local/
-> backend = None
(Pdb) c
[======
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2018-12-
| disk_format | raw |
| id | 8aefa92d-
| min_disk | 0 |
| min_ram | 0 |
| name | img2-ceph |
| os_hash_algo | None |
| os_hash_value | None |
| os_hidden | False |
| owner | 3242a198f7044fc
| protected | False |
| size | None |
| status | queued |
| tags | [] |
| updated_at | 2018-12-
| virtual_size | Not available |
| visibility | public |
+------
413 Request Entity Too Large: Image storage media is full: Failed to store image 8aefa92d-
Changed in glance: | |
status: | New → Invalid |
Changed in glance-store: | |
importance: | Undecided → Low |
Changed in glance-store: | |
status: | New → Fix Committed |
Changed in glance-store: | |
status: | Fix Committed → Fix Released |
This issue was fixed in the openstack/ glance_ store 0.28.0 release.