simplestreams should avoid pruning images in use
Bug #1729395 reported by
David Ames
This bug report is a duplicate of:
Bug #1722836: only remove glance images that are no longer in use.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
New
|
Undecided
|
Unassigned |
Bug Description
For live migration in openstack to work the original image used for an instance must still be available in glance as nova will use the original image in the process of migration.
Right now tools/sstream-
To post a comment you must log in.
A possible approach:
server_list = novaclient. servers. list(search_ opts={' all_tenants' : 1})
glanceclie nt.images. update( server. image.get( 'id'), protected=True)
for server in server_list:
try:
# These images could then be "protected"
except AttributeError:
pass
Then pruning attempts can then be try/excepted based on glanceclient. exc.HTTPForbidd en
Note: The novaclient search for all tenants requires elevated privileges.