-
Notifications
You must be signed in to change notification settings - Fork 143
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
modify runtime variable 'install.in_default' with rpm/deb #3309
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
🌐 Coverage report
|
modify the `install.in_default` runtime protection variable so that when elastic-agent is installed via deb or rpm package manager it is still considered to be in the default path. This is necessary because endpoint supports being a component when elastic-agent is installed via rpm/deb.
cfbdd6b
to
7861fa7
Compare
|
||
// NOTE searching for english words might not be a great idea as far as portability goes. | ||
// list all installed packages then search for paths.BinaryName? | ||
// dpkg is strange as the remove and purge processes leads to the package bing isted after a remove, but not after a purge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bing isted -> being listed? 😄
|
||
// check debian based systems (or systems that use dpkg) | ||
// If the package has been installed, the status starts with "install" | ||
// If the package has been removed (but not pruged) status starts with "deinstall" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
purged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That this code already exists and executes on every install makes me feel better about it not having tests yet.
|
||
// check rhel and sles based systems (or systems that use rpm) | ||
// if package has been installed the query will returns the list of associated files. | ||
// otherwise if uninstalled, or has never been installled status ends with "not installed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// otherwise if uninstalled, or has never been installled status ends with "not installed" | |
// otherwise if uninstalled, or has never been installed status ends with "not installed" |
No new failures, merging. |
* modify runtime variable 'install.in_default' with rpm/deb modify the `install.in_default` runtime protection variable so that when elastic-agent is installed via deb or rpm package manager it is still considered to be in the default path. This is necessary because endpoint supports being a component when elastic-agent is installed via rpm/deb. * fix typos in comments (cherry picked from commit 117d7de)
) * modify runtime variable 'install.in_default' with rpm/deb modify the `install.in_default` runtime protection variable so that when elastic-agent is installed via deb or rpm package manager it is still considered to be in the default path. This is necessary because endpoint supports being a component when elastic-agent is installed via rpm/deb. * fix typos in comments (cherry picked from commit 117d7de) Co-authored-by: Lee E Hinman <[email protected]>
What does this PR do?
changes how the
install.in_default
runtime protection variable is calculated on systems where elastic-agent is installed via deb or rpm package. Previously this would have returned false be cause the install path is not the same as thetar.gz
install. However, endpoint knows how to operate when elastic-agent is installed as a deb or rpm, so now it will return true.Why is it important?
This is required because the runtime prevention was blocking the install of endpoint on systems installed via deb/rpm.
example:
Checklist
- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry in./changelog/fragments
using the changelog toolAuthor's Checklist
How to test this PR locally
Related issues
Questions to ask yourself