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

[8.15](backport #5260) Fix debian packaging for upgrades #5291

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 13, 2024

What does this PR do?

Fixes the debian packaging to properly copy the state.enc and state.yml files to the new version of the Elastic Agent.

Why is it important?

Without this upgrading to a new version of the Elastic Agent losses the state.enc and/or state.yml file.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works (cannot add unit tests for packaging)
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None

How to test this PR locally

Build the debian package:

$ PLATFORMS="linux/amd64" PACKAGES="deb" SNAPSHOT="true" EXTERNAL="true" mage package

Install older version of Elastic Agent

sudo dpkg -D2 -i elastic-agent-8.14.3-amd64.deb

Enroll into Fleet

sudo elastic-agent enroll --url={url} --enrollment-token={token}

Upgrade to built version

sudo dpkg -D2 -i build/distributions/elastic-agent-8.16.0-SNAPSHOT-amd64.deb

Related issues


This is an automatic backport of pull request #5260 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner August 13, 2024 13:47
@mergify mergify bot added the backport label Aug 13, 2024
@mergify mergify bot requested review from andrzej-stencel and pchila and removed request for a team August 13, 2024 13:47
@blakerouse
Copy link
Contributor

Failures are un-related, looks like 8.14.2 snapshot has expired?

@ycombinator Can I get a force merge?

@ycombinator
Copy link
Contributor

ycombinator commented Aug 13, 2024

Failures are un-related, looks like 8.14.2 snapshot has expired?

Yep, I don't see it in https://artifacts-api.elastic.co/v1/versions.

@ycombinator Can I get a force merge?

There's no urgency to merge this 8.15 backport PR as 8.15.1 FF is still a week away. Let's fix this problem the right way by removing 8.14.2-SNAPSHOT from:

"8.14.2-SNAPSHOT",

@ycombinator
Copy link
Contributor

Let's fix this problem the right way by removing 8.14.2-SNAPSHOT from:

"8.14.2-SNAPSHOT",

#5295

* Fix upgrade to not delete symlink and to restart daemon.

* Fix upgrade.

* Add changelog.

* Add deb/rpm upgrade tests.

* Fix build tags.

* Fix typo in service name for systemctl enable.

* Fix issue in binaryPath() to work before install.

* Don't use extract for deb/rpm in tests.

* RHEL for RPM.

* Fix test issues.

* Fix deb/rpm upgrade tests.

* Fix imports.

(cherry picked from commit 44528c4)
@ycombinator ycombinator force-pushed the mergify/bp/8.15/pr-5260 branch from 3819baa to 8c380cd Compare August 14, 2024 13:42
Copy link

@ycombinator ycombinator merged commit 801a922 into 8.15 Aug 15, 2024
13 checks passed
@ycombinator ycombinator deleted the mergify/bp/8.15/pr-5260 branch August 15, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants