vmware-archive / photon-controller

Photon Controller
Other
26 stars 3 forks source link

Deleting a photon image doesn't delete it from the associated datastore #101

Closed mrporcles closed 7 years ago

mrporcles commented 7 years ago

Deleting an image using ./photon image delete does not delete the corresponding image from the datastore of the hosts.

imgdeletecli.txt

screen shot 2017-03-17 at 17 01 05
AlainRoy commented 7 years ago

Image deletion happens in the background and it can take a while if the image has been replicated to a lot of hosts. How long did you wait?

mrporcles commented 7 years ago

30 minutes and it is still in the datastore. I deleted another one previously (10 minutes before) as well and that one is also still there. I see a unused_image_marker file. Does it make use of this?

mrporcles commented 7 years ago

The deletion seems to have worked after leaving it overnight

AlainRoy commented 7 years ago

Did it take "overnight", or you just didn't look at it for a while after the 30 minute mark?

From my reading of the code: every 60 minutes, we remove images that haven't been used in at least 30 minutes. (We don't remove the images immediately--it's part of a larger image cleaning process.) Depending on the time you deleted it relative to this background processing, it could be up to 90 minutes to delete it. (If I did my math right--I'm not quite awake yet.)