simplestreams should avoid pruning images in use

Bug #1729395 reported by David Ames
6
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-mirror-glance will prune based on the --max and --keep switches. There needs to be a switch that takes into account images that are deployed and avoid pruning them.

Revision history for this message
David Ames (thedac) wrote :

A possible approach:

    server_list = novaclient.servers.list(search_opts={'all_tenants': 1})
    for server in server_list:
        try:
            # These images could then be "protected"
            glanceclient.images.update(server.image.get('id'), protected=True)
        except AttributeError:
            pass

Then pruning attempts can then be try/excepted based on glanceclient.exc.HTTPForbidden

Note: The novaclient search for all tenants requires elevated privileges.

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.