Skip to content
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

Move portion of the upgrade logic into the downloaded release #1389

Closed
joshdover opened this issue Sep 30, 2022 · 1 comment
Closed

Move portion of the upgrade logic into the downloaded release #1389

joshdover opened this issue Sep 30, 2022 · 1 comment
Labels
8.6-candidate Team:Elastic-Agent Label for the Agent team

Comments

@joshdover
Copy link
Contributor

Today, the entire agent upgrade process is executed by the old version being upgraded from. This has some limitations because it requires that the old release has enough information to be able to install the new version, which can slow down our ability to make changes to the install format, location, and procedure.

Some recent examples of how this problem presented itself:

We could mitigate this by moving a portion of the upgrade logic to a script contained in the tarball that is being upgraded to. This could lead to a procedure like:

  • Agent 9.0 downloads and unpacks 9.1 to a temporary directory
  • Agent 9.0 calls /tmp/path/to/9.1/upgrade.sh
  • upgrade.sh takes care of copying files to appropriate location, updating symlinks, and executing any other required logic for new features introduced since 9.0

One challenge with adding and relying on this is that we currently support upgrading from any 8.x version up to any other, so we wouldn't be able to rely on this until the next major version, and even then we'd only be able to rely on it if we require users upgrade to 8.last before upgrading to 9.x. Likely, the sooner we get something like this in the sooner we can take advantage of it.

cc @aleksmaus

@cmacknz
Copy link
Member

cmacknz commented Oct 3, 2022

Can we close this, given this is essentially the approach taken in #1392 already?

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.6-candidate Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

4 participants