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

Error: Could not read your OS in /var/ossec/etc/ossec.conf. It was expected to read Fedora 34 in ossec.conf

Open c-bordon opened this issue 2 years ago • 0 comments

Wazuh version Install type Action performed Platform
4.3.9-1 Agent Upgrade Fedora 34

We have randomly found errors in different Upgrade tests carried out on Fedora 34, these errors have been detected in versions: 4.3.7, 4.3.8, 4.3.9, 4.3.10

15:16:37  =================================== FAILURES ===================================
15:16:37  _________________________ test_check_system_ossec_conf _________________________
15:16:37  upgrade_agent_test.py:181: in test_check_system_ossec_conf
15:16:37      assert system in f.read(), assert_description['files']['ossec_conf_OS_not_detected'] + ". It was expected to read {} in ossec.conf".format(system)
15:16:37  E   AssertionError: Could not read your OS in /var/ossec/etc/ossec.conf. It was expected to read fedora 34 in ossec.conf
15:16:37  E   assert 'fedora 34' in '<!--\n  Wazuh - Agent - Default configuration for linux \n  More info at: [https://documentation.wazuh.com\n](https://documentation.wazuh.com/n)  Mailing ...responses.log</location>\n  </localfile>\n\n</ossec_config>\n<!-- This commentary altered checksum of ossec.conf -->\n'
15:16:37  E    +  where '<!--\n  Wazuh - Agent - Default configuration for linux \n  More info at: [https://documentation.wazuh.com\n](https://documentation.wazuh.com/n)  Mailing ...responses.log</location>\n  </localfile>\n\n</ossec_config>\n<!-- This commentary altered checksum of ossec.conf -->\n' = <built-in method read of _io.TextIOWrapper object at 0x7f41290d76c0>()
15:16:37  E    +    where <built-in method read of _io.TextIOWrapper object at 0x7f41290d76c0> = <_io.TextIOWrapper name='/var/ossec/etc/ossec.conf' mode='r' encoding='UTF-8'>.read
15:16:37  =========================== short test summary info ============================
15:16:37  FAILED upgrade_agent_test.py::test_check_system_ossec_conf - AssertionError: ...
15:16:37  ========================= 1 failed, 10 passed in 0.07s =========================

Jenkins test: https://ci.wazuh.info/job/Test_upgrade/107297/console parameters to reproduce:

ORIGINAL_PKG_VERSION: 4.3.7 TARGET_PKG_VERSION: 4.3.10 INSTALL_REPOSITORY: live TARGET_REPOSITORY: pre-release MANAGER_SYSTEM: fedora AGENT_SYSTEM: fedora MANAGER_ARCHITECTURE: amd64 MANAGER_SYSTEM_VERSION: 34 AGENT_ARCHITECTURE: amd64 AGENT_SYSTEM_VERSION: 34 TARGET_PKG_REVISION: 1 TARGET_API_PKG_REVISION: 1 JENKINS_REFERENCE: 4.3

c-bordon avatar Nov 16 '22 15:11 c-bordon