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

`Failed to disable unit: Unit file wazuh-manager.service does not exist` message was found during manager testing

Open pro-akim opened this issue 1 year ago • 6 comments

Target version Related issue Related PR/dev branch
4.9.0 https://github.com/wazuh/wazuh/issues/23748 https://github.com/wazuh/wazuh-qa/pull/5689

The message:

�[0;33m    Failed to disable unit: Unit file wazuh-manager.service does not exist.�[0m

It was found during manager testing in deployability tests (uninstall process).

It does not interfere with the tests themselves, but its nature should be investigated.

pro-akim avatar Sep 17 '24 09:09 pro-akim

We will attempt to replicate this behavior using Test-manager-complete.yaml.

joaquinsgi avatar Sep 18 '24 18:09 joaquinsgi

The behavior has been replicated, now the test_uninstall.py code will be investigated. Although the test was successful

It will be attempted to replicate the behavior locally, following each of the steps in test_uninstall.py

joaquinsgi avatar Sep 19 '24 16:09 joaquinsgi

The error has been reproduced, and it has been shown that it is due to running the systemctl disable wazuh-manager command after previously uninstalling with the --purge option, which results in the error mentioned in the issue. failed

After speaking with @rauldpm, the systemctl disable wazuh-manager command will be removed since it was the cause of the error. Since a remove with the --purge option is performed earlier, the uninstallation will be successful, and there will be no need to run the disable command. These changes will be made and tested in the development branch:

  • https://github.com/wazuh/wazuh-qa/tree/bug/5742-failed-manager-not-exist

After relaunching the job flow with the described changes, and since no errors appeared and it was successful, a pull request has been created to merge the changes. Log: jobflow.log

  • https://github.com/wazuh/wazuh-qa/pull/5761

joaquinsgi avatar Sep 20 '24 15:09 joaquinsgi

A new development branch has been created to introduce the changes into 4.10.0

  • https://github.com/wazuh/wazuh-qa/tree/bug/5742-failed-to-disable-manager.

A new Pull request has been created to merge the change.

  • https://github.com/wazuh/wazuh-qa/pull/5775

joaquinsgi avatar Sep 25 '24 15:09 joaquinsgi

LGTM!

hossam1522 avatar Sep 25 '24 17:09 hossam1522

In order to update the Uninstalling Documentation for manager, a new isssue has been created:

  • https://github.com/wazuh/wazuh-documentation/issues/7808

joaquinsgi avatar Sep 26 '24 14:09 joaquinsgi