Skip to content
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

Fix 'test_remoted/test_agent_communication/test_agent_version_shared_configuration_startup_message' tests in 4.2 #1574

Closed
4 tasks
Tracked by #1530
damarisg opened this issue Jul 6, 2021 · 3 comments
Assignees

Comments

@damarisg
Copy link
Member

damarisg commented Jul 6, 2021

Issue information

Related issue
Closes #1530

When it comes to starting with the test fix, there is some information that can help you:

Module: Remoted
Support Team: "Core" 
Channel: "devel-core"
Target: Manager   
OS: Linux

I add some information obtained while researched the logs that failed.

Case 1:

Type Description
Test Path test_remoted/test_agent_communication/test_agent_version_shared_configuration_startup_message
Consistent yes
Test Execution 3/3 executions failed
Cases Fails 6
Summary On test_agent_remote_configuration when it called to check_push_shared_config. It requires research if it is a timeout error to load log or if it an error with the remoted key.
Error message 'Could not find the remoted key loading log'

In order to finish this issue the following tasks should be fulfilled:

  • Research of fails.
  • Apply Fix
  • Full Green/ Full Yellow in test_remoted/test_agent_communication/test_agent_version_shared_configuration_startup_message for 3 times.
  • Documentation of any important change done for these tests or the used tools.
@mdengra
Copy link
Contributor

mdengra commented Jul 20, 2021

2021-07-20

I was unable to reproduce the described error in my testing environment.
Used Wazuh-QA branch: 1516-4.2.0-full-green
Test results with the default modules enabled in the ossec.conf:

Test Executions Date By Status
test_agent_version_shared_configuration_startup_message_local_r1.log 2021-07-20 Miguel 🟡
test_agent_version_shared_configuration_startup_message_local_r2.log 2021-07-20 Miguel 🟡
test_agent_version_shared_configuration_startup_message_local_r3.log 2021-07-20 Miguel 🟡

@damarisg
Copy link
Member Author

This issue will be closed because we can't reproduce it.

Test Results:

Test Executions Date By Status
YellowAgentVersionSharedConfigurationStartupMessage.log 2021-07-27 Seyla 🟡
YellowAgentVersionSharedConfigurationStartupMessage2.log 2021-07-27 Seyla 🟡
YellowAgentVersionSharedConfigurationStartupMessage3.log 2021-07-27 Seyla 🟡

@damarisg damarisg self-assigned this Jul 27, 2021
@damarisg damarisg reopened this Aug 13, 2021
@damarisg
Copy link
Member Author

damarisg commented Aug 13, 2021

Research

I reopen this issue because I had random fails in differents full executions. For that reason, I start a research.
It was executed a lot times, to could reproduce it.

The problem here is because no one received the new group shared.

I debug it to see what received the monitor and that was send by the agent and I could see different things:

  • After to received 3 messages that were expected (merged, #default, #close), none receive anything else.
  • Another thing that we can see is that the Monitoring read twice times eeec636603bad61a125adccbc58cfb8b484540000000003:6052:#!-agent ack
test_remoted/test_agent_communication/test_agent_version_shared_configuration_startup_message.py::test_agent_remote_configuration[TCP-debian7_420] Group 'testing_group' created.
Group 'testing_group' added to agent '276'.
Monitoring lee:  2021/08/11 19:03:36 wazuh-remoted[24377] state.c:59 at rem_write_state(): DEBUG: Updating state file.

Monitoring lee:  2021/08/11 19:03:37 wazuh-remoted[24377] secure.c:314 at rem_keyupdate_main(): DEBUG: Checking for keys file changes.

Agent Simulator lee:  155f46d1195f24881431ede525b4aef6364890000000003:6047:#!-agent ack 
Agent Simulator lee:  37ade2fb53f86dd6ff23041671fbf965526220000000003:6048:#!-agent ack 
Monitoring lee:  155f46d1195f24881431ede525b4aef6364890000000003:6047:#!-agent ack 
Monitoring lee:  37ade2fb53f86dd6ff23041671fbf965526220000000003:6048:#!-agent ack 
Agent Simulator lee:  a887f4c6f0129ce40a28c21f43ab248c346100000000003:6049:#!-up file 7b35c8bc77125d075185a23d4deb52c2 merged.mg

Agent Simulator lee:  e14070e4b126f0468154fb50aaa223ea512160000000003:6050:#default
!228 ar.conf
restart-ossec0 - restart-ossec.sh - 0
restart-ossec0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-ossec.sh - 0
restart-wazuh0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-wazuh - 0
restart-wazuh0 - restart-wazuh.exe - 0
!76 agent.conf
<agent_config>

  <!-- Shared agent configuration here -->

</agent_config>

Agent Simulator lee:  1702f934f37e9bc297147aeb3032162e275560000000003:6051:#!-close file 
Monitoring lee:  a887f4c6f0129ce40a28c21f43ab248c346100000000003:6049:#!-up file 7b35c8bc77125d075185a23d4deb52c2 merged.mg

Monitoring lee:  e14070e4b126f0468154fb50aaa223ea512160000000003:6050:#default
!228 ar.conf
restart-ossec0 - restart-ossec.sh - 0
restart-ossec0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-ossec.sh - 0
restart-wazuh0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-wazuh - 0
restart-wazuh0 - restart-wazuh.exe - 0
!76 agent.conf
<agent_config>

  <!-- Shared agent configuration here -->

</agent_config>

Monitoring lee:  1702f934f37e9bc297147aeb3032162e275560000000003:6051:#!-close file 
Agent Simulator lee:  eeec636603bad61a125adccbc58cfb8b484540000000003:6052:#!-agent ack 
Monitoring lee:  eeec636603bad61a125adccbc58cfb8b484540000000003:6052:#!-agent ack 
Agent Simulator lee:  a36ae22c25cd13947b6d62636442130c025310000000003:6053:#!-agent ack 
Agent Simulator lee:  85139d6b186eeedaeafdfad865299d21041100000000003:6054:#!-agent ack 
Agent Simulator lee:  55b8e24e346b902b1c63b08189d21506646960000000003:6055:#!-agent ack 
Agent Simulator lee:  5350ba7c93ea19a0561e125ab508963a495820000000003:6056:#!-agent ack 
Agent Simulator lee:  9cd8e556a56681b2b3a8de11e8a6e18c398380000000003:6057:#!-agent ack 
Monitoring lee:  eeec636603bad61a125adccbc58cfb8b484540000000003:6052:#!-agent ack 
Monitoring lee:  a36ae22c25cd13947b6d62636442130c025310000000003:6053:#!-agent ack 
Monitoring lee:  85139d6b186eeedaeafdfad865299d21041100000000003:6054:#!-agent ack 
Monitoring lee:  55b8e24e346b902b1c63b08189d21506646960000000003:6055:#!-agent ack 
Monitoring lee:  5350ba7c93ea19a0561e125ab508963a495820000000003:6056:#!-agent ack 
Monitoring lee:  9cd8e556a56681b2b3a8de11e8a6e18c398380000000003:6057:#!-agent ack 
FAILEDGroup testing_group removed.
Affected agents: 276.
2021-08-11T19:04:05.1628723045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants