-
Notifications
You must be signed in to change notification settings - Fork 26
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
Preserve state of wazuh-indexer service on upgrade #492
Conversation
6dc22c9
to
35fc1e1
Compare
35fc1e1
to
b2d1265
Compare
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.
LGTM. However, consider these comments before we merge.
Update regarding systemd-tmpfiles:The tool is already used in our distribution scripts, anyway the implementation for our .restart temp is not that straightforward. Currently Possible implementation: if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer.service >/dev/null; then
echo "Stop existing wazuh-indexer.service"
systemctl --no-reload stop wazuh-indexer.service
echo "f /tmp/wazuh-indexer.restart 0750 wazuh-indexer wazuh-indexer - -" >> /usr/lib/sysctl.d/wazuh-indexer.conf Anyway we must keep the manual removal of the file after the service restart, contemplating the scenario where the user does not power off the system between upgrades.
ConclusionThe implementation of the tool won't help us simplifying the code nor making it clearer for the reader. |
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.
Needs to be ported to 4.10.0.
Ported to > #498 |
Description
Update wazuh-indexer pre, and post installation scripts to preserve the previous service status, maintaining consistency with the rest of Wazuh central components packages.
Related Issues
Resolves #487
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Testing evidence
Upgrade .deb package validation
Upgrade with service running
Upgrade with service stopped
Upgrade .rpm package validation
Upgrade with service running
Upgrade with service stopped