Retention Policy doesn't appear to work

I have the cleanup policy setup as shown in the attached screenshot but see no directories being deleted on the tentacle. When I click “Apply Policies Now” theres successful output:

Apply retention policies
2012-12-14 20:36:40 INFO Loading retention policies…
2012-12-14 20:36:40 INFO Applying retention policies…
Apply policy: Cleanup Policy
2012-12-14 20:36:40 INFO Policy name: Cleanup Policy
2012-12-14 20:36:40 INFO Undeployed releases: Last 90 days
2012-12-14 20:36:40 INFO Deployed releases: Last 90 days
2012-12-14 20:36:40 INFO Projects covered:
2012-12-14 20:36:40 INFO - XXXXXXXX
2012-12-14 20:36:40 INFO - XXXXXXXX
2012-12-14 20:36:40 INFO - XXXXXXX
2012-12-14 20:36:40 INFO - XXXXXXXXXXXX
2012-12-14 20:36:40 INFO 0 releases were deleted

Sorry the image didn’t appear to attach. It showed the retention policy settings which are:

Octopus server:
-Undeployed releases: Keep the last 90 days
-Deployed releases: Keep the last 90 days
Tentacle:
-File on Tentacle: Kepp the last 4 items

Hi Charlie,

Thanks for getting in touch. The Tentacle retention policy (deleting files on the Tentacles) only take effect during a deployment to a given Tentacle. To see it in action, you’ll need to perform some deployments to the target machines, after which old deployments will be deleted.

Paul

I realize this is a pretty old thread, but this doesn’t seem to be the case for me. I have the following retention policy in place:

  • Undeployed releases: Keep 3 releases
  • Deployed releases: Keep 3 releases
  • Tentacle deployments: Keep 3 releases

I’ve had this in place for 9 months now and forgot about it until I got a failure on a deployment because I was out of disk space. I looked through my Application folders and saw way more than 3 releases maintained in many of them.

I’m running Octopus Deploy 2.4.5.46. I’m due for an upgrade but haven’t had the time yet.

Thanks for any info you can provide.

Hi Mike,

There has definitely been a lot of improvements to the retention policies since 2.4.5. If anything 2.6 is changing where they live and allowing different policies per environment within Lifecycles.
There is probably nothing we can do to help you resolve this issue without upgrading as most were bug fixes that were applied.

Vanessa

I did perform an upgrade earlier today on both the server and tentacles per your advice and I also went through and “reapplied” my retention policies and performed a deployment, but all my old release directories still exist. Am I missing something? Do I need to manually delete any releases I made prior to the upgrade?

Thanks again.

image001.jpg

Hi Mike,

It should be able to delete old files when its reapplied.
I am going to need a deployment log http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task for the retention policy that isn’t being applied.
Also a screenshot of the retention policy settings. We can then go from there.

Sorry about the troubles
Vanessa

Attached are the items you requested. Thanks for your help.

ServerTasks-16875.log.txt (11 KB)

RetentionPolicy.PNG

Hi Mike,

So I am not seeing it even try to run a retention policy. Can you go to the project’s group’s edit page and see which retention policy has been applied to that group?
That might be the issue here.

Let me know what you find.

Thanks!
Vanessa

That was it! Thanks for the help!