Extracted Packages linger when using Custom Install Directory

kkelchen's Avatar

kkelchen

15 Feb, 2018 09:50 PM

Octopus Server Version Number: 4.1.1

Hello!

Steps to Reproduce

  1. Have a "Deploy a Package" step in the deployment process.
  2. Enable the "Custom installation directory" feature on the step.
  3. Enter a custom installation directory.
  4. Deploy and wait for completion.
  5. You'll see that after the extracted package in C:\Octopus\Applications on the Tentacle was copied to the custom installation directory, the extracted package in C:\Octopus\Applications was left behind to linger even though it is no longer used.

Leaving behind the copy in the extraction location when using a custom installation directory seems odd since the version that matters is in the custom installation directory. I might expect Octopus to automatically delete the version in C:\Octopus\Applications after the copy to the custom installation directory has completed (or at least have a checkbox option to control this).

In our specific use case, this is a security concern (it's a slight disk space concern as well). Our application has a Web.config on the Web Server with a database connection string in it. We use a Community Step Template to encrypt the connection string, but that step runs on the copy of the package in the final destination...in the custom installation directory. This leaves the unnecessary copy of the package in the extraction location with the connection string unencrypted on the server after the deployment has completed, because variable substitution for the database connection string has taken place on the package while yet in the extraction location.

Still, thank you for all the hard work and for creating such a great product!

Kevin

  1. Support Staff 1 Posted by Michael Noonan on 27 Feb, 2018 10:41 PM

    Michael Noonan's Avatar

    Hi Kevin,

    Thanks for getting in touch! I'm so sorry, I dropped the ball on your message.

    Regardless of whether you are using Custom Installation Directory, or letting Octopus use its normal folder conventions, it will follow the normal retention policies as to what it cleans up.

    We don't have a built-in feature for "I don't want to keep anything, just delete the whole lot", but we do have this suggestion in UserVoice.

    In the meantime I think your best option is to clean up the folders yourself, whether this be with a custom script, or using a step from our community library like this one. You can use the Octopus.Action.Package.InstallationDirectoryPath system variable to target that folder.

    Hope that helps!
    Mike

  2. 2 Posted by kkelchen on 27 Feb, 2018 11:24 PM

    kkelchen's Avatar

    Hi Mike!

    Thank you for the response and for providing the suggestions and resources.

    We went ahead and added a step with a custom script towards the very end of our deployment process to delete all of the packages in the package extraction location.

    I also added a comment to the UserVoice suggestion to help make sure that this specific issue is considered (because I could see how it might be missed).

    And just to be clear, is the problem I've reported not considered a "bug" but rather is "working as designed" and would be a new feature? I can see how this issue could be viewed in different ways, so I just want to make sure I understand the vantage point of Octopus Support correctly.

    Thanks so much again!

    Kevin

  3. Support Staff 3 Posted by Michael Noonan on 28 Feb, 2018 01:50 AM

    Michael Noonan's Avatar

    Hi Kevin,

    Thanks for keeping in touch! That's right, this is operating as we'd expect, actually as it was designed. I can see from your perspective how this doesn't make so much sense, however we have another group of customers who depend on the way this works for various reasons.

    Hope that helps!
    Mike

  4. 4 Posted by kkelchen on 28 Feb, 2018 05:02 PM

    kkelchen's Avatar

    Hi Mike!

    Appreciate you providing the rationale.

    Thanks again,

    Kevin

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac