wazuh-packages icon indicating copy to clipboard operation
wazuh-packages copied to clipboard

Try to move all post restart installers actions before restart

Open alberpilot opened this issue 2 years ago • 0 comments

Regarding the issue https://github.com/wazuh/wazuh/issues/13414, it is necessary to review the installer's behavior.

The users noticed an error during the upgrade process from 4.2.6 to 4.3.0 if they had the issue described configuration. Looks like the error, that drops analysisd, triggers an apt/yum error because the installer manages the daemons state after upgrading the files.

Tasks

  • [ ] Research about the package installing error. Starting with a Wazuh manager 4.2.6 working with overwrite configuration as described in the issue, reproduce the error and locate the exact point where the error is produced, in order to determine the responsibility.
  • [ ] Aside from that, due to the fact of managing services in the upgrade, the risk of having a corrupt upgrade if any daemon fails after the restart is confirmed. So, we need to move all actions after restarting services before the service restart. If possible. Leaving the restart to the last command ensure that, even with a daemon error, the installation is correct. So, it's necessary to analyze what it's necessary to move, the consequences of this move if possible, and make a PR with the order changing. This analysis should be done for the agent and manager.

alberpilot avatar May 24 '22 11:05 alberpilot