-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Successful upgrades should cleanup old downloads #694
Comments
Won't it be better to clean it in any case? |
Agreed, to also solve #693 we should probably do:
|
So to itemize all scenarios across this and #693: Assuming we're upgrading from
|
@joshdover: what do you think about @michel-laterman proposal? |
To chime in: Would it be an idea to keep N-1 on the machine? Ideally, we should be able to revert to the previous version. Given the problems we are seeing with failed downloads, it would be worth considering keeping the install files from the latest success full install on the machine so there is a more smooth way of reverting. It could also save some money in the long run, because we don't need to download those files over and over again. Example: Agent version 8.3.1. has been installed successfully. That means that everything older than (in this case) 8.3.0 can be removed. The version is upgraded from 8.3.1. to 8.3.2. That means that everything older than 8.3.1. can be removed. Please note that at this point in time, there isn't a way for Agent or Fleet to revert back to a previous version using files that are already on the machine. Also, Fleet would need to be able to check the integrity of the install files on the machine before installing them (but that shouldn't be a problem since we are already working with hashes). Then again, it would be worth thinking about this now in case we need it in the future.
The response capabilities that are coming in 8.4. can also help out here. Right now, customers don't have a way of interacting with the filesystem on which Agent is installed. Internally, we solve this by executing local commands through Endgame or doing a clean-up using Jamf/InTune. Once Agent has this capability, removing failed downloads from an operator perspective will become much easier. |
For failed upgrades I think it should be enough to delete the downloaded files only if the checksum fails. If the checksum succeeds then the failed upgrade is likely caused by some other reason. |
Hi @joshdover
Query: Build details:
Please let us know if we are missing anything here. |
After an upgrade is successful, the downloaded files are not deleted in
Elastic/Agent/data/elastic-agent-*/downloads
. This can lead to several GB of unneeded data being preserved on disk after several subsequent upgrades.We should delete the downloads files to save space once an upgrade has successfully completed.
The text was updated successfully, but these errors were encountered: