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

Cherry-pick #22153 to 7.10: [Elastic Agent] Fix deb/rpm installation #22209

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

blakerouse
Copy link
Contributor

Cherry-pick of PR #22153 to 7.10 branch. Original message:

What does this PR do?

Fixes the installation of Elastic Agent using the .deb and .rpm.

This fixes the issue of the Elastic Agent .deb not working on Ubuntu because the starting parameters of --environment systemd cannot be used on the root cmd, it can only be used on the run subcommand.

This fixes the issue of the Elastic Agent .rpm not working on Fedora because SELinux prevents a systemd unit from starting a binary inside of /usr/share. This switches the command of the unit to /usr/bin/elastic-agent which will already provide the wrapper command args for the paths and not prevent SELinux from starting the binary.

Why is it important?

Allows Elastic Agent to work from a .deb and .rpm installation.

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
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

* Fix issue on elastic-agent systemd unit.

* Fix service file for fedora.

* Add changelog.

(cherry picked from commit f07cc32)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 27, 2020
@blakerouse blakerouse self-assigned this Oct 27, 2020
Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blakerouse blakerouse merged commit 21eb34d into elastic:7.10 Oct 28, 2020
@blakerouse blakerouse deleted the backport_22153_7.10 branch October 28, 2020 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants