glance mirror sync should ignore images in 'deleted' state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
New
|
Undecided
|
Felipe Reyes |
Bug Description
We have a system where for some unknown reason there is an image in 'deleted' status, it appears in the list of images (glance image-list), but can't be deleted. So everytime glance-
I think simplestreams.
$ glance image-list | grep b1e00628-
| b1e00628-
$ glance image-show b1e00628-
+------
| Property | Value |
+------
| architecture | x86_64 |
| checksum | 272bc4cde080392
| container_format | bare |
| content_id | auto.sync |
| created_at | 2016-09-
| disk_format | qcow2 |
| id | b1e00628-
| item_name | disk1.img |
| locations | [] |
| min_disk | 0 |
| min_ram | 0 |
| name | auto-sync/
| owner | 53d1e365300b485
| product_name | com.ubuntu.
| protected | False |
| size | 260440576 |
| source_content_id | com.ubuntu.
| status | deleted |
| tags | [] |
| updated_at | 2016-09-
| version_name | 20160627 |
| virtual_size | None |
| visibility | public |
+------
$ glance image-delete b1e00628-
'400 Bad Request: Image status transition from deleted to deleted is not allowed (HTTP 400)': Unable to delete image 'b1e00628-
Stacktrace found in the glance-
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
INFO * 10-03 18:29:56 [PID:12923] * sstreams * com.ubuntu.
DEBUG * 10-03 18:29:56 [PID:12923] * glanceclient.
DEBUG * 10-03 18:29:57 [PID:12923] * glanceclient.
HTTP/1.1 404 Not Found
date: Mon, 03 Oct 2016 18:29:57 GMT
content-length: 73
content-type: text/plain; charset=UTF-8
x-openstack-
404 Not Found
Image b1e00628-
ERROR * 10-03 18:29:57 [PID:12923] * glanceclient.
ERROR * 10-03 18:29:57 [PID:12923] * root * Glance Client exception during do_sync. will continue polling.
Traceback (most recent call last):
File "/usr/share/
do_
File "/usr/share/
tmirror.
File "/usr/lib/
return self.sync_
File "/usr/lib/
self.
File "/usr/lib/
return self.sync_
File "/usr/lib/
(prodname, vername, itemname))
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return self._http_
File "/usr/lib/
raise exc.from_
HTTPNotFound: 404 Not Found
Image b1e00628-
(HTTP 404)
INFO * 10-03 18:29:57 [PID:12923] * root * sync done.
Related branches
- Scott Moser (community): Needs Information
- Server Team CI bot: Needs Fixing (continuous-integration)
-
Diff: 26 lines (+8/-1)1 file modifiedsimplestreams/mirrors/glance.py (+8/-1)
Details about why glance doesn't consider valid to remove an image with status='deleted' can be found at https:/ /bugs.launchpad .net/glance/ +bug/1452788