Remove old images after an upgrade

Bug #1632282 reported by Christian Berendt
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla-ansible
In Progress
Wishlist
Unassigned

Bug Description

At the moment we do not cleanup old images after an upgrade. This results in a lot of unused images when running regular upgrades.

At the moment we do not support rollbacks, because of that it should be safe to remove old images after successfully running an upgrade of a service.

At least we should provide a tool based on cleanup-images that is able to remove old images.

Changed in kolla:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in kolla:
milestone: none → ocata-3
Mark Goddard (mgoddard)
affects: kolla → kolla-ansible
Changed in kolla-ansible:
milestone: ocata-3 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)
Changed in kolla-ansible:
status: Confirmed → In Progress
Revision history for this message
Roman Krček (r-krcek) wrote :

I proposed a POC of how this can be implemented. Instead of using the cleanup-tool I went with pure ansible implementation. This way only the images that were used by enabled services will be removed and no other changes to images will be made. So when the admin has some images that might be on that machine and not used, they wont get deleted (when you would use prune).

I had to change the behavior of DockerWorker when it comes to removing images, because the previous implementation would just return changed=false when I tried to remove the image by its ID. It would not accept anything else than a full image name with tag of the current k-a version. I was not able to find any way on how to remove the image by name since the leftover image has <none> tag.

So far it is just a POC for Glance. I've tested it locally and it is working nicely. Let me know what you think and I would finish the work for all roles.

Revision history for this message
Roman Krček (r-krcek) wrote :

Right now the CI jobs are failing due to the fact that glance_tls_proxy is using haproxy image which I am guessing it is sharing with other services, so when it tries to delete it, it fails with "image currently in-use"

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.