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

Analysisd - add new test to check analysisd socket properties #2405

Merged
merged 18 commits into from
Mar 17, 2022

Conversation

fernandolojano
Copy link
Contributor

@fernandolojano fernandolojano commented Dec 24, 2021

Related issue
#1850

Description

closes #1850

This PR adds a new test for Analysisd requested on the issue #1850. As for now, it works properly as it's able to detect the changes of the file time and inode whenever
they change.

This test check:

  • The Inode value of the queue socket can't change after the Analysisd daemon is set in the testing configuration mode
  • The File time value of the queue socket can't change after the Analysisd daemon is set in the testing configuration mode

Tests

  • Python codebase satisfies PEP-8 style style guide. pycodestyle --max-line-length=120 --show-source --show-pep8 file.py.
  • Python codebase is documented following the Google Style for Python docstrings.
  • The test is documented in wazuh-qa/docs.
  • provision_documentation.sh generate the docs without errors.

@mauromalara
Copy link
Contributor

CentOS: Manager Local Jenkins
PS1 🔴 🔴
PS2 🔴 🔴
PS3 🔴 🔴
Note
It fails apparently because the bug was not fixed
@fernandolojano please, check the results with the core team to determine if is an error or a bug of Wazuh.

mauromalara
mauromalara previously approved these changes Jan 17, 2022
@mauromalara mauromalara self-requested a review January 17, 2022 15:53
@mauromalara mauromalara dismissed their stale review January 17, 2022 15:54

I didn't merge master in the current branhc

Copy link
Contributor

@mauromalara mauromalara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fernandolojano please, modify the code following the PEP8 guidelines. You can follow this guide to doing it, take into account that you must change the max-line-length argument following this guide

mauromalara
mauromalara previously approved these changes Jan 21, 2022
@mauromalara
Copy link
Contributor

03/02/2022

Package

Version Revision Link
4.4.0 0.40400.20220202 package

Testing

Analysisd

OS Local Jenkins Notes
R1 🔴 🔴 - Build Local failure: The inode value for the socket /var/ossec/queue/sockets/queue has changed -- Jenkins failure: The modification time property value for the socket /var/ossec/queue/sockets/queue has changed
R2 🔴 🔴 - Build Same as before
R3 🔴 🔴 - Build Same as before
NOTES (important)
@snaow it seems that the bug was not fixed. This may be a stopper. The test fails in both executions. In Jenkins, the mtime changes but locally the inode changes instead. The package used is the same.

mauromalara
mauromalara previously approved these changes Feb 3, 2022
Copy link
Member

@jnasselle jnasselle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no stopper and this could be validated by manual testing (ls -li to get inodes and stat -c '%y' to get modification time).
I propose a rearrangement of this test in the next branch: https:/wazuh/wazuh-qa/tree/fix-1850-check-queue-socket-status-test

Jenkins: Tested using v4.2.2 staging packages
Local: Tested using v4.4.0 source installation

CentOS: Manager Local Jenkins
PS1 🟢 🟢
PS2 🟢 🟢
PS3 🟢 🟢

Hope this helps!
Nico

@mauromalara
Copy link
Contributor

There's no stopper and this could be validated by manual testing (ls -li to get inodes and stat -c '%y' to get modification time). I propose a rearrangement of this test in the next branch: https:/wazuh/wazuh-qa/tree/fix-1850-check-queue-socket-status-test

Jenkins: Tested using v4.2.2 staging packages Local: Tested using v4.4.0 source installation

CentOS: Manager Local Jenkins
PS1 green_circle green_circle
PS2 green_circle green_circle
PS3 green_circle green_circle
Hope this helps! Nico

Hi @jnasselle,

Thanks for your help, I'll check it and apply the necessary changes.

@mauromalara
Copy link
Contributor

mauromalara commented Feb 21, 2022

21/02/2022

Packages

Local

Version Revision Link
4.4.0 0.40400.20220202 package

Jenkins

v4.2.2 - Staging

Testing

CentOS: Manager Local Jenkins
PS1 🟢 🟢
PS2 🟢 🟢
PS3 🟢 🟢

Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ, but some changes are required

@mauromalara mauromalara force-pushed the 1850-check-queue-socket-status-test branch from 0411859 to c435418 Compare March 14, 2022 20:13
@mauromalara
Copy link
Contributor

mauromalara commented Mar 14, 2022

14/03/2022

Package

Version Revision Link
4.4.0 0.40400.20220202 download

Testing

Analysisd

CentOS Local Jenkins Notes
R1 🟢 🟢 - Build
R2 🟢 🟢 - Build
R3 🟢 🟢 - Build

@mauromalara mauromalara requested a review from Rebits March 15, 2022 12:04
@Rebits
Copy link
Member

Rebits commented Mar 16, 2022

16/03/2022

Package

Version Revision Link
4.3.0 1 https://packages-dev.wazuh.com/pre-release/yum/wazuh-manager-4.3.0-1.x86_64.rpm

Testing

test_analysisd

OS Local Notes
R1 🟢
R2 🟢
R3 🟢

  • 🟢: All pass
  • 🟡: Some warnings
  • 🔴: Some errors/fails
  • 🔵: In progress

@Rebits Rebits force-pushed the 1850-check-queue-socket-status-test branch 3 times, most recently from ee6960b to c435418 Compare March 16, 2022 10:54
@Rebits Rebits force-pushed the 1850-check-queue-socket-status-test branch from c435418 to 71b156e Compare March 17, 2022 10:50
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rebits Rebits merged commit a38138b into master Mar 17, 2022
@Rebits Rebits deleted the 1850-check-queue-socket-status-test branch March 17, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a test to check that the queue socket remains after a configuration test
4 participants